# Ubuntu – Can’t get Ubuntu to boot from EFI in Mac

grub2macmacosxsystem-installationuefi

I am trying to get an old ca. 2006 macbook (technical specs here) to boot Ubuntu 14.04.2 LTS. I'm on day two of this now, having wiped the hard drive numerous times and reinstalled from the disk around 8 times now. I'm still fairly new to the Linux world.

I have been following the instructions here to get things going, and after much struggling, I got all the way to running grub-install and htfs-bless. This is supposed to enable the boot-up process on my mac to recognize Ubuntu during startup (so that I don't have to manually boot from GRUB, which is what I have to do now).

I run the following command (as root)

grub-install --target x86_64-efi --boot-directory=/boot --efi-directory=/boot/efi --bootloader-id="$(lsb_release -ds)"  It returns the following: Installing for x86_64-efi platform. Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables. Try: 'modprobe efivars' as root. Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables. Try: 'modprobe efivars' as root. Installation finished. No error reported.  So it reports a fatal error (twice), but then finishes the installation with no errors. No idea. It suggests that I try modprobe efivars from root, which I of course do. It returns nothing (which it isn't supposed to), but then running again produces the exact same error. I go ahead and run hfs-bless "/boot/efi/EFI/$(lsb_release -ds)/System/Library/CoreServices/boot.efi"


which completes without comment. The fact that it completes suggests that the grub-install created the proper file system under my distro's folder. So this is a good sign.

The next step in my instructions tell me to reboot, to make sure I boot straight to Ubuntu. This doesn't happen. It also says that I should see Ubuntu show up under the mac bootloader screen, and I do not.

After re-booting manually from GRUB, I get back in and try to continue with the instructions, and here I hit the wall. I type

efibootmgr


and am met with the same error

Fatal: Couldn't open either sysfs or procfs directories for accessing EFI variables.
Try 'modprobe efivars' as root.


So I try modprobe efivars as root, and when I run again, I get the same error again.

Some searching suggests the problem is that I am booting in BIOS and not in EFI. The obviously solution is to boot in EFI instead, but I have no idea how to do that. There is no BIOS partition on my machine; there is only an EFIBoot partition. There is no longer a Mac OSX system on my machine; there is only Ubuntu 14.04.2 LTS.

Sometimes I'm able to get Ubuntu to boot up, other times I have to do it manually. I can't get an Ubuntu disk image to show up in the Mac bootloader, and I can't access EFI variables.

If there is some file I could manually edit from the command line that would get me to boot in EFI, that could help me solve this issue.

Any help on this would be greatly appreciated.