Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

I am running Kubuntu 13.04 on my MacBook Pro and I have it set up to boot through apple's bios emulation. However, I am getting really frustrated with the ATI card, and would really like to use the Intel card. This means that I will need to get the system to boot via EFI. There is a catch though, as the semester just started, I cannot afford to do a full reinstall and start over. How do I manually set up EFI booting? My system already has an efi partition from Mac OS X, so no partitioning should be necessary. I have tried to do this a few times before without success. The furtherest I can get is into grub-efi, but I cannot actually boot the kernel from there.

How can I achieve EFI booting on a BIOS booting install?

My partition scheme is a follows:

/dev/sda1 is my EFI

/dev/sda2 is my Mac OS

/dev/sda3 is my root

/dev/sda4 is my boot

/dev/sda5 is my home

/dev/sda6 is my swap

This has been stumping me for some time now and every tutorial I find online is outdated. Hopefully some wonderful guru here can help me out. Thanks!

share|improve this question
add comment

1 Answer 1

up vote 1 down vote accepted

Try this:

  1. Instal rEFInd in OS X. You can use the install.sh script to do this.
  2. Type sudo mkdir /EFI/refind/drivers_x64 in an OS X Terminal window. (If you use the --esp option to install.sh, you'll need to adjust the path to create this directory on the ESP.)
  3. Install the rEFInd EFI driver for whatever filesystem you're using to store your Linux kernels (usually ext4fs, but sometimes not). To install the driver, you need to copy it to the drivers or drivers_x64 subdirectory of the rEFInd installation directory (/EFI/refind by default in OS X).
  4. In Linux (even from a BIOS-mode boot), run the mkrlconf.sh script that comes with rEFInd. This will generate a /boot/refind_linux.conf file, which holds kernel options that rEFInd passes to your kernel.

Ideally, this will enable you to boot directly to Linux in EFI mode, bypassing GRUB, which can be tricky to configure if the automated scripts don't get it right. rEFInd should detect your kernels each time you boot, so you won't need to update anything when you upgrade your kernels.

If this works, and if you're not triple-booting with Windows, you may want to:

  • Edit /EFI/refind/refind.conf, uncomment the scanfor line, and ensure that hdbios is not present. This will keep the old BIOS-mode GRUB from showing up as a rEFInd boot options.
  • Remove the hybrid MBR from your hard disk. You can do this by editing the partition table with parted or GParted (just make any trivial change) or by installing the gdisk package, launching gdisk on your disk, typing x to get to the experts' menu, typing n to generate a new protective MBR, and typing w to save your changes. Removing the hybrid MBR will reduce the odds that it will cause problems in the future.
share|improve this answer
    
I've been trying to follow this for the past hour and I'm totally stuck. I can install refind to my OS X partition with install.sh, but if I try to use --esp it says it can't find my esp. I can mount my EFI partition via Disk Utility, but I can't get refind to install to it. I also tried just running it off my OS X parition and it works, but it doesn't find my kernel. I coppied the drivers over to the refind folder and it will find a kernel image on my EFI partition but won't find the one I want to boot on /boot. Kernel on EFI was coppied from boot but it just dumps me at a busybox prompt –  Benjamin Daines Sep 2 '13 at 3:31
    
I don't want to boot the kernel on EFI, I want to boot the one on /boot, but I included that just because. I'm going to call it quits for the night before I end up throwing expensive hardware at the wall. I'll check back later for responses and / or give it another go tomorrow. Thanks for you help, hopefully we can figure this out... –  Benjamin Daines Sep 2 '13 at 3:32
    
The EFI filesystem driver(s) must be installed to /EFI/refind/drivers_x64 or /EFI/refind/drivers on the OS X partition, assuming that you installed rEFInd itself to /EFI/refind. Once that's done, rEFInd should detect and boot your kernel(s) from your Linux partition; however, you'll probably also need a /boot/refind_linux.conf file (under Linux) in order to boot completely. (Without that file, the kernel won't know where its root partition is and so the boot will fail and probably dump you to a minimal shell.) –  Rod Smith Sep 2 '13 at 17:07
    
Ok, got it figured out. It's sloppy, but it works. I ended up installing grub (grub-pc-bin was still installed, so I removed it) to /boot/efi/ubuntu. Now I boot to refind, then to grub, then to the OS. Now using the intel graphics card :) –  Benjamin Daines Sep 2 '13 at 18:42
    
You should be able to simplify the boot path by installing the EFI filesystem driver for your Linux filesystem (probably ext4fs) and creating a /boot/refind_linux.conf file. If you can't seem to get this working, then please show the output of ls -R /EFI in OS X, and of cat /etc/fstab and cat /boot/refind_linux.conf in Linux. Edit your original post to show this information, and add four spaces to the start of every line to preserve formatting and legibility. –  Rod Smith Sep 2 '13 at 22:10
add comment

Your Answer

 
discard

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

Not the answer you're looking for? Browse other questions tagged or ask your own question.