Here are some key observations:
- You have an EFI-mode GRUB installation on your EFI System Partition (ESP).
- You have a BIOS-mode version of GRUB on your Master Boot Record (MBR), but it points to code that no longer exists, so it's useless at best and could cause a boot failure if it were accidentally launched.
- You have a hybrid MBR, which activates the Mac's Compatibility Support Module (CSM). In other words, your computer is configured in such a way that it might boot in BIOS/CSM/legacy mode, although that's far from certain to happen.
- Your
grub.cfg
file has entries that should launch OS X; however, I can't promise that those entries will actually work.
- Your EFI is configured to boot GRUB by default. (This is clear from the
efibootmgr
output on lines 642-648 of your Boot Repair output.) Your description makes it sound like this isn't happening, though.
Some additional key background information:
- All OSes require boot loaders to boot. These are programs that load a kernel into memory and begin executing it. GRUB is the default boot loader for Ubuntu, but others exist. (See my page on the subject for information on EFI-mode boot loaders for Linux.)
- In addition to boot loaders, boot managers can be critical. A boot manager presents a menu or some other type of user interface to enable users to select a boot loader to launch (or sometimes other pre-boot tools). Most EFIs, including Apple's, include simple boot managers. GRUB, in addition to being a boot loader, provides boot manager functions. rEFIt, rEFInd, and gummiboot/systemd-boot, are examples of third-party boot managers that are not boot loaders. (The Linux kernel, though, includes its own boot loader, so these programs can act like boot loaders for Linux kernels.)
- The Mac's built-in boot manager is a bit weird. On most EFI-based computers, the
efibootmgr
utility in Linux shows the built-in boot manager options. On Macs, though, the built-in boot manager seems to pull its information from some other source, and I'm not sure what that source is. Thus, configuring it to do what you want can be tricky, or at least requires knowledge and procedures that I lack. Macs usually (but not always) honor the first entry in the boot order (BootOrder
as reported by efibootmgr
), but the menu you get when you hit Alt/Option upon booting is another matter entirely; and in your case even the first entry is being ignored.
- Macs can boot using either EFI-mode or BIOS-mode boot loaders. EFI-mode is native and, generally speaking, preferable; but BIOS-mode is more-or-less required to boot Windows 7 and earlier on most Macs. BIOS-mode booting requires that the disk use a hybrid MBR. Personally, I recommend EFI-mode booting of Linux on Macs, although there can be exceptions to this rule.
Thus, where you are now is that you should be configured for dual-booting using GRUB as the boot manager; however, it sounds as if the Mac may not be honoring the boot order set in the EFI's boot manager, as reported by efibootmgr
.
There are a number of ways you can proceed:
- Use rEFInd -- If you install my rEFInd boot manager from OS X, it should set things up such that it will take over and enable you to boot either OS X or Ubuntu, with boots to Ubuntu working either via GRUB or by launching the kernel with its EFI stub loader. (rEFInd is also likely to show a non-functional BIOS-mode boot option for Ubuntu. You'll probably want to remove this from the menu.)
- Restore GRUB as the default boot loader/boot manager -- This could be tricky. As I said, it should be working now. There are two things you might try to get this working:
- You can use the
bless
command in OS X to get the system to recognize a boot loader on the ESP as the default. Here's the procedure:
- Boot to OS X
- Open a Terminal window.
- Type
mkdir /Volumes/ESP
.
- Type
sudo mount -t msdos /dev/disk0s1 /Volumes/ESP
. This should mount your ESP (/dev/sda1
in Ubuntu, which should be /dev/disk0s1
in OS X) to /Volumes/ESP
.
- Type
sudo bless --mount /Volumes/ESP --setBoot --file /Volumes/ESP/efi/ubuntu/grubx64.efi --shortform
. This "blesses" GRUB, making it the default boot loader.
- There is a procedure, outlined here, for installing an arbitrary boot loader (such as GRUB) on an HFS+ volume, that seems to work better on Macs than the standard EFI procedure. You could try this method with Ubuntu's GRUB, but you're pretty much on your own for doing so.
- Get the Mac's boot manager to show a GRUB option, leaving OS X as the default -- This option might require doing something similar to the procedure of moving GRUB to an HFS+ volume, but then using the boot picker in OS X to change the default. You should then be able to use the Mac's built-in boot manager to pick your OS.
In any of these cases, you'd be well-advised to swap out your hybrid MBR for a conventional protective MBR. The reasons are described on my hybrid MBR page, -- namely, hybrid MBRs are ugly and dangerous, and so should be used only when absolutely required, which they (probably) are not in your case. You'd only need a hybrid MBR if you needed to boot Ubuntu in BIOS mode. You can convert your hybrid MBR to a protective MBR using gdisk
, as follows:
- Launch
gdisk
on the disk, as in sudo gdisk /dev/sda
in Ubuntu.
- Type
p
to view the partition table to be sure you're working on the correct disk.
- Type
x
to enter the experts' menu.
- Type
n
to create a new protective MBR.
- Type
p
again to verify that you've not accidentally changed anything.
- Type
w
to save your changes. You'll be asked to verify this change. Provide it.
You can do this before or after you get everything booting the way you want it to.
In the past, most Ubuntu dual-booters on Intel-based Macs used rEFIt because it Just Worked with most common configurations. rEFIt is no longer maintained, but I forked it to rEFInd. rEFInd also tends to work pretty well, but with the caveat that things have changed enough (both in rEFInd vs. rEFIt and in what a "common configuration" is) that you might need to tweak some rEFInd configuration options. In your case, you might want to edit refind.conf
to edit dont_scan_files
, dont_scan_dirs
, or dont_scan_volumes
to hide unwanted or non-functional boot options; or uncomment scanfor
and ensure that hdbios
is not among the options to hide a non-functional BIOS-mode boot option.
As you can see from the options I presented above, cutting rEFInd out of the equation means adding GRUB into the equation, and getting that to work requires jumping through some extra hoops because Ubuntu isn't set up to jump through those hoops automatically. (In some ways, that's the advantage of rEFInd -- its setup scripts jump through the hoops that Ubuntu's setup tools don't.) You can certainly use GRUB instead of rEFInd and the EFI stub loader, but you must be prepared to go to the extra effort.
If the reason you don't want rEFIt or rEFInd is because you usually boot OS X, be aware that you can reduce the timeout value of rEFInd (perhaps to -1
, which causes an immediate boot to the default OS) and set the default (via default_selection
) to OS X.