How to change UUID after cloning a Mac HDD with `dd`?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












After 1 day of googling and try&error I give up and ask for help.



Long story short: I cloned internal HDD of my iMac (Mid 2011) to external SDD with dd command. Now I have two identical discs connected to my Mac. SDD is connected through Thunderbold. Choosing SDD from startup manager as the boot drive has no effect and iMac continuous to boot from the slow internal HDD. I guess the problem is caused by the identical UUIDs of both drives. Before editing /etc/fstab to prevent the internal HDD from mounting I need to change the UUID. How can I do that? Moreover I am confused by the fact that each partition has a volume UUID and a partition UUID - which one has to be changed? both? or only one of them?



Full story: I want to use an external SSD connected to my iMac through Thunderbold as my primary boot drive. Further I want to deactivate the internal HDD drive without opening my iMac. I cloned the internal HDD with dd command while I booted into the iMac from Ubuntu 18.04 live USB stick. When I try to use tune2fs to change UUID I get different errors depending on which partition I touch.



sbd1
sudo tune2fs -U random /dev/sdb1
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb1
/dev/sdb1 contains a vfat file system labelled 'EFI'



sdb2
sudo tune2fs -U random /dev/sdb2
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb2
/dev/sdb2 contains a hfsplus file system labelled 'Macintosh HD'



sdb3
sudo tune2fs -U random /dev/sdb3
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb3
/dev/sdb3 contains a hfsplus file system labelled 'Recovery HD'



sbd4
sudo tune2fs -U random /dev/sdb4
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb4
/dev/sdb4 contains a ntfs file system labelled 'BOOTCAMP'



UPDATE:
I took the risk and tried gdisk to change UUIDs of the partitions on the external SSD. I used x and f options of gdisk to randomize the SSD's disk&partition UUIDs. Checking the result back on OSX using diskutil info disk1s1, ...disk1s2 etc. it seems that this has changed each Partition UUID of all partitions. But the Volume UUID of all 4 partitions remained unchanged. (The Data did not get lost btw.). But I still have the issue that my iMac does not boot from the external SSD. :(










share|improve this question























  • I assume changing UUID without loss of data - (it this is possible at all) because cloning the internal 1TB HDD takes me more than three hours :(
    – Tset Noitamotua
    Aug 26 at 17:15











  • tune2fs is only for ext2/3/4 filesystems, nor ntfs, hfs or fat.
    – Ipor Sircer
    Aug 26 at 17:18










  • oh damn, so what do I need in my case?
    – Tset Noitamotua
    Aug 26 at 17:25










  • I also tried hfs.util from OSX ... sudo /System/Library/Filesystems/hfs.fs/Contents/Resources/hfs.util -s /dev/disk4 as described here without success
    – Tset Noitamotua
    Aug 26 at 17:28











  • Another optionn I saw was gdisk like in this example. But I am afraid to try it because of possible data loss.
    – Tset Noitamotua
    Aug 26 at 17:32














up vote
0
down vote

favorite












After 1 day of googling and try&error I give up and ask for help.



Long story short: I cloned internal HDD of my iMac (Mid 2011) to external SDD with dd command. Now I have two identical discs connected to my Mac. SDD is connected through Thunderbold. Choosing SDD from startup manager as the boot drive has no effect and iMac continuous to boot from the slow internal HDD. I guess the problem is caused by the identical UUIDs of both drives. Before editing /etc/fstab to prevent the internal HDD from mounting I need to change the UUID. How can I do that? Moreover I am confused by the fact that each partition has a volume UUID and a partition UUID - which one has to be changed? both? or only one of them?



Full story: I want to use an external SSD connected to my iMac through Thunderbold as my primary boot drive. Further I want to deactivate the internal HDD drive without opening my iMac. I cloned the internal HDD with dd command while I booted into the iMac from Ubuntu 18.04 live USB stick. When I try to use tune2fs to change UUID I get different errors depending on which partition I touch.



sbd1
sudo tune2fs -U random /dev/sdb1
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb1
/dev/sdb1 contains a vfat file system labelled 'EFI'



sdb2
sudo tune2fs -U random /dev/sdb2
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb2
/dev/sdb2 contains a hfsplus file system labelled 'Macintosh HD'



sdb3
sudo tune2fs -U random /dev/sdb3
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb3
/dev/sdb3 contains a hfsplus file system labelled 'Recovery HD'



sbd4
sudo tune2fs -U random /dev/sdb4
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb4
/dev/sdb4 contains a ntfs file system labelled 'BOOTCAMP'



UPDATE:
I took the risk and tried gdisk to change UUIDs of the partitions on the external SSD. I used x and f options of gdisk to randomize the SSD's disk&partition UUIDs. Checking the result back on OSX using diskutil info disk1s1, ...disk1s2 etc. it seems that this has changed each Partition UUID of all partitions. But the Volume UUID of all 4 partitions remained unchanged. (The Data did not get lost btw.). But I still have the issue that my iMac does not boot from the external SSD. :(










share|improve this question























  • I assume changing UUID without loss of data - (it this is possible at all) because cloning the internal 1TB HDD takes me more than three hours :(
    – Tset Noitamotua
    Aug 26 at 17:15











  • tune2fs is only for ext2/3/4 filesystems, nor ntfs, hfs or fat.
    – Ipor Sircer
    Aug 26 at 17:18










  • oh damn, so what do I need in my case?
    – Tset Noitamotua
    Aug 26 at 17:25










  • I also tried hfs.util from OSX ... sudo /System/Library/Filesystems/hfs.fs/Contents/Resources/hfs.util -s /dev/disk4 as described here without success
    – Tset Noitamotua
    Aug 26 at 17:28











  • Another optionn I saw was gdisk like in this example. But I am afraid to try it because of possible data loss.
    – Tset Noitamotua
    Aug 26 at 17:32












up vote
0
down vote

favorite









up vote
0
down vote

favorite











After 1 day of googling and try&error I give up and ask for help.



Long story short: I cloned internal HDD of my iMac (Mid 2011) to external SDD with dd command. Now I have two identical discs connected to my Mac. SDD is connected through Thunderbold. Choosing SDD from startup manager as the boot drive has no effect and iMac continuous to boot from the slow internal HDD. I guess the problem is caused by the identical UUIDs of both drives. Before editing /etc/fstab to prevent the internal HDD from mounting I need to change the UUID. How can I do that? Moreover I am confused by the fact that each partition has a volume UUID and a partition UUID - which one has to be changed? both? or only one of them?



Full story: I want to use an external SSD connected to my iMac through Thunderbold as my primary boot drive. Further I want to deactivate the internal HDD drive without opening my iMac. I cloned the internal HDD with dd command while I booted into the iMac from Ubuntu 18.04 live USB stick. When I try to use tune2fs to change UUID I get different errors depending on which partition I touch.



sbd1
sudo tune2fs -U random /dev/sdb1
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb1
/dev/sdb1 contains a vfat file system labelled 'EFI'



sdb2
sudo tune2fs -U random /dev/sdb2
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb2
/dev/sdb2 contains a hfsplus file system labelled 'Macintosh HD'



sdb3
sudo tune2fs -U random /dev/sdb3
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb3
/dev/sdb3 contains a hfsplus file system labelled 'Recovery HD'



sbd4
sudo tune2fs -U random /dev/sdb4
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb4
/dev/sdb4 contains a ntfs file system labelled 'BOOTCAMP'



UPDATE:
I took the risk and tried gdisk to change UUIDs of the partitions on the external SSD. I used x and f options of gdisk to randomize the SSD's disk&partition UUIDs. Checking the result back on OSX using diskutil info disk1s1, ...disk1s2 etc. it seems that this has changed each Partition UUID of all partitions. But the Volume UUID of all 4 partitions remained unchanged. (The Data did not get lost btw.). But I still have the issue that my iMac does not boot from the external SSD. :(










share|improve this question















After 1 day of googling and try&error I give up and ask for help.



Long story short: I cloned internal HDD of my iMac (Mid 2011) to external SDD with dd command. Now I have two identical discs connected to my Mac. SDD is connected through Thunderbold. Choosing SDD from startup manager as the boot drive has no effect and iMac continuous to boot from the slow internal HDD. I guess the problem is caused by the identical UUIDs of both drives. Before editing /etc/fstab to prevent the internal HDD from mounting I need to change the UUID. How can I do that? Moreover I am confused by the fact that each partition has a volume UUID and a partition UUID - which one has to be changed? both? or only one of them?



Full story: I want to use an external SSD connected to my iMac through Thunderbold as my primary boot drive. Further I want to deactivate the internal HDD drive without opening my iMac. I cloned the internal HDD with dd command while I booted into the iMac from Ubuntu 18.04 live USB stick. When I try to use tune2fs to change UUID I get different errors depending on which partition I touch.



sbd1
sudo tune2fs -U random /dev/sdb1
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb1
/dev/sdb1 contains a vfat file system labelled 'EFI'



sdb2
sudo tune2fs -U random /dev/sdb2
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb2
/dev/sdb2 contains a hfsplus file system labelled 'Macintosh HD'



sdb3
sudo tune2fs -U random /dev/sdb3
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb3
/dev/sdb3 contains a hfsplus file system labelled 'Recovery HD'



sbd4
sudo tune2fs -U random /dev/sdb4
tune2fs 1.44.1 (24-Mar-2018)
tune2fs: Bad magic number in super-block while trying to open /dev/sdb4
/dev/sdb4 contains a ntfs file system labelled 'BOOTCAMP'



UPDATE:
I took the risk and tried gdisk to change UUIDs of the partitions on the external SSD. I used x and f options of gdisk to randomize the SSD's disk&partition UUIDs. Checking the result back on OSX using diskutil info disk1s1, ...disk1s2 etc. it seems that this has changed each Partition UUID of all partitions. But the Volume UUID of all 4 partitions remained unchanged. (The Data did not get lost btw.). But I still have the issue that my iMac does not boot from the external SSD. :(







dd macintosh uuid hfs+






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Sep 9 at 20:56









Rui F Ribeiro

36.7k1271117




36.7k1271117










asked Aug 26 at 17:13









Tset Noitamotua

1013




1013











  • I assume changing UUID without loss of data - (it this is possible at all) because cloning the internal 1TB HDD takes me more than three hours :(
    – Tset Noitamotua
    Aug 26 at 17:15











  • tune2fs is only for ext2/3/4 filesystems, nor ntfs, hfs or fat.
    – Ipor Sircer
    Aug 26 at 17:18










  • oh damn, so what do I need in my case?
    – Tset Noitamotua
    Aug 26 at 17:25










  • I also tried hfs.util from OSX ... sudo /System/Library/Filesystems/hfs.fs/Contents/Resources/hfs.util -s /dev/disk4 as described here without success
    – Tset Noitamotua
    Aug 26 at 17:28











  • Another optionn I saw was gdisk like in this example. But I am afraid to try it because of possible data loss.
    – Tset Noitamotua
    Aug 26 at 17:32
















  • I assume changing UUID without loss of data - (it this is possible at all) because cloning the internal 1TB HDD takes me more than three hours :(
    – Tset Noitamotua
    Aug 26 at 17:15











  • tune2fs is only for ext2/3/4 filesystems, nor ntfs, hfs or fat.
    – Ipor Sircer
    Aug 26 at 17:18










  • oh damn, so what do I need in my case?
    – Tset Noitamotua
    Aug 26 at 17:25










  • I also tried hfs.util from OSX ... sudo /System/Library/Filesystems/hfs.fs/Contents/Resources/hfs.util -s /dev/disk4 as described here without success
    – Tset Noitamotua
    Aug 26 at 17:28











  • Another optionn I saw was gdisk like in this example. But I am afraid to try it because of possible data loss.
    – Tset Noitamotua
    Aug 26 at 17:32















I assume changing UUID without loss of data - (it this is possible at all) because cloning the internal 1TB HDD takes me more than three hours :(
– Tset Noitamotua
Aug 26 at 17:15





I assume changing UUID without loss of data - (it this is possible at all) because cloning the internal 1TB HDD takes me more than three hours :(
– Tset Noitamotua
Aug 26 at 17:15













tune2fs is only for ext2/3/4 filesystems, nor ntfs, hfs or fat.
– Ipor Sircer
Aug 26 at 17:18




tune2fs is only for ext2/3/4 filesystems, nor ntfs, hfs or fat.
– Ipor Sircer
Aug 26 at 17:18












oh damn, so what do I need in my case?
– Tset Noitamotua
Aug 26 at 17:25




oh damn, so what do I need in my case?
– Tset Noitamotua
Aug 26 at 17:25












I also tried hfs.util from OSX ... sudo /System/Library/Filesystems/hfs.fs/Contents/Resources/hfs.util -s /dev/disk4 as described here without success
– Tset Noitamotua
Aug 26 at 17:28





I also tried hfs.util from OSX ... sudo /System/Library/Filesystems/hfs.fs/Contents/Resources/hfs.util -s /dev/disk4 as described here without success
– Tset Noitamotua
Aug 26 at 17:28













Another optionn I saw was gdisk like in this example. But I am afraid to try it because of possible data loss.
– Tset Noitamotua
Aug 26 at 17:32




Another optionn I saw was gdisk like in this example. But I am afraid to try it because of possible data loss.
– Tset Noitamotua
Aug 26 at 17:32










1 Answer
1






active

oldest

votes

















up vote
0
down vote













I managed to change UUID of the most important partition with hfs.util and now I am finally able to boot from my external SSD. It was the partition which holds the Mac OS (El Capitan). If you cloned your internal HDD with dd like me it probably is named Macintosh HD



You need to find out the IDENTIFIER of the partition which you want to change UUID of.
Try diskutil list command and get something like this:



>diskutil list
/dev/disk0 (internal, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk0
1: EFI EFI 209.7 MB disk0s1
2: Apple_HFS Macintosh HD 699.3 GB disk0s2
3: Apple_Boot Recovery HD 650.0 MB disk0s3
4: Microsoft Basic Data BOOTCAMP 300.0 GB disk0s4
/dev/disk1 (external, physical):
#: TYPE NAME SIZE IDENTIFIER
0: GUID_partition_scheme *1.0 TB disk1
1: EFI EFI 209.7 MB disk1s1
2: Apple_HFS MacOSX 699.3 GB disk1s2
3: Apple_Boot Recovery HD 650.0 MB disk1s3
4: Microsoft Basic Data BOOTCAMP 300.0 GB disk1s4



In my case it's disk1s2 with NAME MacOSX (I have renamed it from default during my experiments to mitigate confusion).



Before trying to change UUID you have to unmount this partition or the whole drive




unmount partition



>diskutil unmount force /dev/disk1s2



or the whole drive



diskutil unmountDisk disk1
Unmount of all volumes on disk0 was successful




Finally change UUID with hfs.util and remount the disk/partition.
The -s option will generate and set a random UUID.




>sudo /System/Library/Filesystems/hfs.fs/Contents/Resources/hfs.fs/hfs.util -s disk1s2



diskutil mountDisk disk1
or
diskutil mount disk1s2




Use disutil info disk1s2 and diskutil info disk0s2 to compare Volume UUID of internal external drive's partitions.



To boot from external SSD restart your Mac and while it restarts hold down the alt key on your keyboard (also called OPTIONS key) until you hear the boot sound. Choose your external drive (orange icon!).



With df command in terminal you can check whether your external drive is the boot drive



>df

Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
/dev/disk1s2 1365908480 651731032 713665448 48% 81530377 89208181 48% /
devfs 379 379 0 100% 657 0 100% /dev
map -hosts 0 0 0 100% 0 0 100% /net
map auto_home 0 0 0 100% 0 0 100% /home
/dev/disk1s4 585932792 83152520 502780272 15% 284666 251392190 0% /Volumes/BOOTCAMP 1
/dev/disk0s2 1365908480 644697952 721210528 48% 80587242 90151316 47% /Volumes/Macintosh HD
/dev/disk0s4 585932792 83152520 502780272 15% 284666 251392190 0% /Volumes/BOOTCAMP



As you can see now /dev/disk1s2 is mounted to / which means it is my boot or root drive.



From here u might be interested in how to spin down the internal HDD or how to prevent it from mounting at boot at all.




spin down: https://superuser.com/questions/251969/disable-or-sleep-secondary-hard-drive-in-macbook



do not mount on boot: https://discussions.apple.com/thread/3686350







share|improve this answer




















    Your Answer







    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "106"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    convertImagesToLinks: false,
    noModals: false,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: null,
    bindNavPrevention: true,
    postfix: "",
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













     

    draft saved


    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f464942%2fhow-to-change-uuid-after-cloning-a-mac-hdd-with-dd%23new-answer', 'question_page');

    );

    Post as a guest






























    1 Answer
    1






    active

    oldest

    votes








    1 Answer
    1






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes








    up vote
    0
    down vote













    I managed to change UUID of the most important partition with hfs.util and now I am finally able to boot from my external SSD. It was the partition which holds the Mac OS (El Capitan). If you cloned your internal HDD with dd like me it probably is named Macintosh HD



    You need to find out the IDENTIFIER of the partition which you want to change UUID of.
    Try diskutil list command and get something like this:



    >diskutil list
    /dev/disk0 (internal, physical):
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *1.0 TB disk0
    1: EFI EFI 209.7 MB disk0s1
    2: Apple_HFS Macintosh HD 699.3 GB disk0s2
    3: Apple_Boot Recovery HD 650.0 MB disk0s3
    4: Microsoft Basic Data BOOTCAMP 300.0 GB disk0s4
    /dev/disk1 (external, physical):
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *1.0 TB disk1
    1: EFI EFI 209.7 MB disk1s1
    2: Apple_HFS MacOSX 699.3 GB disk1s2
    3: Apple_Boot Recovery HD 650.0 MB disk1s3
    4: Microsoft Basic Data BOOTCAMP 300.0 GB disk1s4



    In my case it's disk1s2 with NAME MacOSX (I have renamed it from default during my experiments to mitigate confusion).



    Before trying to change UUID you have to unmount this partition or the whole drive




    unmount partition



    >diskutil unmount force /dev/disk1s2



    or the whole drive



    diskutil unmountDisk disk1
    Unmount of all volumes on disk0 was successful




    Finally change UUID with hfs.util and remount the disk/partition.
    The -s option will generate and set a random UUID.




    >sudo /System/Library/Filesystems/hfs.fs/Contents/Resources/hfs.fs/hfs.util -s disk1s2



    diskutil mountDisk disk1
    or
    diskutil mount disk1s2




    Use disutil info disk1s2 and diskutil info disk0s2 to compare Volume UUID of internal external drive's partitions.



    To boot from external SSD restart your Mac and while it restarts hold down the alt key on your keyboard (also called OPTIONS key) until you hear the boot sound. Choose your external drive (orange icon!).



    With df command in terminal you can check whether your external drive is the boot drive



    >df

    Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
    /dev/disk1s2 1365908480 651731032 713665448 48% 81530377 89208181 48% /
    devfs 379 379 0 100% 657 0 100% /dev
    map -hosts 0 0 0 100% 0 0 100% /net
    map auto_home 0 0 0 100% 0 0 100% /home
    /dev/disk1s4 585932792 83152520 502780272 15% 284666 251392190 0% /Volumes/BOOTCAMP 1
    /dev/disk0s2 1365908480 644697952 721210528 48% 80587242 90151316 47% /Volumes/Macintosh HD
    /dev/disk0s4 585932792 83152520 502780272 15% 284666 251392190 0% /Volumes/BOOTCAMP



    As you can see now /dev/disk1s2 is mounted to / which means it is my boot or root drive.



    From here u might be interested in how to spin down the internal HDD or how to prevent it from mounting at boot at all.




    spin down: https://superuser.com/questions/251969/disable-or-sleep-secondary-hard-drive-in-macbook



    do not mount on boot: https://discussions.apple.com/thread/3686350







    share|improve this answer
























      up vote
      0
      down vote













      I managed to change UUID of the most important partition with hfs.util and now I am finally able to boot from my external SSD. It was the partition which holds the Mac OS (El Capitan). If you cloned your internal HDD with dd like me it probably is named Macintosh HD



      You need to find out the IDENTIFIER of the partition which you want to change UUID of.
      Try diskutil list command and get something like this:



      >diskutil list
      /dev/disk0 (internal, physical):
      #: TYPE NAME SIZE IDENTIFIER
      0: GUID_partition_scheme *1.0 TB disk0
      1: EFI EFI 209.7 MB disk0s1
      2: Apple_HFS Macintosh HD 699.3 GB disk0s2
      3: Apple_Boot Recovery HD 650.0 MB disk0s3
      4: Microsoft Basic Data BOOTCAMP 300.0 GB disk0s4
      /dev/disk1 (external, physical):
      #: TYPE NAME SIZE IDENTIFIER
      0: GUID_partition_scheme *1.0 TB disk1
      1: EFI EFI 209.7 MB disk1s1
      2: Apple_HFS MacOSX 699.3 GB disk1s2
      3: Apple_Boot Recovery HD 650.0 MB disk1s3
      4: Microsoft Basic Data BOOTCAMP 300.0 GB disk1s4



      In my case it's disk1s2 with NAME MacOSX (I have renamed it from default during my experiments to mitigate confusion).



      Before trying to change UUID you have to unmount this partition or the whole drive




      unmount partition



      >diskutil unmount force /dev/disk1s2



      or the whole drive



      diskutil unmountDisk disk1
      Unmount of all volumes on disk0 was successful




      Finally change UUID with hfs.util and remount the disk/partition.
      The -s option will generate and set a random UUID.




      >sudo /System/Library/Filesystems/hfs.fs/Contents/Resources/hfs.fs/hfs.util -s disk1s2



      diskutil mountDisk disk1
      or
      diskutil mount disk1s2




      Use disutil info disk1s2 and diskutil info disk0s2 to compare Volume UUID of internal external drive's partitions.



      To boot from external SSD restart your Mac and while it restarts hold down the alt key on your keyboard (also called OPTIONS key) until you hear the boot sound. Choose your external drive (orange icon!).



      With df command in terminal you can check whether your external drive is the boot drive



      >df

      Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
      /dev/disk1s2 1365908480 651731032 713665448 48% 81530377 89208181 48% /
      devfs 379 379 0 100% 657 0 100% /dev
      map -hosts 0 0 0 100% 0 0 100% /net
      map auto_home 0 0 0 100% 0 0 100% /home
      /dev/disk1s4 585932792 83152520 502780272 15% 284666 251392190 0% /Volumes/BOOTCAMP 1
      /dev/disk0s2 1365908480 644697952 721210528 48% 80587242 90151316 47% /Volumes/Macintosh HD
      /dev/disk0s4 585932792 83152520 502780272 15% 284666 251392190 0% /Volumes/BOOTCAMP



      As you can see now /dev/disk1s2 is mounted to / which means it is my boot or root drive.



      From here u might be interested in how to spin down the internal HDD or how to prevent it from mounting at boot at all.




      spin down: https://superuser.com/questions/251969/disable-or-sleep-secondary-hard-drive-in-macbook



      do not mount on boot: https://discussions.apple.com/thread/3686350







      share|improve this answer






















        up vote
        0
        down vote










        up vote
        0
        down vote









        I managed to change UUID of the most important partition with hfs.util and now I am finally able to boot from my external SSD. It was the partition which holds the Mac OS (El Capitan). If you cloned your internal HDD with dd like me it probably is named Macintosh HD



        You need to find out the IDENTIFIER of the partition which you want to change UUID of.
        Try diskutil list command and get something like this:



        >diskutil list
        /dev/disk0 (internal, physical):
        #: TYPE NAME SIZE IDENTIFIER
        0: GUID_partition_scheme *1.0 TB disk0
        1: EFI EFI 209.7 MB disk0s1
        2: Apple_HFS Macintosh HD 699.3 GB disk0s2
        3: Apple_Boot Recovery HD 650.0 MB disk0s3
        4: Microsoft Basic Data BOOTCAMP 300.0 GB disk0s4
        /dev/disk1 (external, physical):
        #: TYPE NAME SIZE IDENTIFIER
        0: GUID_partition_scheme *1.0 TB disk1
        1: EFI EFI 209.7 MB disk1s1
        2: Apple_HFS MacOSX 699.3 GB disk1s2
        3: Apple_Boot Recovery HD 650.0 MB disk1s3
        4: Microsoft Basic Data BOOTCAMP 300.0 GB disk1s4



        In my case it's disk1s2 with NAME MacOSX (I have renamed it from default during my experiments to mitigate confusion).



        Before trying to change UUID you have to unmount this partition or the whole drive




        unmount partition



        >diskutil unmount force /dev/disk1s2



        or the whole drive



        diskutil unmountDisk disk1
        Unmount of all volumes on disk0 was successful




        Finally change UUID with hfs.util and remount the disk/partition.
        The -s option will generate and set a random UUID.




        >sudo /System/Library/Filesystems/hfs.fs/Contents/Resources/hfs.fs/hfs.util -s disk1s2



        diskutil mountDisk disk1
        or
        diskutil mount disk1s2




        Use disutil info disk1s2 and diskutil info disk0s2 to compare Volume UUID of internal external drive's partitions.



        To boot from external SSD restart your Mac and while it restarts hold down the alt key on your keyboard (also called OPTIONS key) until you hear the boot sound. Choose your external drive (orange icon!).



        With df command in terminal you can check whether your external drive is the boot drive



        >df

        Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
        /dev/disk1s2 1365908480 651731032 713665448 48% 81530377 89208181 48% /
        devfs 379 379 0 100% 657 0 100% /dev
        map -hosts 0 0 0 100% 0 0 100% /net
        map auto_home 0 0 0 100% 0 0 100% /home
        /dev/disk1s4 585932792 83152520 502780272 15% 284666 251392190 0% /Volumes/BOOTCAMP 1
        /dev/disk0s2 1365908480 644697952 721210528 48% 80587242 90151316 47% /Volumes/Macintosh HD
        /dev/disk0s4 585932792 83152520 502780272 15% 284666 251392190 0% /Volumes/BOOTCAMP



        As you can see now /dev/disk1s2 is mounted to / which means it is my boot or root drive.



        From here u might be interested in how to spin down the internal HDD or how to prevent it from mounting at boot at all.




        spin down: https://superuser.com/questions/251969/disable-or-sleep-secondary-hard-drive-in-macbook



        do not mount on boot: https://discussions.apple.com/thread/3686350







        share|improve this answer












        I managed to change UUID of the most important partition with hfs.util and now I am finally able to boot from my external SSD. It was the partition which holds the Mac OS (El Capitan). If you cloned your internal HDD with dd like me it probably is named Macintosh HD



        You need to find out the IDENTIFIER of the partition which you want to change UUID of.
        Try diskutil list command and get something like this:



        >diskutil list
        /dev/disk0 (internal, physical):
        #: TYPE NAME SIZE IDENTIFIER
        0: GUID_partition_scheme *1.0 TB disk0
        1: EFI EFI 209.7 MB disk0s1
        2: Apple_HFS Macintosh HD 699.3 GB disk0s2
        3: Apple_Boot Recovery HD 650.0 MB disk0s3
        4: Microsoft Basic Data BOOTCAMP 300.0 GB disk0s4
        /dev/disk1 (external, physical):
        #: TYPE NAME SIZE IDENTIFIER
        0: GUID_partition_scheme *1.0 TB disk1
        1: EFI EFI 209.7 MB disk1s1
        2: Apple_HFS MacOSX 699.3 GB disk1s2
        3: Apple_Boot Recovery HD 650.0 MB disk1s3
        4: Microsoft Basic Data BOOTCAMP 300.0 GB disk1s4



        In my case it's disk1s2 with NAME MacOSX (I have renamed it from default during my experiments to mitigate confusion).



        Before trying to change UUID you have to unmount this partition or the whole drive




        unmount partition



        >diskutil unmount force /dev/disk1s2



        or the whole drive



        diskutil unmountDisk disk1
        Unmount of all volumes on disk0 was successful




        Finally change UUID with hfs.util and remount the disk/partition.
        The -s option will generate and set a random UUID.




        >sudo /System/Library/Filesystems/hfs.fs/Contents/Resources/hfs.fs/hfs.util -s disk1s2



        diskutil mountDisk disk1
        or
        diskutil mount disk1s2




        Use disutil info disk1s2 and diskutil info disk0s2 to compare Volume UUID of internal external drive's partitions.



        To boot from external SSD restart your Mac and while it restarts hold down the alt key on your keyboard (also called OPTIONS key) until you hear the boot sound. Choose your external drive (orange icon!).



        With df command in terminal you can check whether your external drive is the boot drive



        >df

        Filesystem 512-blocks Used Available Capacity iused ifree %iused Mounted on
        /dev/disk1s2 1365908480 651731032 713665448 48% 81530377 89208181 48% /
        devfs 379 379 0 100% 657 0 100% /dev
        map -hosts 0 0 0 100% 0 0 100% /net
        map auto_home 0 0 0 100% 0 0 100% /home
        /dev/disk1s4 585932792 83152520 502780272 15% 284666 251392190 0% /Volumes/BOOTCAMP 1
        /dev/disk0s2 1365908480 644697952 721210528 48% 80587242 90151316 47% /Volumes/Macintosh HD
        /dev/disk0s4 585932792 83152520 502780272 15% 284666 251392190 0% /Volumes/BOOTCAMP



        As you can see now /dev/disk1s2 is mounted to / which means it is my boot or root drive.



        From here u might be interested in how to spin down the internal HDD or how to prevent it from mounting at boot at all.




        spin down: https://superuser.com/questions/251969/disable-or-sleep-secondary-hard-drive-in-macbook



        do not mount on boot: https://discussions.apple.com/thread/3686350








        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered Aug 26 at 23:25









        Tset Noitamotua

        1013




        1013



























             

            draft saved


            draft discarded















































             


            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f464942%2fhow-to-change-uuid-after-cloning-a-mac-hdd-with-dd%23new-answer', 'question_page');

            );

            Post as a guest













































































            Popular posts from this blog

            How to check contact read email or not when send email to Individual?

            Bahrain

            Postfix configuration issue with fips on centos 7; mailgun relay