Menu

Booting into GRUB rather than rEFInd

2015-12-09
2015-12-09
  • Ella Batiste

    Ella Batiste - 2015-12-09

    I'm on a macbook air 2011 11" running el capitan 10.11.1, and I followed the guide over here to install:
    http://www.rodsbooks.com/refind/sip.html

    I then made a usb image of fedora 23, rebooted holding 'option', booted into the live fedora cd, installed it onto a free partition, then restarted to see if rEFInd would work. It looks like it's going straight to the GRUB screen, with a list of my fedora os and also my OS X, but my OS X gives an error and won't load.

    Anyways, it seems that I've done something wrong, but I'm not sure how to fix this. Is there some config setting I need to adjust or something?

     
  • Roderick W. Smith

    No, you did nothing wrong. The issue is basically the same as it's always been: Most OSes install their own boot loaders (GRUB 2 in the case of Fedora) and set them to be the default. Unless the installer gives you an option to not do this and you use it, that's what happens.

    Fortunately, the solution is relatively easy: You need to reset rEFInd to be the default boot loader. In Fedora, you can do this by setting the boot order with efibootmgr -- type efibootmgr -v (as root) to see a list of boot options and the current BootOrder, then use the -o option to change that order. Alternatively, you could re-install rEFInd. This is easier, but it's more of an "overkill" option.

    Note that either Fedora or OS X may reset the boot loader to suit its preferences at any time. (This normally happens after system updates that impact the boot loader.) Removing the GRUB 2 package from Fedora might prevent it from making such changes, but I'm not sure offhand how difficult that is in Fedora. I know of no way to keep OS X from reconfiguring its boot loader. Fortunately, such changes tend to be rather rare.

     
  • Ella Batiste

    Ella Batiste - 2015-12-09

    Awesome, I reinstalled refind and it seems to work now. Thanks!

    However, I'm seeing 7 icons for fedora in refind:

    OS X
    Boot Mac OS X from Linux HFS+ ESP
    Boot EFI\BOOT\fallback.efi from Linux HFS+ ESP
    Boot EFI\fedora\grubx64.efi from Linux HFS+ ESP
    Boot EFI\fedora\gcdx64.efi from Linux HFS+ ESP
    Boot EFI\fedora\fwupx64.efi from Linux HFS+ ESP
    Boot Fallback boot loader from Linux HFS+ ESP
    Boot vmlinuz-0-rescue-1646e5bd9bb24f93a48e1cbd2c1fe9b6 from 500 MiB ext4 volume

    Apparently a hfs+ partition was created at some point during my installation. Is that normal for all that to show up? How can I hide the ones I don't need?

     
  • Roderick W. Smith

    Unfortunately, it is normal, although not desirable. Some distributions, such as Fedora, are now littering the ESP with multiple boot loaders and other specialty programs. rEFInd filters some of these automatically, but some of them get through.

    The first thing I recommend you do is to use touch to update the timestamp on a kernel other than your rescue kernel (vmlinuz-0-rescue-1646e5bd9bb24f93a48e1cbd2c1fe9b6). Type ls /boot/vml* to see all your kernels, then locate the most recent non-rescue kernel and use touch on it (as in touch /boot/vmlinuz-4.2.0 or whatever its name is). This will make the non-rescue kernel become the default, rather than the rescue kernel, in the rEFInd main menu. (You'll still be able to launch the rescue kernel by highlighting the regular kernel and hitting F2 or Insert to see a menu of options.) Alternatively, you can set fold_linux_kernels false in refind.conf to show all the kernels on the main menu rather than "fold" them all into one entry. You may want to reboot and test this to see that it works. Alternatively, if you want to boot via GRUB, you can remove the ext4fs driver from rEFInd's drivers directory (probably /boot/efi/EFI/refind/drivers_x64 from Linux). This will keep the kernels out of the rEFInd main menu.

    With that done, you can use some combination of dont_scan_files, dont_scan_dirs, and dont_scan_volumes in refind.conf (probably /boot/efi/EFI/refind/refind.conf in Linux) to trim your boot entries. These options are described in the online documentation and in comments preceding their commented-out examples in refind.conf. If you do't want to use GRUB at all, the easiest way to proceed is probably to use dont_scan_volumes "Linux HFS+ ESP" to tell rEFInd to ignore the Linux HFS+ ESP partition. (Fedora created it, by the way.) That should get rid of all the cruft in one swoop. If you want to retain the option of booting through GRUB from rEFInd, you'll need to use finer-grained dont_scan_* options.

     

Log in to post a comment.

Want the latest updates on software, tech news, and AI?
Get latest updates about software, tech news, and AI from SourceForge directly in your inbox once a month.