You can recreate the EFI System Partition (ESP) using the command-line gpt
tool. It should start at sector 40, and it should be 409600 sectors (exactly 200MiB) long. The GPT entry's type should be C12A7328-F81F-11D2-BA4B-00A0C93EC93B
, and if you have a hybrid MBR, the type there should be EE
. The format is actually a subset of FAT, not HFS+. You can read the GPT using the command sudo gpt -r show disk0
in a Terminal window, this produces output that looks something like this:
start size index contents
0 1 PMBR
1 1 Pri GPT header
2 32 Pri GPT table
34 6
40 409600 1 GPT part - C12A7328-F81F-11D2-BA4B-00A0C93EC93B
409640 447801712 2 GPT part - 48465300-0000-11AA-AA11-00306543ECAC
448211352 1269536 3 GPT part - 426F6F74-0000-11AA-AA11-00306543ECAC
449480888 40753831
490234719 32 Sec GPT table
490234751 1 Sec GPT header
You can see the correct EFI partition at index 1. If that line doesn't match exactly, the easiest way is to delete the partition in its place and recreate it.
Make sure you know what you're doing before proceeding from here - you may lose data if you mess up.
You can't edit the partition table using gpt
while partitions on the drive are mounted, so you'll need to boot from another drive (e.g. a USB stick with the OSX installer) or run the mac in target disk mode and do the partitioning from another mac. You may need to unmount any automatically mounted volumes using diskutil unmountDisk disk0
before proceeding, and in between commands.
To delete your "bad" EFI partition, run this command:
sudo gpt remove -i 1 disk0
Make sure disk0 is really the disk you want to change - the numbers can change between reboots. Also, this will only work if you already have a non-ESP partition in the place of the ESP - if not, deleting partition 1 could be disastrous! In this case, you'll need to move the indices along, as I think the ESP must have index 1. By the sound of it, this won't be necessary in your case.
Once deleted, re-add the partition with the correct layout and type:
sudo gpt add -b 40 -i 1 -s 409600 -t C12A7328-F81F-11D2-BA4B-00A0C93EC93B disk0
This should sort out the partition itself, but as you've created an HFS partition in its place, you need to fix its format as well.
The format of the EFI System Partition is documented by Apple here. As you can see, they recommend you clone an existing ESP rather than recreating the file system with newfs_msdos
. If you have an external drive with a GPT partition table (OSX install stick should have it), you can clone that.
Make sure you have your disk and partition numbers the right way around or you may overwrite data:
If disk1 is your external drive, and it contains an ESP as the first partition (disk1s1) and disk0 is the drive whose ESP (disk0s1) you want to fix, run this command:
sudo dd if=/dev/disk1s1 of=/dev/disk0s1
This will copy every single block of disk1's ESP and overwrite the corresponding block in disk0's ESP with it.
Alternatively, take a gamble with newfs_msdos
.
No, you most likely have the very same common GPU issue. Seeing the glitches multiple times is a sure tell sign.
Beneath all that drama caused by resetting and tweaking things, temperature variations on the GPU contacts were what caused the glitches and the inconsistent behaviors. Your laptop is probably in the initial phase of GPU(soldering) failure. Sooner or later the problem worsens and more severe graphic glitches will appear or the computer simply becomes unbootable.
You can try the simple steps below to stress-test the GPU, but by doing so you could be accelerating the problem and end up in an unusable state sooner. You can decide if it's in your interest to forcefully trigger the problem. Regardless, these steps are not beyond any normal operating parameters, so if your laptop is immune from the GPU problem you are not doing anything harmful by performing these steps, warranty-wise especially.
Get a temperature & fan speed monitoring app like iStat Menus that can show you fan speeds, CPU and GPU temperatures in real time.
Run a GPU benchmark app to stress the GPU. Valley or Heaven should work, for free. Keep running/looping so the GPU temperature stays around 70'C or higher, for as long as possible (hours).
You should pause the benchmark app periodically for the temperature to drop down (back to 45~50'C range). Or just turn it off at nights. Repeat the heating/cooling process until the symptoms appear.
This test might end up proving nothing, and yet it doesn't mean the GPU is trouble-free. It takes time and many temperature cycles for the solder joint problem to become apparent.
Best Answer
I'm having the same issue trying to load the AMDRadeonX3000.kext after boot.
I was able to create the force-iGPU-boot script though, by mounting the Catalina system disk as R/W in terminal: