[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Linux-31] Fwd: Copier la table des partitions...



Le 19/07/2018 23:11, Jean-Marc Mongrelet a écrit :

Ton script me renvoie comme message:
Impossible de trouver un périphérique de bouclage libre… Annulation !

Apparemment je pense que le problème vient du fait que j'ai 2 partitions ext4...
Ici:
===================================================
info=$(parted -m ${1} unit B print)
info=$(echo "${info}" | grep "ext4")
	num=$(echo "${info}" | cut -d ":" -f1)
	start=$(echo "${info}" | cut -d ":" -f2)
	start=${start%?}
===================================================

Le parted -m :
===================================================
$ sudo parted -m rpi_lam_2018-07-19.img unit B print | grep "ext4"
5:71303168B:104856575B:33553408B:ext4::;
7:176160768B:62247665663B:62071504896B:ext4::;
===================================================

Du coup je viens de rajouter une ligne:
===================================================
info=$(parted -m ${1} unit B print)
info=$(echo "${info}" | grep "ext4")
info=$(echo "$(info)" | tail -n1) ### ajouter par JM car y a 2 partitions ext4
	num=$(echo "${info}" | cut -d ":" -f1)
	start=$(echo "${info}" | cut -d ":" -f2)
	start=${start%?}
===================================================

Je sais pas si c'est la manière la plus élégante de résoudre ce problème... en tous cas je testerais demain!

Bonne nuit,

JM