1

I'm on a MacBookAir5,2 (2012) and I've been running Ubuntu along side Mac OS X for some time. I used rEFIt when I first installed Ubuntu and that worked fine.

As I started working with Docker, I outgrew the disk space available and decided to get a new SSD drive. I did that, swapped the disks and installed Ubuntu 14.10.

After this point, I've fiddled with rEFInd (as rEFIt is not maintained) and I've read lot of Rod Smith's pages

However, now I want Ubuntu only and won't boot anything else on this machine. But somehow, what I think I tell efibootmgr to do, it won't. The problem is that rEFInd isn't run after booting. The only way I can boot my system is pressing the alt-key on booting, and selecting rEFInd on a USB stick. This works just fine though, no issues at all with that approach - it's just a bit inconvenient. :-)

If I boot without the USB stick attached, all I get is the grey screen with nothing being displayed. It stays grey "forever" (I've not waited much longer than 20 minutes).

My SSD contains four partitions:

GPT fdisk (gdisk) version 0.8.8

Partition table scan:
  MBR: hybrid
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with hybrid MBR; using GPT.
Disk /dev/sda: 937703088 sectors, 447.1 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): B30ED5AD-A6B6-4FF9-9CC4-1F440536FB9F
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 937703054
Partitions will be aligned on 8-sector boundaries
Total free space is 264949 sectors (129.4 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System Partition
   2          409640       195722143   93.1 GiB    AF00  Macintosh HD
   3       195985408       921180159   345.8 GiB   EF00  LINUX
   4       921180160       937701375   7.9 GiB     0700  SWAP

and I actually wiped out all files in the ESP as a measure to narrow down the issue. What I have now is efibootmgr reporting:

BootCurrent: 0000
Timeout: 5 seconds
BootOrder: 0000
Boot0000* rEFInd Boot Manager   HD(1,28,64000,7fa6ae3f-d9a7-4411-838a-1d0133b9993a)File(\EFI\refind\refind_x64.efi)
BootFFFF*   ACPI(a0341d0,0)PCI(1f,2)SATA(0,0,0)HD(2,64028,e066090,00007690-046d-0000-175e-0000ca5e0000)File(\System\Library\CoreServices\boot.efi)

and

root@fredrik-mbair:~# tree /boot/efi/ | grep -v png
/boot/efi/
└── EFI
    ├── refind
    │   ├── icons
    │   ├── keys
    │   │   ├── altlinux.cer
    │   │   ├── canonical-uefi-ca.der
    │   │   ├── fedora-ca.cer
    │   │   ├── openSUSE-UEFI-CA-Certificate.cer
    │   │   ├── refind.cer
    │   │   └── SLES-UEFI-CA-Certificate.cer
    │   ├── refind.conf
    │   └── refind_x64.efi
    └── tools

5 directories, 68 files

Last piece of information is this: When I boot with USB stick detached and press alt, I get one (1) hard drive icon with the text Windows under it. If I select that one, the screen blacks out and I get a white blinking cursor (underline character) in the top left corner of the screen, like 80x25 lines or similar console. Nothing happens after that. The "rEFInd Boot Manager" option doesn't appear.

I have no idea where the "Windows" option comes from, and I don't know what the FFFF option is either.

root@fredrik-mbair:~# efibootmgr -b FFFF -B
invalid hex value FFFF

Since I won't use anything but a single Ubuntu OS and Linux kernel, I would be fine with gummiboot but I'm not sure how that's going to help when efibootmgr can't get rEFInd to be run at boot ...

Last attempt at running install.sh (installed from PPA) gives this output:

root@fredrik-mbair:~# /usr/share/refind/install.sh 
Installing rEFInd on Linux....
ESP was found at /boot/efi using vfat
Found rEFInd installation in /boot/efi/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.

rEFInd has been set as the default boot manager.
Existing //boot/refind_linux.conf found; not overwriting.

Installation has completed successfully.

I have no idea on where to go next.

  • 1
    The "Windows" option is for booting the USB stick in BIOS-emulation mode. The Mac's boot manager labels that as "Windows" – Jeremy Huddleston Sequoia Aug 26 '16 at 18:23
1

So this is what I did in order to get somewhere:

First attempt was this:

  • remove everything under /boot/efi
  • blank out the Hybrid MBR (using gdisk, expert menu, then n then w)
  • /usr/share/refind/install.sh
  • efibootmgr -c -l \\EFI\\refind\\... -L TIRED

This actually got rEFInd to run after reboot. However, it didn't detect the vmlinuz-3.16.0-28-generic.efi.signed kernel that I want to run. It showed to options and both lead to No bootable device in a 80x25 console.

Aha, so I tried re-running the install.sh script with --alldrivers. After a reboot, I'm back at the grey screen that never shows anything.

Rebooted, went for rEFInd from my USB stick and then:

  • wiped out the /boot/efi partition
  • copied everything from the USB stick onto /boot/efi
  • created a new entry (deleting the old) with efibootmgr

And how I have a working system.

Details:

root@fredrik-mbair:~# gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.8

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 937703088 sectors, 447.1 GiB
Logical sector size: 512 bytes
Disk identifier (GUID): B30ED5AD-A6B6-4FF9-9CC4-1F440536FB9F
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 937703054
Partitions will be aligned on 8-sector boundaries
Total free space is 264949 sectors (129.4 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1              40          409639   200.0 MiB   EF00  EFI System Partition
   2          409640       195722143   93.1 GiB    AF00  Macintosh HD
   3       195985408       921180159   345.8 GiB   EF00  LINUX
   4       921180160       937701375   7.9 GiB     0700  SWAP
/boot/efi/
├── EFI
│   └── boot
│       ├── bootia32.efi
│       ├── bootx64.efi
│       ├── drivers_ia32
│       │   ├── btrfs_ia32.efi
│       │   ├── ext2_ia32.efi
│       │   ├── ext4_ia32.efi
│       │   ├── hfs_ia32.efi
│       │   ├── iso9660_ia32.efi
│       │   ├── LICENSE_GPL.txt
│       │   ├── LICENSE.txt
│       │   └── reiserfs_ia32.efi
│       ├── drivers_x64
│       │   ├── btrfs_x64.efi
│       │   ├── ext2_x64.efi
│       │   ├── ext4_x64.efi
│       │   ├── hfs_x64.efi
│       │   ├── iso9660_x64.efi
│       │   ├── LICENSE_GPL.txt
│       │   ├── LICENSE.txt
│       │   └── reiserfs_x64.efi
│       ├── icons
│       └── refind.conf
├── shellia32.efi
└── shellx64.efi

5 directories, 81 files
root@fredrik-mbair:~# efibootmgr -v
BootCurrent: 0000
Timeout: 5 seconds
BootOrder: 0000
Boot0000* COPY  HD(1,28,64000,7fa6ae3f-d9a7-4411-838a-1d0133b9993a)File(\EFI\boot\bootx64.efi)
BootFFFF*   ACPI(a0341d0,0)PCI(1f,2)SATA(0,0,0)HD(2,64028,e066090,00007690-046d-0000-175e-0000ca5e0000)File(\System\Library\CoreServices\boot.efi)
| improve this answer | |

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.