• Changer les UUID dans une image disque

    From Pierre ESTREM@21:1/5 to All on Tue Jun 7 04:00:01 2022
    Bonjour,

    J'ai une copie d'une clé bootable dont j'ai fait une image (image.img).

    uuidgen et tune2fs ne font cela que sur des fichiers de périphérique non montés.

    Sans monter les partitions de cette image, comment faire pour modifier
    leurs UUID ?

    pierre estrem

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From NoSpam@21:1/5 to All on Tue Jun 7 09:10:01 2022
    Bonjour

    mount -o loop image.img,rw /media ;ou vers tout autre point de montage

    Le 07/06/2022 à 03:55, Pierre ESTREM a écrit :
    Bonjour,

    J'ai une copie d'une clé bootable dont j'ai fait une image (image.img).

    uuidgen et tune2fs ne font cela que sur des fichiers de périphérique
    non montés.

    Sans monter les partitions de cette image, comment faire pour modifier
    leurs UUID ?

    pierre estrem

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pierre Malard@21:1/5 to All on Tue Jun 7 11:30:01 2022
    --Apple-Mail=_42B63A8A-DFB7-4456-8CB8-D1BF8C9A240B
    Content-Transfer-Encoding: quoted-printable
    Content-Type: text/plain;
    charset=utf-8

    Bonjour,

    Il n’y a pas besoin de monter une partition pour lui changer son UUID ; surtout pas !

    Avec un système de fichiers EXTn, la commande est :
    % sudo tune2fs -U $(uuidgen) /dev/<PARTITION>

    Avec une partition XFS :
    % sudo xfs_admin -U $(uuidgen) /dev/<PARTITION>
    Clearing log and setting UUID
    writing all SBs
    new UUID = 38d134f7-8453-41a7-b9ad-441c8ebbbced

    Avec une partition SWAP :
    % sudo mkswap -U $(uuidgen) /dev/<PARTITION>
    mkswap: /dev/sdb2 : avertissement : effacement de l'ancienne signature swap. Configure l'espace d'échange (swap) en version 1, taille = 2 GiB (2147479552 octets)
    pas d'étiquette, UUID=5dcce54c-0f2c-46e0-ab60-5793854ec4f5

    Avec une partition FAT :
    % sudo mlabel -N $(uuidgen) /dev/<PARTITION>

    Après on peut vérifier avec un :
    % blkid

    Bonne journée

    Le 7 juin 2022 à 03:55, Pierre ESTREM <pierre.estrem@free.fr> a écrit :

    Bonjour,

    J'ai une copie d'une clé bootable dont j'ai fait une image (image.img).

    uuidgen et tune2fs ne font cela que sur des fichiers de périphérique non montés.

    Sans monter les partitions de cette image, comment faire pour modifier leurs UUID ?

    pierre estrem


    --
    Pierre Malard

    « La vérité ne triomphe jamais, mais ses ennemis finissent
    toujours par mourir... »
    Max Placnk (1858-1947)
    |\ _,,,---,,_
    /,`.-'`' -. ;-;;,_
    |,4- ) )-,_. ,\ ( `'-'
    '---''(_/--' `-'\_) πr

    perl -e '$_=q#: 3|\ 5_,3-3,2_: 3/,`.'"'"'`'"'"' 5-. ;-;;,_: |,A- ) )-,_. ,\ ( `'"'"'-'"'"': '"'"'-3'"'"'2(_/--'"'"' `-'"'"'\_): 24πr::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'
    - --> Ce message n’engage que son auteur <--


    --Apple-Mail=_42B63A8A-DFB7-4456-8CB8-D1BF8C9A240B
    Content-Transfer-Encoding: quoted-printable
    Content-Type: text/html;
    charset=utf-8

    <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Bonjour,<div class=""><br class=""></div><div class="">Il n’y a
    pas besoin de monter une partition pour lui changer son UUID ; surtout pas !<br class=""><div class=""><br class=""></div><div class=""><div class="">Avec un système de fichiers EXTn, la commande est :</div></div><blockquote style="margin: 0 0 0 40px;
    border: none; padding: 0px;" class=""><div class=""><div class=""><font face="Courier New" class="">% sudo tune2fs -U $(uuidgen) /dev/&lt;PARTITION&gt;</font></div></div></blockquote><div class=""><div class=""><br class=""></div><div class="">Avec une
    partition XFS :</div></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><span style="font-family: &quot;Courier New&quot;;" class="">% sudo</span><font face="Courier New" class="">&nbsp;xfs_
    admin -U $(uuidgen) /dev/&lt;PARTITION&gt;</font></div></div><div class=""><div class=""><font face="Courier New" class="">Clearing log and setting UUID</font></div></div><div class=""><div class=""><font face="Courier New" class="">writing all SBs</font>
    </div></div><div class=""><div class=""><font face="Courier New" class="">new UUID = 38d134f7-8453-41a7-b9ad-441c8ebbbced</font></div></div></blockquote><div class=""><div class=""><br class=""></div><div class="">Avec une partition SWAP :</div></div><
    blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><span style="font-family: &quot;Courier New&quot;;" class="">% sudo</span><font face="Courier New" class="">&nbsp;mkswap -U $(uuidgen) /dev/&lt;
    PARTITION&gt;</font></div></div><div class=""><div class=""><font face="Courier New" class="">mkswap: /dev/sdb2 : avertissement : effacement de l'ancienne signature swap.</font></div></div><div class=""><div class=""><font face="Courier New" class="">
    Configure l'espace d'échange (swap) en version 1, taille = 2 GiB (2147479552 octets)</font></div></div><div class=""><div class=""><font face="Courier New" class="">pas d'étiquette, UUID=5dcce54c-0f2c-46e0-ab60-5793854ec4f5</font></div></div></
    blockquote><div class=""><div class=""><br class=""></div><div class="">Avec une partition FAT :</div></div><blockquote style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><span style="font-family: &quot;Courier New&quot;;"
    class="">% sudo</span><font face="Courier New" class="">&nbsp;mlabel -N $(uuidgen) /dev/&lt;PARTITION&gt;</font></div></blockquote><div class=""><div class=""><br class=""></div><div class="">Après on peut vérifier avec un :</div></div><blockquote
    style="margin: 0 0 0 40px; border: none; padding: 0px;" class=""><div class=""><div class=""><font face="Courier New" class="">% blkid</font></div></div></blockquote><div class=""><div><br class=""></div><div>Bonne journée</div><div><br class=""><
    blockquote type="cite" class=""><div class="">Le 7 juin 2022 à 03:55, Pierre ESTREM &lt;<a href="mailto:pierre.estrem@free.fr" class="">pierre.estrem@free.fr</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><div class=""><div class="">
    Bonjour,<br class=""><br class="">J'ai une copie d'une clé bootable dont j'ai fait une image (image.img).<br class=""><br class="">uuidgen et tune2fs ne font cela que sur des fichiers de périphérique non montés.<br class=""><br class="">Sans monter
    les partitions de cette image, comment faire pour modifier leurs UUID ?<br class=""><br class="">pierre estrem<br class=""><br class=""></div></div></blockquote></div><br class=""><div class="">
    <div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-
    wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space:
    normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-
    spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"
    class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-
    break: after-white-space;" class=""><div style="color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; -webkit-
    nbsp-mode: space; line-break: after-white-space;" class=""><div style="margin: 0px; font-size: 10px; font-family: &quot;Courier New&quot;;" class="">--&nbsp;</div><div style="margin: 0px; font-size: 10px; font-family: &quot;Courier New&quot;;" class=""><
    div style="margin: 0px;" class="">Pierre Malard</div><div class=""><br class=""></div></div><div style="margin: 0px; font-family: Times;" class="">&nbsp; &nbsp;«&nbsp;<i class="">La vérité ne triomphe jamais, mais ses ennemis finissent</i></div><div
    style="margin: 0px; font-family: Times;" class=""><i class="">&nbsp;&nbsp; &nbsp;toujours par&nbsp;mourir.</i>.. »</div><div style="margin: 0px; font-family: Times;" class="">&nbsp;&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &
    nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Max Placnk (1858-1947)</div><div style="margin: 0px; font-size: 10px; font-family: &quot;Courier New&quot;;" class="">&nbsp;&nbsp;&nbsp;|\&nbsp; &nbsp;
    &nbsp;&nbsp;_,,,---,,_</div><div style="margin: 0px; font-size: 10px; font-family: &quot;Courier New&quot;;" class="">&nbsp;&nbsp;&nbsp;/,`.-'`'&nbsp; &nbsp;&nbsp;-.&nbsp;&nbsp;;-;;,_</div><div style="margin: 0px; font-size: 10px; font-family: &quot;
    Courier New&quot;;" class="">&nbsp;&nbsp;|,4-&nbsp;&nbsp;) )-,_. ,\ (&nbsp;&nbsp;`'-'</div><div style="margin: 0px; font-size: 10px; font-family: &quot;Courier New&quot;;" class="">&nbsp;'---''(_/--'&nbsp;&nbsp;`-'\_) &nbsp; πr</div><div style="margin:
    0px; font-size: 9px; font-family: Monaco; min-height: 12px;" class=""><br class=""></div><div style="margin: 0px; font-size: 10px; font-family: &quot;Courier New&quot;;" class="">perl -e '$_=q#: 3|\ 5_,3-3,2_: 3/,`.'"'"'`'"'"' 5-. &nbsp;;-;;,_: &nbsp;|,A-
    &nbsp;) )-,_. ,\ ( &nbsp;`'"'"'-'"'"': '"'"'-3'"'"'2(_/--'"'"' &nbsp;`-'"'"'\_): 24πr::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'</div><div style="margin: 0px; font-family: &quot;Courier New&quot;;" class=""><span style="font-size: 10px;" class="">- --&gt;
    Ce message n’engage que son auteur &lt;--</span></div></div></div></div></div></div>
    </div>
    <br class=""></div></div></body></html> --Apple-Mail=_42B63A8A-DFB7-4456-8CB8-D1BF8C9A240B--

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG/MacGPG2 v2.2
    Comment: GPGTools - http://gpgtools.org

    iQIzBAEBCgAdFiEE0KHTJ+AWKhmI+acm/pSWHuad/BgFAmKfFfMACgkQ/pSWHuad /Bid0Q/+IPnvqBUXOdZ76vXhpKfm4ajPmY+AgECvlwQdf2gIlYw9F80L+g8asiCc v6tTe0l3brV/sxLOzky5f6okpaioaoAWN/M/pfWlrWKZ2AQKS9Jtgam/4Fc+1st3 7riZpgD70766ixlF/3HPmL3DjkmQUm6I/vxvgcKTy1qefUjp/NKlDkwokiOryr2S dyOBCR1/aYop603bQ2r37QUC+JaspCrSFAM62QkFgWm/NpLYl/WXsETXu9cOhR9G PWC7YYBQzkNDXB814Edy8UIbbEBMf5qYBUPvu8rveMg381Wdc0s0rqDUpoWgbz0Y i0byLjKThG6R4ECAFsMINR3TeZQoDcdKMg6zAwioKLwJrwhY/m9ee0VGJwi1GhGs MrvQVO8WlicDs4h/QHazfI3d38DzO7q9hGbHED88xW3erJlH9kqOFee7O90nGuLv o4nGM1F1R/k/ge/b9Ij+AIVWj69F7tsguMk2xceakFH3fqAPY63BBUZES1bUvHTZ M9mpM1ikys3zpr6yYqBakGOE/DiVlenKLYmtsKye2G+3oA5F2mnX/Syk2x0BMilg QTMXF/04dOPshGNv8y9S6v3r0J+5sqsG6lREoA81kkIX/WLnnemHGMcNPbmuHfof 3wWqZxA0FGvL38oGvGiuS5b/9m34VuCDBDijzyxjS1LZ+KlWC5M=
    =gcV9
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From =?UTF-8?Q?Bela=C3=AFd?=@21:1/5 to All on Tue Jun 7 15:00:01 2022
    Bonjour,

    Petite erreur, a mon avis c'est plutôt:

    mount -o loop,rw image.img /media

    Le mar. 7 juin 2022 à 09:01, NoSpam <no-spam@tootai.net> a écrit :

    Bonjour

    mount -o loop image.img,rw /media ;ou vers tout autre point de montage

    Le 07/06/2022 à 03:55, Pierre ESTREM a écrit :
    Bonjour,

    J'ai une copie d'une clé bootable dont j'ai fait une image (image.img).

    uuidgen et tune2fs ne font cela que sur des fichiers de périphérique
    non montés.

    Sans monter les partitions de cette image, comment faire pour modifier leurs UUID ?

    pierre estrem



    <div dir="auto"><div>Bonjour,</div><div dir="auto"><br></div><div dir="auto">Petite erreur, a mon avis c&#39;est plutôt:</div><div dir="auto"><br></div><div dir="auto">mount -o loop,rw image.img   /media<br><br><div class="gmail_quote" dir="auto"><div
    dir="ltr" class="gmail_attr">Le mar. 7 juin 2022 à 09:01, NoSpam &lt;<a href="mailto:no-spam@tootai.net">no-spam@tootai.net</a>&gt; a écrit :<br></div><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"
    Bonjour<br>

    mount -o loop image.img,rw /media ;ou vers tout autre point de montage<br>

    Le 07/06/2022 à 03:55, Pierre ESTREM a écrit :<br>
    &gt; Bonjour,<br>
    &gt;<br>
    &gt; J&#39;ai une copie d&#39;une clé bootable dont j&#39;ai fait une image (image.img).<br>
    &gt;<br>
    &gt; uuidgen et tune2fs ne font cela que sur des fichiers de périphérique <br>
    &gt; non montés.<br>
    &gt;<br>
    &gt; Sans monter les partitions de cette image, comment faire pour modifier <br>
    &gt; leurs UUID ?<br>
    &gt;<br>
    &gt; pierre estrem<br>

    </blockquote></div></div></div>

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pierre ESTREM@21:1/5 to All on Tue Jun 7 16:40:01 2022
    Bonjour,

    Effectivement la partition ne doit pas être montée et là était mon problème.

    J'ai repensé à 'losetup' qui devrait faire l'affaire associée à tes
    écrits comme ;
        % sudo mlabel -N $(uuidgen) /dev/<PARTITION>

    D'autant que j'ai une ext4 et fat32 à modifier et je te remercie pour
    cette dernière ligne relative à msdos, modification qui me posait le
    plus de difficulté.

    Cordialement
    --
    pierre estrem


    Le 07/06/2022 à 11:10, Pierre Malard a écrit :
    Bonjour,

    Il n’y a pas besoin de monter une partition pour lui changer son UUID
    ; surtout pas !

    Avec un système de fichiers EXTn, la commande est :

    % sudo tune2fs -U $(uuidgen) /dev/<PARTITION>


    Avec une partition XFS :

    % sudo xfs_admin -U $(uuidgen) /dev/<PARTITION>
    Clearing log and setting UUID
    writing all SBs
    new UUID = 38d134f7-8453-41a7-b9ad-441c8ebbbced


    Avec une partition SWAP :

    % sudo mkswap -U $(uuidgen) /dev/<PARTITION>
    mkswap: /dev/sdb2 : avertissement : effacement de l'ancienne
    signature swap.
    Configure l'espace d'échange (swap) en version 1, taille = 2 GiB
    (2147479552 octets)
    pas d'étiquette, UUID=5dcce54c-0f2c-46e0-ab60-5793854ec4f5


    Avec une partition FAT :

    % sudo mlabel -N $(uuidgen) /dev/<PARTITION>


    Après on peut vérifier avec un :

    % blkid


    Bonne journée

    Le 7 juin 2022 à 03:55, Pierre ESTREM <pierre.estrem@free.fr
    <mailto:pierre.estrem@free.fr>> a écrit :

    Bonjour,

    J'ai une copie d'une clé bootable dont j'ai fait une image (image.img).

    uuidgen et tune2fs ne font cela que sur des fichiers de périphérique
    non montés.

    Sans monter les partitions de cette image, comment faire pour
    modifier leurs UUID ?

    pierre estrem


    --
    Pierre Malard

       « /La vérité ne triomphe jamais, mais ses ennemis finissent/
    /    toujours par mourir./.. »
                Max Placnk (1858-1947)
       |\     _,,,---,,_
       /,`.-'`'   -.  ;-;;,_
      |,4-  ) )-,_. ,\ (  `'-'
     '---''(_/--'  `-'\_)   πr

    perl -e '$_=q#: 3|\ 5_,3-3,2_: 3/,`.'"'"'`'"'"' 5-.  ;-;;,_:  |,A-  ) )-,_. ,\ (  `'"'"'-'"'"': '"'"'-3'"'"'2(_/--'"'"'  `-'"'"'\_): 24πr::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'
    - --> Ce message n’engage que son auteur <--


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pierre ESTREM@21:1/5 to All on Wed Jun 8 02:50:01 2022
    Bonjour,

    Après recherches et tests, concernant une FAT32 (dont l' "UUID" ne
    comporte que 8 caractères), je dois faire exactement :
    % sudo mlabel -N $(uuidgen | cut -c -8) -i /dev/loop0p1

    Ceci s'applique alors sur une FAT32 qui correspond /boot/efi (loop0p1,
    boucle chargée avec losetup).

    Je remarque que cet identifiant est de suite lisible avec :
    % sudo blkid | grep /dev/loop0p1

    pierre estrem



    Le 07/06/2022 à 11:10, Pierre Malard a écrit :
    Bonjour,

    Il n’y a pas besoin de monter une partition pour lui changer son UUID
    ; surtout pas !

    Avec un système de fichiers EXTn, la commande est :

    % sudo tune2fs -U $(uuidgen) /dev/<PARTITION>


    Avec une partition XFS :

    % sudo xfs_admin -U $(uuidgen) /dev/<PARTITION>
    Clearing log and setting UUID
    writing all SBs
    new UUID = 38d134f7-8453-41a7-b9ad-441c8ebbbced


    Avec une partition SWAP :

    % sudo mkswap -U $(uuidgen) /dev/<PARTITION>
    mkswap: /dev/sdb2 : avertissement : effacement de l'ancienne
    signature swap.
    Configure l'espace d'échange (swap) en version 1, taille = 2 GiB
    (2147479552 octets)
    pas d'étiquette, UUID=5dcce54c-0f2c-46e0-ab60-5793854ec4f5


    Avec une partition FAT :

    % sudo mlabel -N $(uuidgen) /dev/<PARTITION>


    Après on peut vérifier avec un :

    % blkid


    Bonne journée

    Le 7 juin 2022 à 03:55, Pierre ESTREM <pierre.estrem@free.fr
    <mailto:pierre.estrem@free.fr>> a écrit :

    Bonjour,

    J'ai une copie d'une clé bootable dont j'ai fait une image (image.img).

    uuidgen et tune2fs ne font cela que sur des fichiers de périphérique
    non montés.

    Sans monter les partitions de cette image, comment faire pour
    modifier leurs UUID ?

    pierre estrem


    --
    Pierre Malard

       « /La vérité ne triomphe jamais, mais ses ennemis finissent/
    /    toujours par mourir./.. »
                Max Placnk (1858-1947)
       |\     _,,,---,,_
       /,`.-'`'   -.  ;-;;,_
      |,4-  ) )-,_. ,\ (  `'-'
     '---''(_/--'  `-'\_)   πr

    perl -e '$_=q#: 3|\ 5_,3-3,2_: 3/,`.'"'"'`'"'"' 5-.  ;-;;,_:  |,A-  ) )-,_. ,\ (  `'"'"'-'"'"': '"'"'-3'"'"'2(_/--'"'"'  `-'"'"'\_): 24πr::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'
    - --> Ce message n’engage que son auteur <--


    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)
  • From Pierre Malard@21:1/5 to All on Wed Jun 8 08:00:01 2022
    --Apple-Mail=_9963F2F1-0F5A-427C-B4B6-41F527942034
    Content-Transfer-Encoding: quoted-printable
    Content-Type: text/plain;
    charset=utf-8

    Merci, effectivement

    Le 8 juin 2022 à 02:46, Pierre ESTREM <pierre.estrem@free.fr> a écrit :

    Bonjour,

    Après recherches et tests, concernant une FAT32 (dont l' "UUID" ne comporte que 8 caractères), je dois faire exactement :
    % sudo mlabel -N $(uuidgen | cut -c -8) -i /dev/loop0p1

    Ceci s'applique alors sur une FAT32 qui correspond /boot/efi (loop0p1, boucle chargée avec losetup).

    Je remarque que cet identifiant est de suite lisible avec :
    % sudo blkid | grep /dev/loop0p1

    pierre estrem



    Le 07/06/2022 à 11:10, Pierre Malard a écrit :
    Bonjour,

    Il n’y a pas besoin de monter une partition pour lui changer son UUID ; surtout pas !

    Avec un système de fichiers EXTn, la commande est :

    % sudo tune2fs -U $(uuidgen) /dev/<PARTITION>


    Avec une partition XFS :

    % sudo xfs_admin -U $(uuidgen) /dev/<PARTITION>
    Clearing log and setting UUID
    writing all SBs
    new UUID = 38d134f7-8453-41a7-b9ad-441c8ebbbced


    Avec une partition SWAP :

    % sudo mkswap -U $(uuidgen) /dev/<PARTITION>
    mkswap: /dev/sdb2 : avertissement : effacement de l'ancienne
    signature swap.
    Configure l'espace d'échange (swap) en version 1, taille = 2 GiB
    (2147479552 octets)
    pas d'étiquette, UUID=5dcce54c-0f2c-46e0-ab60-5793854ec4f5


    Avec une partition FAT :

    % sudo mlabel -N $(uuidgen) /dev/<PARTITION>


    Après on peut vérifier avec un :

    % blkid


    Bonne journée

    Le 7 juin 2022 à 03:55, Pierre ESTREM <pierre.estrem@free.fr <mailto:pierre.estrem@free.fr> <mailto:pierre.estrem@free.fr <mailto:pierre.estrem@free.fr>>> a écrit :

    Bonjour,

    J'ai une copie d'une clé bootable dont j'ai fait une image (image.img). >>>
    uuidgen et tune2fs ne font cela que sur des fichiers de périphérique non montés.

    Sans monter les partitions de cette image, comment faire pour modifier leurs UUID ?

    pierre estrem


    --
    Pierre Malard


    --
    Pierre Malard

    «A force de faire "la rue" on est devenu le caniveau»
    Abd Al Malik - Céline
    |\ _,,,---,,_
    /,`.-'`' -. ;-;;,_
    |,4- ) )-,_. ,\ ( `'-'
    '---''(_/--' `-'\_) πr

    perl -e '$_=q#: 3|\ 5_,3-3,2_: 3/,`.'"'"'`'"'"' 5-. ;-;;,_: |,A- ) )-,_. ,\ ( `'"'"'-'"'"': '"'"'-3'"'"'2(_/--'"'"' `-'"'"'\_): 24πr::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'
    - --> Ce message n’engage que son auteur <--


    --Apple-Mail=_9963F2F1-0F5A-427C-B4B6-41F527942034
    Content-Transfer-Encoding: quoted-printable
    Content-Type: text/html;
    charset=utf-8

    <html><head><meta http-equiv="Content-Type" content="text/html; charset=utf-8"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class="">Merci, effectivement<br class=""><div><br class=""><blockquote
    type="cite" class=""><div class="">Le 8 juin 2022 à 02:46, Pierre ESTREM &lt;<a href="mailto:pierre.estrem@free.fr" class="">pierre.estrem@free.fr</a>&gt; a écrit :</div><br class="Apple-interchange-newline"><div class=""><span style="caret-color: rgb(
    0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-
    text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Bonjour,</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight:
    normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-
    Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-
    decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-
    transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Après recherches et tests, concernant une FAT32 (dont l' "UUID" ne comporte que 8 caractè
    res), je dois faire exactement :</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px;
    text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps:
    normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class=
    "">% sudo mlabel -N $(uuidgen | cut -c -8) -i /dev/loop0p1</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align:
    start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal;
    font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-
    color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing:
    0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Ceci s'applique alors sur une FAT32 qui correspond /boot/efi (loop0p1, boucle chargée avec losetup).</span><br style="caret-color: rgb(0, 0, 0)
    ; font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-
    stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-
    indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-
    variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !
    important;" class="">Je remarque que cet identifiant est de suite lisible avec :</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing:
    normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size:
    11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;
    float: none; display: inline !important;" class="">% sudo blkid | grep /dev/loop0p1</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-
    spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-
    size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration:
    none;" class=""><span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none;
    white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">pierre estrem</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-
    style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br
    style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal;
    word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing:
    normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px;
    font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none;" class=""
    <span style="caret-color: rgb(0, 0, 0); font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space:
    normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; float: none; display: inline !important;" class="">Le 07/06/2022 à 11:10, Pierre Malard a écrit&nbsp;:</span><br style="caret-color: rgb(0, 0, 0); font-family: Menlo-
    Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-
    decoration: none;" class=""><blockquote type="cite" style="font-family: Menlo-Regular; font-size: 11px; font-style: normal; font-variant-caps: normal; font-weight: normal; letter-spacing: normal; orphans: auto; text-align: start; text-indent: 0px; text-
    transform: none; white-space: normal; widows: auto; word-spacing: 0px; -webkit-text-size-adjust: auto; -webkit-text-stroke-width: 0px; text-decoration: none;" class="">Bonjour,<br class=""><br class="">Il n’y a pas besoin de monter une partition pour
    lui changer son UUID ; surtout pas !<br class=""><br class="">Avec un système de fichiers EXTn, la commande est :<br class=""><br class="">&nbsp;&nbsp;&nbsp;% sudo tune2fs -U $(uuidgen) /dev/&lt;PARTITION&gt;<br class=""><br class=""><br class="">Avec
    une partition XFS :<br class=""><br class="">&nbsp;&nbsp;&nbsp;% sudo&nbsp;xfs_admin -U $(uuidgen) /dev/&lt;PARTITION&gt;<br class="">&nbsp;&nbsp;&nbsp;Clearing log and setting UUID<br class="">&nbsp;&nbsp;&nbsp;writing all SBs<br class="">&nbsp;&nbsp;&
    nbsp;new UUID = 38d134f7-8453-41a7-b9ad-441c8ebbbced<br class=""><br class=""><br class="">Avec une partition SWAP :<br class=""><br class="">&nbsp;&nbsp;&nbsp;% sudo&nbsp;mkswap -U $(uuidgen) /dev/&lt;PARTITION&gt;<br class="">&nbsp;&nbsp;&nbsp;mkswap: /
    dev/sdb2 : avertissement : effacement de l'ancienne<br class="">&nbsp;&nbsp;&nbsp;signature swap.<br class="">&nbsp;&nbsp;&nbsp;Configure l'espace d'échange (swap) en version 1, taille = 2 GiB<br class="">&nbsp;&nbsp;&nbsp;(2147479552 octets)<br class=""
    &nbsp;&nbsp;&nbsp;pas d'étiquette, UUID=5dcce54c-0f2c-46e0-ab60-5793854ec4f5<br class=""><br class=""><br class="">Avec une partition FAT :<br class=""><br class="">&nbsp;&nbsp;&nbsp;% sudo&nbsp;mlabel -N $(uuidgen) /dev/&lt;PARTITION&gt;<br class=""><
    br class=""><br class="">Après on peut vérifier avec un :<br class=""><br class="">&nbsp;&nbsp;&nbsp;% blkid<br class=""><br class=""><br class="">Bonne journée<br class=""><br class=""><blockquote type="cite" class="">Le 7 juin 2022 à 03:55, Pierre
    ESTREM &lt;<a href="mailto:pierre.estrem@free.fr" class="">pierre.estrem@free.fr</a><span class="Apple-converted-space">&nbsp;</span>&lt;<a href="mailto:pierre.estrem@free.fr" class="">mailto:pierre.estrem@free.fr</a>&gt;&gt; a écrit :<br class=""><br
    class="">Bonjour,<br class=""><br class="">J'ai une copie d'une clé bootable dont j'ai fait une image (image.img).<br class=""><br class="">uuidgen et tune2fs ne font cela que sur des fichiers de périphérique non montés.<br class=""><br class="">Sans
    monter les partitions de cette image, comment faire pour modifier leurs UUID ?<br class=""><br class="">pierre estrem<br class=""><br class=""></blockquote><br class="">--<span class="Apple-converted-space">&nbsp;</span><br class="">Pierre Malard</
    blockquote></div></blockquote><br class=""></div><br class=""><div class=""> <div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-
    wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space:
    normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="caret-color: rgb(0, 0, 0); color: rgb(0, 0, 0); letter-
    spacing: normal; text-align: start; text-indent: 0px; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; text-decoration: none; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;"
    class=""><div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-
    mode: space; line-break: after-white-space;" class=""><div dir="auto" style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px;
    word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="text-align:
    start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><div style="text-align: start; text-indent: 0px; word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><
    div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(0, 0, 0); text-decoration: none; margin: 0px; font-size: 10px; font-family: &quot;
    Courier New&quot;;" class="">--&nbsp;</div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(0, 0, 0); text-decoration: none; margin:
    0px; font-size: 10px; font-family: &quot;Courier New&quot;;" class="">Pierre Malard</div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; color:
    rgb(0, 0, 0); text-decoration: none; margin: 0px; font-size: 10px; font-family: &quot;Courier New&quot;; min-height: 11px;" class=""><div style="margin: 0px;" class=""><br class=""></div></div>&nbsp; &nbsp;«<font face="Times" class=""><i class="">A
    force de faire "la rue" on est devenu le caniveau</i></font>»<br class=""><font face="Times" size="1" class=""><span style="font-style: normal;" class="">&nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &
    nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;&nbsp;Abd Al Malik - Céline<br class=""></span></font><div style="margin: 0px;" class=""><span style="font-family: &quot;Courier New&quot;; font-size: 10px;" class="">&nbsp; &
    nbsp;|\&nbsp; &nbsp; &nbsp;&nbsp;_,,,---,,_</span></div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(0, 0, 0); text-decoration:
    none; margin: 0px; font-size: 10px; font-family: &quot;Courier New&quot;;" class="">&nbsp;&nbsp;&nbsp;/,`.-'`'&nbsp; &nbsp;&nbsp;-.&nbsp;&nbsp;;-;;,_</div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space:
    normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(0, 0, 0); text-decoration: none; margin: 0px; font-size: 10px; font-family: &quot;Courier New&quot;;" class="">&nbsp;&nbsp;|,4-&nbsp;&nbsp;) )-,_. ,\ (&nbsp;&nbsp;`'-'</div><div style="
    caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(0, 0, 0); text-decoration: none; margin: 0px; font-size: 10px; font-family: &quot;Courier New&quot;
    ;" class="">&nbsp;'---''(_/--'&nbsp;&nbsp;`-'\_) &nbsp;πr</div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px; color: rgb(0, 0, 0); text-
    decoration: none; margin: 0px; font-size: 10px; font-family: Courier; min-height: 12px;" class=""><br class=""></div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-
    stroke-width: 0px; color: rgb(0, 0, 0); text-decoration: none; margin: 0px; font-size: 10px; font-family: &quot;Courier New&quot;;" class="">perl -e '$_=q#: 3|\ 5_,3-3,2_: 3/,`.'"'"'`'"'"' 5-. &nbsp;;-;;,_: &nbsp;|,A- &nbsp;) )-,_. ,\ ( &nbsp;`'"'"'-'"'"'
    : '"'"'-3'"'"'2(_/--'"'"' &nbsp;`-'"'"'\_): 24πr::#;y#:#\n#;s#(\D)(\d+)#$1x$2#ge;print'</div><div style="caret-color: rgb(0, 0, 0); letter-spacing: normal; text-transform: none; white-space: normal; word-spacing: 0px; -webkit-text-stroke-width: 0px;
    color: rgb(0, 0, 0); text-decoration: none; margin: 0px; font-size: 10px; font-family: &quot;Courier New&quot;;" class="">- --&gt; Ce message n’engage que son auteur &lt;--</div></div></div></div></div></div></div></div></div></div></div>
    </div>

    <br class=""></body></html> --Apple-Mail=_9963F2F1-0F5A-427C-B4B6-41F527942034--

    -----BEGIN PGP SIGNATURE-----
    Version: GnuPG/MacGPG2 v2.2
    Comment: GPGTools - http://gpgtools.org

    iQIzBAEBCgAdFiEE0KHTJ+AWKhmI+acm/pSWHuad/BgFAmKgOeAACgkQ/pSWHuad /BgT7w/9FFBK4oCRaS2k9CBz0h8kOoi3HRA0WU2/UKsKPFo227mWqZEIVinmlAFK v2w6kO0WRkp5owPg1gv1BWd+Lq9wPs1MSWHe6Dtg+XL/OKxX+TzouB/VICXMrfKY IEL1xvA0THcLL/6oeFnhdGNBosTMBYyCBOak29xV3f3VOdr6+cGCr1tCOLulC5+Q lUyIgFrlfg9oNe80zdHUgKi7/Lx0CEIib1Gm7gRb/eQdgkTYsf6xuroztpslpHia KIRbQnpW3Wa+LwoLL8SH4/cqfEezzz9Q/VNu/qcebj4KsJVm237pPE0TW5m3kmSi V6Ga0qUWsBVvMOVxGFhEWgygqNA8MTGL3EUVQC/jSetbA6lP+xtjNSKx2uZSw9I4 u6bXZhTUhCqQOkg7QXLhJycz+zsdNDYdt1SJ5ZJLTxoTkiCX8N5/tqxTWsIcIVdg MFwbmAWSvSlzsNIHAvVEqixvuLmDG88YWiOXu/DtrmbOBwE89bWI9vFHDQNLbxHK E+jh064xZGT2/x2llGSnRo6yG+24KgqRqS8qG1HiXhjbbbnPoa/nLQuXtHSWcm1F p+seUJ5a3mcUFe23OtTepDIiuMtnWtqFXej+ezlvRddvAri5r69s6EmXK/RY/K/4 gORbqK6IoioQBrZDGSpmNFEwEedj+mCYtBI+8CsEWSO+wy/o4Xs=
    =pUsA
    -----END PGP SIGNATURE-----

    --- SoupGate-Win32 v1.05
    * Origin: fsxNet Usenet Gateway (21:1/5)