Unix & Linux Stack Exchange is a question and answer site for users of Linux, FreeBSD and other Un*x-like operating systems. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm running Linux on a 8,3 2011 MacBook Pro. It uses EFI/rEFIt to boot.

I was able to install GRUB2 EFI support, and it shows up just fine in the rEFIt boot menu. Everything seems to be working there.

What I did was this:

apt-get source grub2
sudo apt-get build-dep grub2
cd grub2-1.99
export EFI_ARCH=x86_64
./configure --with-platform=efi --target=${EFI_ARCH} --program-prefix ""

This built everything required. Then, it was time to install the compiled grub.efi image:

cd grub-core
../grub-mkimage -O ${EFI_ARCH}-efi -d . -o grub.efi -p "" part_gpt part_msdos ntfs ntfscomp hfsplus fat ext2 normal chain boot configfile linux multiboot
sudo mount -t vfat -o rw /dev/sda1 /mnt
sudo mkdir -p /mnt/EFI/grub
sudo cp grub.efi *.mod *.lst /mnt/EFI/grub
sudo touch /mnt/EFI/grub/grub.cfg

It's all looking good so far. When I rebooted into rEFIt, I could see the EFI GRUB menu entry in rEFIt and I was able to start it. Since I hadn't configured anything, I wasn't able to see anything, but I could have entered GRUB commands if I wanted to.

I then tried defining my GRUB config file like this:

menuentry "Linux (BIOS)" {
    search --file --no-floppy --set=root /vmlinuz
    loadbios /boot/vbios.bin /boot/int10.bin
    linux /vmlinuz root=/dev/sda4 video=efifb
    initrd /initrd.img

menuentry "Linux (BIOS + Fix Video)" {
    search --file --no-floppy --set=root /vmlinuz
    loadbios /boot/vbios.bin /boot/int10.bin
    linux /vmlinuz root=/dev/sda4 video=efifb
    initrd /initrd.img

menuentry "Linux (No BIOS)" {
    search --file --no-floppy --set=root /vmlinuz
    linux /vmlinuz root=/dev/sda4 video=efifb
    initrd /initrd.img

Then, when I booted into GRUB from rEFIt, I could definitely see these menu entries. The problem is that each one yielded a message like this:

error: file not found

I assume that this refers to the fact that it can't find /vmlinuz, /boot/*, and /initrd.img, since they're not present in the EFI partition.

Where do I get these files from and how can I copy them to the EFI partition to get booting working?

Additionally, how do I specify which kernel to load? Will this GRUB loader just load my main /dev/sda4 GRUB menu after EFI has booted?

share|improve this question
enter the grub command line, enter commands as you have them, line by line to discover which lines are causing errors. I've spent a lot of time with grub2 and EFI installs lately but not with rEFI. The Arch Wiki has a section specifically dedicated to installing on Macs. Might be of some use. – bsd Feb 2 '12 at 17:05
I'm pretty sure it's failing to load the BIOS. I wasn't able to try the last menu entry until now. Where do I get this BIOS from? – Naftuli Tzvi Kay Feb 2 '12 at 17:12
Nevermind, found the BIOS and that part is working, now I've got other problems :) – Naftuli Tzvi Kay Feb 2 '12 at 18:12

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Browse other questions tagged or ask your own question.