Installing rEFIt on the hidden EFI system partition

Install rEFIt on the system partition, instead of using Mac OS X system volume, allows one to manage rEFIt independently from Mac OS X. It is also possible to wipe out Mac OS X entirely while still being able to use rEFIt to boot other operating systems, like GNU/Linux, FreeBSD, Solaris, or even Windows.

To install rEFIt on the hidden EFI system partition, follow this simple steps which I gathered from a post at the personal blog of Lincoln Ramsay.

From a Terminal or command-line prompt, run the following commands:

$ sudo mkdir /efi

This will create the mount point for the EFI system partition

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

This command will mount the EFI system partition (usually hidden from Mac OS X) into /efi. The EFI system partition is basically a 200MB FAT32 partition which is, by default empty.

NOTE: Please, take into consideration that EFI system partition is usually the first partition on the built-in hard disk, which is usually /dev/disk0s1, although it could be different on your system.

open /efi

This will open the /efi folder in Finder.

Now, download rEFIt and copy the contents of the efi folder into /efi.

In the end, you should have the following subdirectories on your machine:

  • /efi/efi/refit
  • /efi/efi/tools

Now, we will bless the EFI system partition:

sudo bless --mount /efi --setBoot --file /efi/efi/refit/refit.efi --labelfile /efi/efi/refit/refit.vollabel

I think blessing marks the partition mounted on /efi as bootable, uses /efi/efi/refit/refit.efi as the boot loader, then changes some OpenFirmware variables to boot the machine from this partition.

Advertisements

29 thoughts on “Installing rEFIt on the hidden EFI system partition

  1. When I try this it fails to boot to rEFIt on the next power cycle. I am using a Mac Pro and did everything as you described. It simply defaults to the Mac OS. I checked the NVRAM variables and it clearly shows that it is set to boot from the correct partition. Any ideas?

  2. Errr… I’m no Mac expert, but:

    Did you previously installed rEFIt on the Mac OS X boot volume? And so, did you uninstall it?
    Did you install Apple Boot Camp?
    Can you boot from a Linux LiveCD and check, using parted, the EFI partition is marked as bootable?
    Have you synced up the partition maps using rEFIT?

  3. Thanks for the instructions. Easy to follow and very comprehensive.

    After doing it, it takes about 25 sec. from switching on the machine to displaying the refit-screen. before (when refit was installed on disk0s2) those were some 4 sec. or so.

    Have you experienced the same?

  4. No, I havent’ experience something like that.

    Did you sync the GPT/MBR partition tables? What partition is marked as active?

    Unfortunately, my Mac is gone for repairs so I cannot play, test or re-install rEFIt at the moment for sure I’ll once it’s back πŸ™‚

  5. Thanks for for instructions.. I was stuck about bless command before I saw this guide. Very nice.

    But.. I have the same problem as Wolf Mc Ewen. I also have this problem if I wipe out the entire disk, make a MSDOS MBR partition table on it and install linux. It takes 20-25 seconds before grub kicks in. I have been crawling the net for days now for a guide on how to set this timer. In linux you have the efibootmgr which is supposed to be able to to this, but it won’t start because the efivars kernel module won’t load on an i386.

    This ha nothing to do with the syncing.. I think it’s an option with autoboot in EFI, but I can’t find a way to change it.

    By the way.. did a sync now while typing this and now the rEFIt Manager shows the EFI partition as an option to boot Legacy OS from HD.

    Now I am getting desprate..

  6. the refit 25s booting time is perhaps because you have a CD in the machine at the boot.

  7. Pingback: links for 2007-06-19 | /dev/random

  8. Got a Intel book pro with no HDD from a closed compusa. If I follow your steps above, what else would I need to know. I’ll be installing either elive for mac book or fc 7, stability is not an huge issue. I run sidux on my p3 thinkpad. I right this from the elive cd. All the above seems more comprehensive then I have been reading in pieces elsewhere. Thanks jim

  9. “By the way.. did a sync now while typing this and now the rEFIt Manager shows the EFI partition as an option to boot Legacy OS from HD.”

    I’m getting this as well. Any idea on how to correct it?

    Thanks!

  10. Pingback: bootcamp

  11. Model Identifier: Macmini2,1
    Processor Name: Intel Core 2 Duo
    Processor Speed: 2 GHz
    Memory: 2 GB
    Bus Speed: 667 MHz
    Boot ROM Version: MM21.009A.B00
    SMC Version: 1.19f2
    $ diskutil list
    /dev/disk0
    #: TYPE NAME SIZE IDENTIFIER
    0: GUID_partition_scheme *111.8 Gi disk0
    1: EFI 200.0 Mi disk0s1
    2: Apple_HFS macaddict 55.6 Gi disk0s2
    3: Microsoft Basic Data 13.0 Gi disk0s3
    4: Microsoft Basic Data WINXP 13.0 Gi disk0s4
    5: Apple_HFS 14.9 Gi disk0s5
    6: Linux Swap 14.5 Gi disk0s6
    [15G Linux Swap is an historic accident πŸ˜‰ ]
    When I follow your instructions it takes 30 seconds for rEFIt to be discovered.
    With /efi on the MacOS partition it is 3 seconds. Any idea why?
    peterk

  12. :-/

    The truth is that I haven’t played with rFEIt for a long time. I might take it for a spin later, but I’ve heard of other people having the same problems. Unfortunately, I don’t know much about EFI so I don’t really know what it takes so long.

  13. QTparted in Linux see an error on used space. This is Unknown. Also report a message saying:

    “REFIT~1.MPKCONTENTSPACKAGESPARTIT~1.PKGCONTENTSRESOUR~1PARTIT~1.BOM is 0k, but it has 3 cluster (1k).”

    May It help?

  14. Pingback: Anders Franz Terkelsen’s blog » Blog Archive » Ubuntu and Windows Vista dual boot on a MacBook

  15. Pingback: Still working on it...MultiOS MacBook | Soul_Est's Vogue

  16. I just tried this method and I also get the 25sec penalty.
    I alredy tried Zapping my PRAM and then reinstalling rEFIt onto the EFI partition, but it didnt help. Has anyone new information on this problem/bug?

  17. Hi!
    thanks for your valuable instructions, having macos on the 2nd partition of 4 (1st is intended for windowze, 3rd for linux, 4th for data exchange) is is not possible to bot with the normal install to /efi on mac-os prtition. wont boot.
    Instaling on hidden efi lets it boot.
    BUT I have the 20sec penalty which is quite anoying. Any Ideas why?
    My refit is 0.12.dmg,
    Mac-Book pro 15inch, 2.2ghz, core2duo, 4gb ram, macos 10.5.6 (newest leopard at time of writing)
    Boot ROM Version: MBP31.0070.B07
    SMC Version: 1.16f8

    Why does the bootloader take so long. Does it look for a bootable partition?.
    May partitions are all empty exept macos (2nd) and the empty spares which are intended for install.

    Partition_inspector (comes with rEFIt) says:

    *** Report for internal hard disk ***

    Current GPT partition table:
    # Start LBA End LBA Type
    1 40 409639 EFI System (FAT)
    2 409640 210124839 Basic Data
    3 210124840 419840039 Mac OS X HFS+
    4 420102184 629817383 Mac OS X HFS+
    5 630079528 976510983 Mac OS X HFS+

    Current MBR partition table:
    # A Start LBA End LBA Type
    1 1 409639 ee EFI Protective
    2 * 409640 210124839 0c FAT32 (LBA)
    3 210124840 419840039 af Mac OS X HFS+
    4 420102184 629817383 af Mac OS X HFS+

    MBR contents:
    Boot Code: Unknown, but bootable

    Partition at LBA 40:
    Boot Code: None (Non-system disk message)
    File System: FAT32
    Listed in GPT as partition 1, type EFI System (FAT)

    Partition at LBA 409640:
    Boot Code: None (Non-system disk message)
    File System: FAT32
    Listed in GPT as partition 2, type Basic Data
    Listed in MBR as partition 2, type 0c FAT32 (LBA), active

    Partition at LBA 210124840:
    Boot Code: None
    File System: HFS Extended (HFS+)
    Listed in GPT as partition 3, type Mac OS X HFS+
    Listed in MBR as partition 3, type af Mac OS X HFS+

    Partition at LBA 420102184:
    Boot Code: None
    File System: HFS Extended (HFS+)
    Listed in GPT as partition 4, type Mac OS X HFS+
    Listed in MBR as partition 4, type af Mac OS X HFS+

    Partition at LBA 630079528:
    Boot Code: None
    File System: HFS Extended (HFS+)
    Listed in GPT as partition 5, type Mac OS X HFS+

    Any Ideas?

  18. Thanks for your post, very useful.

    There’s one thing that doesn’t work, though.
    I would like to:
    – hibernate Mac OS X
    – start Windows Vista
    – shut down Windows Vista
    – resume Mac OS X

    But when I try to resume Mac OS X it simply reboots!
    Do you know why?

    Thank you.

  19. It has been a long time since I’ve used rEFIt. Have you tried booting with the “Option” key held down? It should bring up a menu that allows you to choose where to boot from.

  20. Intel mac mini 1.66Ghz,
    Mac OS X Tiger 10.4.11,
    512 MB RAM,
    64 MB VRAM,
    Hard disk-55 GB
    Hard Drive-CD-RW/DVD-R= which was broken year ago
    And year or two ago i had:
    Windows XP installed via Bootcamp utility from tiger, and then my big stupid bro installed vista by removing XP…….then the hard drive broke and now i do not have drivers for vista as i’ve drivers for only xp which was created by boot camp………and now the boot camp is expired…….and is there anyway to install xp again…………..

    PLS PLS PLS PLS PLS PLS PLS PLS PLS PLS PLS PLS help……..?!?!??…and i don think i’m going to upgrade to leopard………can rEFIt help solve my problem

  21. Pingback: Native UEFI Windows 7 Boot on Mac Mini | David's space

  22. Hi. I just desired to write a comment and inform you that I uncovered this post entertaining and exciting. I am wanting forward to studying some additional from you.

  23. When I was in college at Ball State back in 1993 there was a guy in my friends doem that turned up missung after walking home from a party. He was found floating in the White river I want to say a week later. The police first ruled it a suicide and then said it was an accidental drowning. We all knew this guy wouldn’t kill himself and there was know way he would be playing around by the river by hisself in the middle of the night. We all figured that he got into it with some locals and they threw him in the river. I hope they go to Muncie Indiana and look into this. Every police force around the country and maybee even Canada needs to open up their books and look into all cases like this because I think were just at the tip of the iceberg. If these were women every branch of LE would be on this and it would be all over the TV. We need to make some noice and try to get some national news coverage on this. If this is as wide spread as it seems to be getting somebody knows of someone who could be a possible victim.

  24. Pingback: Installing rEFIt on the hidden EFI system partition « Christian Fleischhacker

  25. Pingback: Ubuntu on Macbook, rEFIt Problems

  26. My brother suggested I would possibly like this blog. He was totally right.
    This submit actually made my day. You cann’t imagine just how much time I had spent for this information! Thank you!

  27. Hey i have a question,
    i installed refit on the EFI hidden partition now i like to remove ist what should i do?
    the commands for the Terminal: sudo bless –mount /efi –setBoot –file /efi/efi/refit/refit.efi –labelfile /efi/efi/refit/refit.vollabel

    and whats the commands to get back the old start volume??

    thanks to you

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s