[Guide] Remove EFI partition from drives without harming contents

  • First of all, I apologize that this isn't in German; I'm learning the language, but don't know enough to write a coherent guide. If someone wants to provide a translation, I'd happily include it.


    Background: (skip to "solution" if you don't care about it)


    As you may already know, Ozmosis is a handy macOS bootloader that is designed to fit into a motherboard's BIOS. This allows for a very clean macOS environment, as most of the patching is done before the OS even loads. Unfortunately, there's only so much space on the BIOS chip to fit everything someone would need to patch, so the overflow is all loaded from the EFI partition of the boot drive... or rather, the first drive that it finds on boot.


    This is, in almost every case, a very good way to seek out the drive, as most users will be using only a single drive inside of their Hackintosh. And, even if they are dualbooting, the issue of having a Windows/Linux drive found before the macOS drive can be solved quickly by swapping the cables. However, there are a few edge cases in which this won't work, and I was unlucky enough to stumble across one of them.


    I own two drives: a 120GB m.2 solid state drive that I dual boot both macOS Sierra and Windows 10 off of, and a 1TB hard drive that I use for storage across both OSs. The hard drive was previously formatted under a GUID partition scheme using OS X Mavericks, which meant that it had an EFI partition tacked onto it. Now it is formatted as NTFS, and until I installed Ozmosis I didn't even notice the EFI partition was there. Unfortunately, it became a thorn in my side when I realized that, for whatever reason, Gigabyte decided that m.2 SSDs should be the LAST drive on their motherboards to initialize, meaning that no matter what SATA port the hard drive was plugged into, Ozmosis would always drop its external folders into its EFI partition.


    I knew then that the only way to solve my problem would be to get rid of the EFI partition on the hard drive, otherwise I would never be able to get sound on my Hackintosh! But, after looking online, I found that the overwhelming consensus was that the only way to get rid of an EFI partition was to completely wipe the drive. Disheartened, I was about to invest in an external hard drive when I finally found this guide on mede8erforum, showing EXACTLY what I wanted to do! :hurra:


    Solution:
    Unfortunately, the GUI portion of the guide appears to be outdated now. Fortunately, the Terminal version isn't, so I will provide a writeup of that part here for anyone who needs it


    Open Terminal


    Find the identification number of the offending EFI partition by typing in
    diskutil list
    Your output should look something like this:


    In this case, the partition we want to get rid of is "disk0s1," so we need to unmount disk0 by typing
    diskutil unmountDisk /dev/disk0
    Remember, though, to replace "disk0" with the drive your unwanted partition is on


    Finally, to remove the EFI partition, type in
    sudo gpt remove -i 1 disk0
    WARNING! REMEMBER TO REPLACE "disk0" WITH THE DRIVE WITH THE EFI PARTITION YOU WANT TO REMOVE


    After this, because you have typed a "sudo" command, Terminal will ask you to type your password. After you have done that, hit enter, and you should get a confirmation saying that "disk0s1 has been removed," and after a few seconds your drive should re-mount automatically, with no more EFI partition!

  • Oef, I also had trouble with Ozmosis and the EFI partition it picks for local files. They should have added a test to see if one of the EFI partition already has an OZ folder and load that.


    The problem I'm in now is that I formatted my M.2 drive from NTFS to APFS and suddenly MacOS wouldn't boot correctly. I first thought the boot loader wasn't able to handle the APFS format, but formatting it to HFS+ didn't solve it.


    To my surprise (and thanks to your post) I found out Ozmosis now picked the M.2 drive's EFI partition for the OZ local files. I guess on my board the M.2 drive is available first... So now I'm just going to copy my OZ files there and hopefully this will solve my problem.


    If I don't come back here, it did ;)