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:
- At each boot, it mounts the EFI partition on the physical disk that is the same where your macOS boot partition resides
- 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.
- If nothing has changed, it exits - only logging the fact that the script ran and that it found no changes
- 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...