wombat94 / EFIClone

macOS Shell Scripts to clone the EFI partition automatically from either Carbon Copy Cloner or SuperDuper! when run on a Hackintosh
GNU General Public License v2.0
73 stars 17 forks source link

Script does not detect destination EFI partition when destination volume is APFS #17

Open wrongpart opened 4 years ago

wrongpart commented 4 years ago

Hello Script exits with the following message: "Source and Destination EFI Partitions are the same. Script exiting."

Workaround is to reformat destination volume to Mac OS Extended (Journaled). It's not a big issue as it's a backup.

My config and logs:

Macintosh SSD is source and Macintosh CCC is the backup destination:
/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         256.1 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk3         255.9 GB   disk0s2

/dev/disk1 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.1 TB     disk1
   1:                        EFI EFI                     209.7 MB   disk1s1
   2:                  Apple_HFS Data                    1.0 TB     disk1s2

/dev/disk2 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *256.1 GB   disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                  Apple_HFS Macintosh CCC           255.1 GB   disk2s2
   3:                 Apple_Boot Recovery HD             650.0 MB   disk2s3

/dev/disk3 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +255.9 GB   disk3
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh SSD           145.5 GB   disk3s1
   2:                APFS Volume Preboot                 46.9 MB    disk3s2
   3:                APFS Volume Recovery                510.4 MB   disk3s3
   4:                APFS Volume VM                      2.1 GB     disk3s4

Log file:

[Wed Nov 13 19:36:55 CET 2019] - ***** EFI Clone Script start
[Wed Nov 13 19:36:55 CET 2019] - working directory = /
[Wed Nov 13 19:36:55 CET 2019] - Running /Users/Shared/EFIClone-master/EFIClone.sh
[Wed Nov 13 19:36:55 CET 2019] - Called From Carbon Copy Cloner
[Wed Nov 13 19:36:55 CET 2019] - 1: Source Path = /
[Wed Nov 13 19:36:55 CET 2019] - 2: Destination Path = /Volumes/Macintosh CCC
[Wed Nov 13 19:36:55 CET 2019] - 3: CCC Exit Status = 0
[Wed Nov 13 19:36:55 CET 2019] - 4: Disk image file path = 
[Wed Nov 13 19:36:55 CET 2019] - CCC completed with success, the EFI Clone Script will run
[Wed Nov 13 19:36:55 CET 2019] - CCC clone was not to a disk image. the EFI Clone Script will run
[Wed Nov 13 19:36:55 CET 2019] - sourceVolume = /
[Wed Nov 13 19:36:55 CET 2019] - sourceVolumeDisk = disk3
[Wed Nov 13 19:36:55 CET 2019] - destinationVolume = /Volumes/Macintosh CCC
[Wed Nov 13 19:36:55 CET 2019] - destinationVolumeDisk = disk4
[Wed Nov 13 19:36:55 CET 2019] - sourceEFIPartition = disk2s1
[Wed Nov 13 19:36:56 CET 2019] - destinationEFIPartition = disk2s1
[Wed Nov 13 19:36:56 CET 2019] - efiBootPartitionUUID = 
[Wed Nov 13 19:36:56 CET 2019] - efiBootPartitionDisk = 
[Wed Nov 13 19:36:56 CET 2019] - Source and Destination EFI Partitions are the same. Script exiting.

Excellent script, by the way, makes Hackintosh backup a lot easier !

wrongpart commented 4 years ago

The above diskutil dump is after the reformat. I forgot to copy the dump before, but here's what I think it looked like:

/dev/disk0 (internal):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                         256.1 GB   disk0
   1:                        EFI EFI                     209.7 MB   disk0s1
   2:                 Apple_APFS Container disk3         255.9 GB   disk0s2

/dev/disk1 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *1.1 TB     disk1
   1:                        EFI EFI                     209.7 MB   disk1s1
   2:                  Apple_HFS Data                    1.0 TB     disk1s2

/dev/disk2 (internal, physical):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      GUID_partition_scheme                        *255.9 GB   disk2
   1:                        EFI EFI                     209.7 MB   disk2s1
   2:                 Apple_APFS Container disk4         255.9 GB   disk2s2

/dev/disk3 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      + 256.1 GB   disk3
                                 Physical Store disk0s2
   1:                APFS Volume Macintosh SSD           145.5 GB   disk3s1
   2:                APFS Volume Preboot                 46.9 MB    disk3s2
   3:                APFS Volume Recovery                510.4 MB   disk3s3
   4:                APFS Volume VM                      2.1 GB     disk3s4

/dev/disk4 (synthesized):
   #:                       TYPE NAME                    SIZE       IDENTIFIER
   0:      APFS Container Scheme -                      +255.9 GB   disk4
                                 Physical Store disk2s2
   1:                APFS Volume Macintosh CCC           145.5 GB   disk4s1
   2:                APFS Volume Preboot                 46.9 MB    disk4s2
   3:                APFS Volume Recovery                510.4 MB   disk4s3
   4:                APFS Volume VM                      2.1 GB     disk4s4
jamiebullock commented 3 years ago

I have the same issue, but unfortunately the reformat as Mac OS Extended workaround doesn't work due to macOS 10.5 requiring that the target partition is APFS.

This is with SuperDuper!

Screenshot 2020-11-18 at 14 51 16