You can install rEFInd either on Mac machine’s EFI partition (the very first partition) or anywhere on Mac OS X’s partition. You can also install it on USB Stick/Hard Drive’s EFI or other partitions. Below method explains installing rEFInd on a USB Stick which is formatted using “GUID Partition Table” as partition scheme. Same works for installing rEFInd on Mac machine or USB Hard Drive.
We are going to install rEFInd on the first partition “EFI” (ie: diskxs1, x being your USB flash drive’s number) of the USB flash drive.
First mount the “EFI” partition. Issue:
$ mkdir /Volumes/EFI
$ sudo mount -t msdos /dev/disk1s1 /Volumes/EFI
Now, go to rEFInd website and download the CD-R image file. You can also use the binary zip file. But the CD-R image file contains the said binary zip file, docs as well as other goodies. Extract the .zip file and mount the resulting .iso file. Once mounted, copy the “EFI” folder, which contains “boot” subfolder, and paste it to the mounted “EFI” volume. In Mac machines, once mounted, you will already have “EFI” folder with “APPLE -> EXTENSIONS” subfolder. Don’t mess with the “APPLE” folder, which contains the firmware. You just copy the “boot” subfolder onto the already existing “EFI” folder. The “EFI” folder is not case-sensitive since it is on “msdos” partition. If yours is a 64 bit EFI, you may delete the “bootia32.efi” file and the “drivers_ia32” folder, which are present in “boot” folder. That is it.
You may also want to add extra tools like EFI shell, GPT Sync, etc. to the rEFInd Boot Manager.
To do so, you need tools, which are NOT provided by rEFInd. These tools can be found in rEFIt, from which rEFInd is derived. Though rEFIt is now discontinued and it was last updated on March 2010, these tools are very useful and some other aspects are recycled and used in rEFInd. Go to rEFIt website and download the .dmg file. Mount the .dmg file, go to “efi -> tools” folder and copy the tools you want to use. Now, go to “EFI” volume, “EFI” folder and create a folder called “tools” and paste the copied tools on to the “tools” folder.
Once it’s done, in “EFI” volume, go to “EFI -> boot” folder and edit “refind.conf” file as below.
It’s done. Now, your “EFI” volume has an “EFI” folder, which contains “boot” and “tools” subfolders.
In this manual installation method we install “bootx64.efi” (fallback filename) file of rEFInd instead of “refind_x64.efi” file. This, in general, does not require issuing “bless” command, especially for USB Stick/Hard Drive. Also, when you press “Alt (Option)” key immediately after the startup CHIME, Mac machine’s Startup Manager brings rEFInd as an option of booting the machine.
On Mac machines, if you want to enable rEFInd permanently, issue:
1) For EFI installation:
$ sudo bless --mount /Volumes/EFI --setBoot --file /Volumes/EFI/EFI/boot/bootx64.efi
2) For other folder installation:
$ sudo bless --setBoot --folder "$TARGETDIR" --file "$TARGETDIR/bootx64.efi"
Where “$TARGETDIR” stands for the directory in which you installed rEFInd. Option “—setBoot” enables rEFInd permanently. Better “$TARGETDIR“ be “/efi/boot” or “/efi/refind“.
Alternatively, you can install rEFInd using the supplied shell command “install.sh“, which installs refind_x64.efi.
- “./install.sh” installs rEFInd on Mac OS X’s root partition as “/EFI/refind“.
- “./install.sh —esp” installs rEFInd on EFI partition.
- For other options including installing “bootx64.efi” using “./install.sh” see extra install.sh instructions.
Note:
1) Better install rEFInd on EFI partition, since around 200 MB of unused disk space is sitting idle there. Also use “bootx64.efi” file, which makes things a lot easier for Mac machine’s Startup Manager.
2) For Windows or Linux installation, check rEFInd installation document page.
3) Copy a desired .icns file from “EFI -> boot -> icons” folder in rEFIt or rEFInd and paste it on to USB Stick’s EFI partition (root of the partition) and then rename it as “.VolumeIcon.icns”. This will display an icon for rEFInd while startup by pressing “Alt (Option)” key immediately after the startup CHIME.
Once everything is done, you can safely eject or unmount the volume.
$ umount /Volumes/EFI/
Thanks for the read and please leave comments 🙂
I tried on one usb which already had an EFI partition and it worked. But when I try with another usb which never has a prebuilt EFI partition I get a error message saying ‘Resource Busy’ whenever I try the second command ‘sudo mount -t…’.
The EFI partition is present, if a disk/Stick is formatted using GPT (GUID Partition Table) scheme under OSes like Mac OS X. And not using MBR scheme (It’s possible to make MBR-EFI, but by default no).
Please check whether your device/Stick is GPT or MBR formatted.
Since there is no “prebuilt” EFI partition (means MBR), you’re trying to mount the first primary partition of your disk/Stick, which is probably already mounted and in use.
I reformatted it with GPT, and an EFI partition was present. Strange though as I had done that before and an EFI partition wasn’t present.
I get this after the second command “mount_msdos: /dev/disk1s1: No such file or directory “
Please recheck the command. Like UNIX/Linux mount_msdos (mount -t msdos) does exist in Mac OS X.
Reblogged this on snderdotnl.
Holy shit, thank you. I’ve been trying to do exactly this for the past 48 hours straight. You got me sorted out in 15 minutes — works perfectly. Thanks!
You’re welcome. Glad it helped.
excellent documentation..you are really superb…Thanks a lot
You’re welcome. Glad it helped.
Dear Manoranjan,
My Tails installation on USB stick hangs up the MacBook when I choose it at bootup stage. It is not quite clear for me wether I could implement rEFInd om the very same stick to make it boot on any Mac (and PC) or not.
Thank you in advance!
Does it work on a system that doesn’t have OS X installed? I wanted to boot into fedora but I don’t have OS X on my system.
Nice instruction. But I have a problem with shell. When I start shell it loads to current shell version and get stuck cannot type or do something unless press and hold power button to restart. I install refind and shell v1 on USB. Any ideas?