Mounting the EFI Boot Partition on Mac OS X

TerminalHere’s the answer to another reader request…

According to WIkipedia, “On Apple–Intel architecture Macintosh computers, the EFI partition is initially blank and not used for booting. However, the EFI partition is used as a staging area for firmware updates.”  When people look to create non-standard boot environments or attempt to build a hackintosh, the first step is often mounting and modifying the EFI boot partition.  Before you read any further, take note: altering your EFI boot partition is not supported by Apple and The Mac Admin takes no responsibility if you render your computer(s) unbootable by mounting and modifying this partition.

To mount an EFI boot partition, follow these steps:

1. Discover the volume identifier for your EFI boot partition.

Run this command:

diskutil list

The output should look something like this:

/dev/disk0
 #: TYPE                     NAME          SIZE       IDENTIFIER
 0: GUID_partition_scheme                  *251.0 GB  disk0
 1: EFI                                    209.7 MB   disk0s1
 2: Apple_HFS                Macintosh HD  250.1 GB   disk0s2
 3: Apple_Boot               Recovery HD   650.0 MB   disk0s3

 

In this case, the volume identifier of the EFI partition is disk0s1

2. Create a mount point.

A mount point is a directory where a non-booted volume is mounted.  On Mac OS X, mount points are typically created in /Volumes.  We can create a directory called efi within /Volumes by running the following command:

mkdir /Volumes/efi

 

3. Mount the EFI partition at the efi mount point.

Run the command:

sudo mount -t msdos /dev/disk0s1 /Volumes/efi

 

That’s it.  Your EFI volume will be mounted.  Modify it at your own risk.

9 Comments

  1. Hello!

    Does anyone know the (above) same commands to issue while in single user mode? It’s a long sad story but I need to modify the EFI from single user mode (command-S while starting up).

    Also needed is a command to identify the connected display.

    (I replaced a cracked display and now the MacBook 1,1 won’t boot).

  2. I have not tested these commands under single user mode, however I have no reason to expect that they wouldn’t work. Have you tried them and failed?

  3. Thank you for the quick response, Mac Admin!

    When (under single user mode) I input “diskutil list” I get the following feedback:
    “Unable to run because unable to use the DiskManagement framework. Common reasons include, but are not limited to, the DiskArbitration framework being unavailable due to being booted in single-user mode.”

    So I guess I’m out of luck at the single-user mode “level” of interactivity?

    At the risk of sounding greedy, also needed is a command to identify the connected display. I have this crazy idea that I can modify the EFI so that the mac will accept the transplanted display as its own.

    I have tried the following commands already:
    ioreg -bls
    system_profiler
    hostinfo

    I can’t seem to get a display id that’s relevant from any of those commands.

    I also tried the following:
    ioreg -lw0 | grep IODisplayEDID | sed “/[^<]*</s///" | xxd -p -r | strings -6
    but then I get nothing back.

    Thanks again for your help.

  4. I sympathize with your situation, but this is getting way beyond anything supported or recommended. Someone in your situation should take this computer to an Apple Authorized Service Center and have the display replaced with Apple parts. I take no responsibility if in using this information, you damage your hardware or lose data. What follows is for information only. In my professional opinion, nobody should ever run the commands listed below.

    Single User Mode mounts the system volume as read-only. To mount the system drive as read/write, use this command:

    mount -uw /

    Single User Mode also only starts a minimal system, leaving many frameworks and daemons unloaded, including some required by diskutil. The following commands *may* load the necessary items to run diskutil:

    launchctl load /System/Library/LaunchDaemons/com.apple.notifyd.plist
    launchctl load /System/Library/LaunchDaemons/com.apple.kextd.plist
    launchctl load /System/Library/LaunchDaemons/com.apple.diskarbitrationd.plist
    launchctl start com.apple.diskarbitrationd
    launchctl load /System/Library/LaunchDaemons/com.apple.configd.plist

    Intel’s resources on EFI may be helpful…
    http://www.intel.com/content/www/us/en/architecture-and-technology/unified-extensible-firmware-interface/efi-homepage-general-technology.html

    I hope this helps.

  5. Thank you! This helped me get rid of that pesky file Ubuntu put in my EFI partition when I installed (then unfortunately removed because the network card wasn’t detected) Ubuntu Linux on my brand new Mac mini 6,2. I was going to buy some expensive software for this purpose, but this command did the trick. Thanks again. I’m bookmarking this page.

  6. worked for me. just deleted the folder called linux and the snapshoot image of triple boot and voila. after restarting, the efi partition is unmounted again. that’s all well done. thanks a lot.

  7. This is VERY helpful. Thank you!! Needed to remove an extra entry from my boot manager (reFIt), and this did the trick.

  8. Pingback: Anonymous

Leave a Comment.