0

So I tried to install ubuntu 14.04 on my macbook pro (completely replacing OSX). I had refit installed, but not it seems gone. And every time I boot, the PC can't find any OS.

I tried using boot-repair with all the possible options, but it never fixed the boot.

I have the following partitions:

/dev/sda1 : EFI boot
/dev/sda2 : /
/dev/sda3 : swap

I tried installing refind using the --root option, but it didn't work, here is the output:

root@ubuntu:/usr/share/refind# mkdir /media/boot
root@ubuntu:/usr/share/refind# mount /dev/sda1 /media/boot/
root@ubuntu:/usr/share/refind# ./install.sh --root /media/boot/
Installing rEFInd on Linux....
ESP was found at /media/boot using vfat
Found rEFInd installation in /media/boot/EFI/refind; upgrading it.
Copied rEFInd binary files

Notice: Backed up existing icons directory as icons-backup.
Existing refind.conf file found; copying sample file as refind.conf-sample
to avoid overwriting your customizations.

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

ALERT: There were problems running the efibootmgr program! You may need to
rename the refind_x64.efi binary to the default name (EFI/boot/bootx64.efi
on x86-64 systems or EFI/boot/bootia32.efi on x86 systems) to have it run!

Existing /media/boot//boot/refind_linux.conf found; not overwriting.

ALERT:
Installation has completed, but problems were detected. Review the output for
error messages and take corrective measures as necessary. You may need to
re-run this script or install manually before rEFInd will work.

root@ubuntu:/usr/share/refind# 

Running modprobe efivars didn't change anything.

So right now I'm kinda lost: posting this from a liveCD, not really understanding why the MBP is not picking up the EFI boot correctly.

  • Did you use the EFI Ubuntu ISO? Daft question. But just making sure... – Kinnectus Jul 6 '14 at 10:36
  • @BigChris yes I did, I wasn't even able to boot the live USB otherwise. Also, Ubuntu is the one who created the efi boot partition. – Florian Margaine Jul 6 '14 at 10:38
1

It's fixed!

After reading a little more the errors, I saw this:

ALERT: There were problems running the efibootmgr program! You may need to
rename the refind_x64.efi binary to the default name (EFI/boot/bootx64.efi
on x86-64 systems or EFI/boot/bootia32.efi on x86 systems) to have it run!

So I inspected the /EFI/ folder, and found no boot folder in it.

# mkdir /media/boot/EFI/boot
# cp /media/boot/EFI/refind/refind_x64.efi /media/boot/EFI/boot/bootx64.efi

This works! refind is kinda broken (no icon), but I can boot fine.

To restore the icons and have refind work correctly:

# cp -R /media/boot/EFI/refind/* /media/boot/EFI/boot/
| improve this answer | |
  • 1
    You need to copy the rest of the /media/boot/EFI/refind directory tree to /media/boot/EFI/boot -- in particular, the icons subdirectory and refind.conf file. – Rod Smith Jul 6 '14 at 14:07
  • Fantastic, a godsend. On Debian Jessie (Testing), the base directory is /boot/efi/EFI, but following the steps above essentially worked. (also, icons as Rod pointed out.) – Eric Brown Jul 21 '14 at 2:42

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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