Contribute
Register

[Solved] Create EFI partition and add whatever needs adding

Status
Not open for further replies.
Joined
Jan 6, 2015
Messages
99
Motherboard
Gigabyte GA-z97x-UD3H
CPU
i5-4590
Graphics
RX 580
Mac
  1. iMac
  2. MacBook Pro
Classic Mac
  1. LC
  2. PowerBook
Mobile Phone
  1. iOS
I've been having a bit of a nightmare with my system... all sorts of things are wrong. But along the way, trying to fix things, I decided that Clover had become corrupted on my various disks and tried to clear everything from the EFI partitions. In doing so, I seem to have deleted some of them entirely, without recreating them as I though would happen with the process I was following.

The disks in question don't now even show up when I open EFI Mounter v3. They do work in MacOS, but they are not working when I tried to turn them into boot disks using UniBeast (the process runs and stuff installs, but they won't boot the hackinstosh - it just asks me to install boot media).

So, I need a way to completely wipe USB sticks and an SSD or two, and recreate the EFI partitions, then start from scratch with clean installs. But how do I recover the EFI partitions?

Some things you should know: I don't have access to Windows or Linux. I do have a working macbook. My Hackintosh is currently borked until I can get things back in order.

Can anyone help? Preferably with something clear and easy to follow!
 
Update... using diskutil I have discovered the disks do have an EFI folder, but I think it's corrupted or wrongly formatted. EFI mounter won't mount them [ "Event Handler Failed (-10000)" ]. This is what diskutil reveals about the USB stick, which has been through the Unibeast creation process successfully (at least with no errors reported), but which won't boot my Hackintosh:

/dev/disk3 (external, physical):

#: TYPE NAME SIZE IDENTIFIER

0: GUID_partition_scheme *15.6 GB disk3

1: EFI 209.7 MB disk3s1

2: Apple_HFS UNTITLED 15.0 GB disk3s2

Does anyone know an alternative way to mount the EFI partition to check the contents? Or a way to correctly format the EFI partition?
 
Think I have solved my problem. For the record, in case anyone else has a similar issue:

Your EFI partition needs to be formatted to FAT32. If it isn't, even erasing the disk and doing a clean install of the OS will not reformat and recreate your EFI partition and the essential components. (Information that boots the computer.)

On this site I found the following terminal command which reformats a disk to FAT32. Use carefully - make certain you have the right disk number. Don't just copy and paste this blind. Check and change the disk number or you'll really regret it.

You can find the correct disk number from disk utility or using the terminal command: diskutil

Don't assume the number always stays the same. It changes, especially if you are swapping disks around, which often happens in a 'crisis' situation.

Once you're sure, enter the following in Terminal (but you delete the '?' and enter the correct number for the disk which has the wrongly formatted EFI drive. The 's1' remains the same no matter what the number of the disk.):

sudo newfs_msdos -v EFI -F 32 /dev/rdisk?s1

Check that works and you can now load the EFI partition using EFI Mounter (you can download that on this site). The partition will be empty. You'll need to add an EFI folder from somewhere. Ideally you'll have an EFI backup. Clover Configurator seems to create a backup automatically before you do an update. That's what I used, and did a simple drag and drop. There are probably better ways of doing it, but it worked both for a USB stick which I turned into a Unibeast installer, and for an SSD which already had a clean install of OSX High Sierra on it. The SSD now boots all on its own.

Good luck, and please remember I'm not an expert and don't know what I'm talking about. If others have a better plan, I'd listen to that first.
 
Think I have solved my problem. For the record, in case anyone else has a similar issue:

Your EFI partition needs to be formatted to FAT32. If it isn't, even erasing the disk and doing a clean install of the OS will not reformat and recreate your EFI partition and the essential components. (Information that boots the computer.)

On this site I found the following terminal command which reformats a disk to FAT32. Use carefully - make certain you have the right disk number. Don't just copy and paste this blind. Check and change the disk number or you'll really regret it.

You can find the correct disk number from disk utility or using the terminal command: diskutil

Don't assume the number always stays the same. It changes, especially if you are swapping disks around, which often happens in a 'crisis' situation.

Once you're sure, enter the following in Terminal (but you delete the '?' and enter the correct number for the disk which has the wrongly formatted EFI drive. The 's1' remains the same no matter what the number of the disk.):

sudo newfs_msdos -v EFI -F 32 /dev/rdisk?s1

Check that works and you can now load the EFI partition using EFI Mounter (you can download that on this site). The partition will be empty. You'll need to add an EFI folder from somewhere. Ideally you'll have an EFI backup. Clover Configurator seems to create a backup automatically before you do an update. That's what I used, and did a simple drag and drop. There are probably better ways of doing it, but it worked both for a USB stick which I turned into a Unibeast installer, and for an SSD which already had a clean install of OSX High Sierra on it. The SSD now boots all on its own.

Good luck, and please remember I'm not an expert and don't know what I'm talking about. If others have a better plan, I'd listen to that first.

Hi Simon,
Thanks for your help, but to be able to access terminal, one has to boot up the OS first! How were you able to access terminal from clover boot manager's screen? Many thanks
 
Mohsy, I have a Macbook. So I removed the hard drive from my hackintosh and put it into a hard drive enclosure and mounted it on the macbook, then used Terminal from there. If you don't have a second mac, then I agree this is not going to work.

I think the first thing you should do, however, is go through the first post on that other thread. My problems were the same as their's but I messed things up, and essentially found a way to roll back to a previous install of Clover. The threads there show directly how to fix the problem. The link is:

https://www.tonymacx86.com/threads/solved-clover-update-r4586-disables-os-boot-black-screen.256050/
 
Mohsy, I have a Macbook. So I removed the hard drive from my hackintosh and put it into a hard drive enclosure and mounted it on the macbook, then used Terminal from there. If you don't have a second mac, then I agree this is not going to work.

I think the first thing you should do, however, is go through the first post on that other thread. My problems were the same as their's but I messed things up, and essentially found a way to roll back to a previous install of Clover. The threads there show directly how to fix the problem. The link is:

https://www.tonymacx86.com/threads/solved-clover-update-r4586-disables-os-boot-black-screen.256050/

Thanks, Simon, for responding. I did try the suggestion proposed on the link (checking the EFI bios in clover shell screen) but was unable to open any of the displayed partition - received error message ("FS# is not recognised as an internal or external command! operable program! or script file") instead when I typed in FS# (#=EFI partition number) in clover shell screen. It actually referred to the partition as 'alias'. Could it be because I had earlier cleared the multiple boot configuration with bcfg boot command? Any help would be highly appreciated as am desperate to boot into my OS. Many thanks
 
Mohsy, to be honest, you'd better take those questions over to that thread because I haven't needed to go through the process myself having inadvertently found a different way to roll back to a 'clean' install of Clover. I don't understand the error message you're getting, but I'm usually stumbling around trying things in error myself! That thread might have some 'power-users' looking in from time to time, people who actually understand this stuff.

What I can tell you is that the Clover upgrade seems to mess things up by putting a file in the wrong place or failing to copy a file, something like that. If you can find a way to delete your EFI folder on your EFI partition and replace it with a backup (Clover Configurator creates a backup automatically) then you should be good to go. Do you have any USB sticks which can boot the machine? Try them with the hard drive disconnected. Or do you know anyone with a mac who could help out by mounting your hard drive in a disk enclosure? (You can get them on Amazon for around $10 these days).
 
Mohsy, to be honest, you'd better take those questions over to that thread because I haven't needed to go through the process myself having inadvertently found a different way to roll back to a 'clean' install of Clover. I don't understand the error message you're getting, but I'm usually stumbling around trying things in error myself! That thread might have some 'power-users' looking in from time to time, people who actually understand this stuff.

What I can tell you is that the Clover upgrade seems to mess things up by putting a file in the wrong place or failing to copy a file, something like that. If you can find a way to delete your EFI folder on your EFI partition and replace it with a backup (Clover Configurator creates a backup automatically) then you should be good to go. Do you have any USB sticks which can boot the machine? Try them with the hard drive disconnected. Or do you know anyone with a mac who could help out by mounting your hard drive in a disk enclosure? (You can get them on Amazon for around $10 these days).

Simon, thanks for your efforts. Could you tell me the method you used to 'roll back to a clean install of Clover, please! In the Clover Shell, I can see that APFS.efi is showing when the command 'drivers' is entered, but can't seem to find a way to delete it. It seems to me that the Clover update to ver 4630 replaced the non-convert instruction with APFS file. Any suggestion as to how to 1) roll back to a clean install of Clover, 2) delete the APFS.efi file in the clover shell would be highly appreciated. Am so sorry for troubling you with my problems. Have a pleasant day. Many thanks.
 
Mohsy, I did it by taking my SSD out of the hackintosh and mounting it as an external drive on my macbook. I then mounted the EFI folder using EFI Mounter and (this is shortening things a bit) I found the backup of the older / original EFI folder which had been created by Clover Configurator before it did the upgrade. I copied that across to my Macbook, deleted the EFI folder on the SSD, then copied the backup back across.

I also made a freshly minted USB stick and booted from that, with the repaired SSD attached. It allowed me to mount the Repair drive on the SSD, and I used that to completely restore the SSD from a Time Machine backup. That part should not be necessary for you. It was for me because along the way, I had erased my SSD and done a fresh install, hoping that would solve my problems. It didn't. (I had assumed that erasing and reformatting the SSD would also erase and reformat the EFI folder. It doesn't).

The above is a shortened version because in truth I ran into extra problems of my own making: I suspected there was something corrupted on the EFI partition, so I ended up erasing and reformating it, which was almost certainly unnecessary.

As you can see, I kept going backwards for a long time, getting things wrong. But the basic process of deleting the corrupted EFI folder and replacing it with the backup should work. But you can't do it unless you have another machine from which to mount the drive. It might be possible with a Windows machine, if there is an EFI mounter app available for Windows. I've no idea.
 
Mohsy, I did it by taking my SSD out of the hackintosh and mounting it as an external drive on my macbook. I then mounted the EFI folder using EFI Mounter and (this is shortening things a bit) I found the backup of the older / original EFI folder which had been created by Clover Configurator before it did the upgrade. I copied that across to my Macbook, deleted the EFI folder on the SSD, then copied the backup back across.

I also made a freshly minted USB stick and booted from that, with the repaired SSD attached. It allowed me to mount the Repair drive on the SSD, and I used that to completely restore the SSD from a Time Machine backup. That part should not be necessary for you. It was for me because along the way, I had erased my SSD and done a fresh install, hoping that would solve my problems. It didn't. (I had assumed that erasing and reformatting the SSD would also erase and reformat the EFI folder. It doesn't).

The above is a shortened version because in truth I ran into extra problems of my own making: I suspected there was something corrupted on the EFI partition, so I ended up erasing and reformating it, which was almost certainly unnecessary.

As you can see, I kept going backwards for a long time, getting things wrong. But the basic process of deleting the corrupted EFI folder and replacing it with the backup should work. But you can't do it unless you have another machine from which to mount the drive. It might be possible with a Windows machine, if there is an EFI mounter app available for Windows. I've no idea.

Thanks, anyway. Guess I have to purchase a new hdd and simply start afresh as none of the recommendations works for me! Have a pleasant day and many thanks.
 
Status
Not open for further replies.
Back
Top