Contribute
Register

EFIClone - automatic backup of the EFI partition

@elfcake thank you very much for your tips - and I will pickup one of those from Amazon.

Thanks to your tip:
1) I cloned the 256gb M2 via CCC
2) I opened clover Config and mounted both EFI parts
3) I copied the EFI from the old drive to the temporary SATA drive
4) unmounted
5) shutdown
6) removed M2
7) booted on Sata and it seems to be working fine -

so now I should be able to swap in the new m2 and clone the other way.

Thank you!
 
@elfcake thank you very much for your tips - and I will pickup one of those from Amazon.

Thanks to your tip:
1) I cloned the 256gb M2 via CCC
2) I opened clover Config and mounted both EFI parts
3) I copied the EFI from the old drive to the temporary SATA drive
4) unmounted
5) shutdown
6) removed M2
7) booted on Sata and it seems to be working fine -

so now I should be able to swap in the new m2 and clone the other way.

Thank you!
Glad to help. I ask for help here frequently and I am happy to disperse the little that I know, which is not much ;)
 
Not sure why I am having this abort. How can I proceed to troubleshoot?

Code:
[Fri May 29 07:58:50 JST 2020] - ***** EFI Clone Script start
[Fri May 29 07:58:50 JST 2020] - working directory = /
[Fri May 29 07:58:50 JST 2020] - Running /Library/Application Support/com.bombich.ccc/Scripts/EFIClone-v4.sh
[Fri May 29 07:58:50 JST 2020] - The operating system is High Sierra
[Fri May 29 07:58:50 JST 2020] - Called From Carbon Copy Cloner
[Fri May 29 07:58:50 JST 2020] - 1: Source Path = /private/tmp/16777225@200529075602 but changing it to /
[Fri May 29 07:58:50 JST 2020] - 2: Destination Path = /Volumes/Clover Backup
[Fri May 29 07:58:50 JST 2020] - 3: CCC Exit Status = 0
[Fri May 29 07:58:50 JST 2020] - 4: Disk image file path =
[Fri May 29 07:58:50 JST 2020] - CCC completed with success, the EFI Clone Script will run
[Fri May 29 07:58:50 JST 2020] - CCC clone was not to a disk image. the EFI Clone Script will run
[Fri May 29 07:58:50 JST 2020] - sourceVolume = /
[Fri May 29 07:58:51 JST 2020] - sourceVolumeDisk = disk3
[Fri May 29 07:58:51 JST 2020] - destinationVolume = /Volumes/Clover Backup
[Fri May 29 07:58:51 JST 2020] - destinationVolumeDisk = disk5
[Fri May 29 07:58:53 JST 2020] - sourceEFIPartition =
[Fri May 29 07:58:55 JST 2020] - destinationEFIPartition =
[Fri May 29 07:58:55 JST 2020] - efiBootPartitionUUID =
[Fri May 29 07:58:55 JST 2020] - efiBootPartitionDisk =
[Fri May 29 07:58:55 JST 2020] - No SourceEFIPartition Found, script exiting.


thank you,
RDP
 
Not sure why I am having this abort. How can I proceed to troubleshoot?

Code:
[Fri May 29 07:58:50 JST 2020] - ***** EFI Clone Script start
[Fri May 29 07:58:50 JST 2020] - working directory = /
[Fri May 29 07:58:50 JST 2020] - Running /Library/Application Support/com.bombich.ccc/Scripts/EFIClone-v4.sh
[Fri May 29 07:58:50 JST 2020] - The operating system is High Sierra
[Fri May 29 07:58:50 JST 2020] - Called From Carbon Copy Cloner
[Fri May 29 07:58:50 JST 2020] - 1: Source Path = /private/tmp/16777225@200529075602 but changing it to /
[Fri May 29 07:58:50 JST 2020] - 2: Destination Path = /Volumes/Clover Backup
[Fri May 29 07:58:50 JST 2020] - 3: CCC Exit Status = 0
[Fri May 29 07:58:50 JST 2020] - 4: Disk image file path =
[Fri May 29 07:58:50 JST 2020] - CCC completed with success, the EFI Clone Script will run
[Fri May 29 07:58:50 JST 2020] - CCC clone was not to a disk image. the EFI Clone Script will run
[Fri May 29 07:58:50 JST 2020] - sourceVolume = /
[Fri May 29 07:58:51 JST 2020] - sourceVolumeDisk = disk3
[Fri May 29 07:58:51 JST 2020] - destinationVolume = /Volumes/Clover Backup
[Fri May 29 07:58:51 JST 2020] - destinationVolumeDisk = disk5
[Fri May 29 07:58:53 JST 2020] - sourceEFIPartition =
[Fri May 29 07:58:55 JST 2020] - destinationEFIPartition =
[Fri May 29 07:58:55 JST 2020] - efiBootPartitionUUID =
[Fri May 29 07:58:55 JST 2020] - efiBootPartitionDisk =
[Fri May 29 07:58:55 JST 2020] - No SourceEFIPartition Found, script exiting.


thank you,
RDP
Are you sure that you have an EFI folder and that it is populated?
 
Are you sure that you have an EFI folder and that it is populated?
Screen Shot 2020-05-30 at 0.53.55.png

I have two as per the attached, one which is my regular boot drive, the other the CCC backup drive, and I use Clover Configurator to mount both and copy over the folder contents to the backup drive EFI folder manually as required.

I tried mounting the volumes before running the script as well for a test, but result were the same. I assume normally you don't need to manually mount them before running CCC and the script?

thanks,
RDP
 
View attachment 472369
I have two as per the attached, one which is my regular boot drive, the other the CCC backup drive, and I use Clover Configurator to mount both and copy over the folder contents to the backup drive EFI folder manually as required.

I tried mounting the volumes before running the script as well for a test, but result were the same. I assume normally you don't need to manually mount them before running CCC and the script?

thanks,
RDP
I have not had any luck using the script although you will find that most people do so. I think that in the past, @pastrychef may have posted the process I mentioned, although I am not sure that it was he that posted the copy and paste process. Try the copy and paste process to see if you have a different result. Additionally, you do not have to mount the drive to be cloned. You choose that drive as the source in CCC.
 
Last edited:
I have not had any luck using the script although you will find that most people do so. I think that in the past, @pastrychef may have posted the process I mentioned, although I am not sure that it was he that posted the copy and paste process. Try the copy and paste process to see if you have a different result. Additionally, you do not have to mount the drive to be cloned. You choose that drive as the source in CCC.

My instructions on how to create a bootable backup can be found here.
 
My instructions on how to create a bootable backup can be found here.
Thank you @pastrychef,
I just tried your method and worked perfectly for me.
I use CCC to backup my boot drive and had been using EFIClone-v2.sh script, to backup my EFI, but lately I had been getting an error message at the end of cloning.
 
I've added a new script that will function to take an automatic snapshot of your latest working EFI partition configuration after each successful boot of your hackintosh.

This script does the following:

  1. At each boot, it mounts the EFI partition on the physical disk that is the same where your macOS boot partition resides
  2. It compares the contents of the EFI partition to the contents of the most recent "snapshot" copy of the EFI partition to see if anything has changed.
  3. If nothing has changed, it exits - only logging the fact that the script ran and that it found no changes
  4. If something has changed between the current EFI partition and the current "snapshot", it does the following:
    • Create an archive of the previous known good EFI "snapshot" and label it with a date/timestamp so that you have a history of the good EFI configurations that booted your computer
    • Copy the new "known good" contents of the EFI partition to the snapshot so that you have a good, quick recovery copy
The idea of this script is twofold. First, if you do something to your EFI partition that corrupts it, you can simply boot from any emergency EFI boot USB drive and re-copy the contents of the EFICurrent folder to the EFI partition on your boot drive and return to the last known good configuration.

Secondly, the script will keep an archive of good configurations of your EFI partition so that if you make a tweak or other change to your EFI partition that does NOT prevent booting, but that changes something else which you later find undesirable, you will have an easy way to restore whatever it is in your EFI partition that you changed.

Installation and configuration is fairly straightforward.

1. Create a directory in the root of your macOS startup volume named EFISystemRestore
2. Copy the EFISystemRestore_backup.sh file to the /EFISystemRestore/ folder you just created
3. copy com.hackintosh.EFISystemRestoreBackup.plist to /Library/LaunchDaemons/
4. Open a terminal window and key in the following two commands:

sudo launchctl load -w /Library/LaunchDaemons/com.hackintosh.EFISystemRestoreBackup.plist​
sudo chown root /Library/LaunchDaemons/com.hackintosh.EFISystemRestoreBackup.plist​
The script will create a log of its activity in the /EFISystemRestore/ folder.

Since this script is non-destructive to the current good EFI partition, I am releasing it sooner rather than later. If you experience any problems, please feel free to share experiences or questions and upload logs for me to review.

Enjoy...
@ Wombat:
Am i missing something or did you forget to link the script?
Am I going blind? lol
 
Back
Top