The Solution
You can eliminate the GRUB menu in either of two ways:
- Reconfiguring GRUB -- You can tell GRUB to hide its menu (in which case GRUB will still be used, but its menu will simply disappear). See this question and its answers for more on this approach.
- Using an EFI stub loader -- You may already have an EFI stub loader on your menu; this detail is unclear from your description. If so, you can simply select it to launch in this way, bypassing GRUB and its menu. If you don't see such an option, you can probably get them by adding an EFI filesystem driver. The easiest way to do this is probably to re-install rEFInd. When run in OS X, the installation script looks for Linux partitions and, if one is found, automatically installs the ext4fs driver. When run in Linux, the installation script adds the driver for the filesystem that holds the kernel, if that driver is available. (rEFInd ships with drivers for ext2/3fs, ext4fs, ReiserFS, and Btrfs; but not for XFS or JFS.) If you can get the system to boot with the EFI stub loader, chances are that will leave you with two ways to boot Ubuntu from rEFInd -- the EFI stub loader and GRUB. I recommend leaving both in place because the redundancy may prove useful if a problem emerges with one approach in the future; however, if you want to hide one, you can do so with the
dont_scan_dirs
or dont_scan_files
options in refind.conf
; or if you're booting via a BIOS-mode GRUB, you can uncomment the scanfor
option and ensure that hdbios
is not among the options. See this page of the rEFInd documentation -- read the "Hiding and Displaying EFI Boot Loaders" section, or search for dont_scan
within the page.
Background Information: The Explanation (tl;dr)
rEFInd is a boot manager, which means it presents a menu of boot options to you and lets you select one option. This contrasts with a boot loader, which loads an OS kernel into memory and starts it running. Whenever rEFInd starts, it scans the computer for EFI boot loaders, which fall into two or three categories, depending on how you're counting:
- BIOS-mode boot loaders -- These are handled differently for UEFI-based PCs and Macs, but in either case, if you select one of these, the machine uses a Compatibility Support Module (CSM) to launch an old-style BIOS boot loader, such as the BIOS version of GRUB. It's possible that this is what you're seeing -- a BIOS-mode GRUB that was installed to your computer because you installed Ubuntu in BIOS mode.
- EFI-mode boot loaders -- These all launch in the same way, but rEFInd includes code that makes for a general case and a special case within this category:
- Conventional
.efi
files -- Most EFI boot loaders come in files with names that end in .efi
, such as grubx64.efi
, which is the EFI-mode version of GRUB. For most of these files, rEFInd just launches them with no options. (There are some exceptions to this rule, but you needn't be concerned about them.) It's possible this is what you're seeing when you launch Ubuntu from rEFInd.
- Linux kernels -- Since version 3.3.0, the Linux kernel has provided a feature called the EFI stub loader, which turns the Linux kernel into its own EFI boot loader -- it can be run like an EFI program. Thus, rEFInd looks for common Linux kernel filenames (
vmlinuz-*
in the case of Ubuntu) and, if a cursory check makes them look like they're executable EFI programs, adds them to its menu. rEFInd can also locate matching initial RAM disk (initrd) files and can pass options the kernel needs to boot, either by extracting the data from files like Linux's /etc/fstab
or by using a dedicated configuration file, refind_linux.conf
, that rEFInd's installation script generates to go alongside the kernels. Criticially, rEFInd can find Linux kernels only on filesystems it can read. Most EFIs can read only FAT filesystems, but Linux kernels normally go on ext2/3/4fs, Btrfs, or some other Linux-native filesystem. Thus, you'll see Linux kernel boot options in rEFInd's menu only if you copy the kernels to a FAT filesystem or if you add EFI filesystem drivers to the rEFInd installation.
When you use rEFInd with either a BIOS-mode boot loader or a conventional EFI-mode boot loader like GRUB, rEFInd passes control to that boot loader, which may interact with the user. GRUB, in particular, is both a boot loader and a boot manager, so you're likely to see a GRUB menu after rEFInd launches it. Most other OSes have much simpler boot loaders than GRUB; these boot loaders launch their OSes without bothering to present options menus, except possibly if something goes wrong.
The EFI stub loader is a much simpler boot loader than GRUB; it does not present its own boot manager menu. Thus, when you use rEFInd to launch a Linux kernel via its EFI stub loader, you'll see no follow-on menu.
If your rEFInd menu has just one Ubuntu option, and if it launches GRUB, then you're booting using either a BIOS-mode GRUB or an EFI-mode GRUB. (You can tell which is the case by examining the description, which either specifies a legacy-mode boot or identifies the filename of the EFI-mode boot loader.)