rEFInd menu not showing on a dual Mac/Ubuntu machine
Solution 1
OSes sometimes reset the default boot program, particularly if they upgrade their standard boot loaders. There's really no way to prevent this from happening, so you must simply know how to correct the problem when it occurs. In Linux, this is done by using the efibootmgr
program. In OS X, it's done via bless
. See here for more on efibootmgr
.
If this juggling is happening every time you reboot, then something is seriously wrong. If Ubuntu is resetting GRUB as the default on every reboot, then personally, I'd remove it -- but I'm not a fan of GRUB (enough so that I forked rEFIt to make rEFInd rather than deal with GRUB). I suppose you could also put a call to efibootmgr
in a shutdown script, but that runs the risk of becoming disconnected from reality and causing problems, so I'd be reluctant to do that.
EDIT:
Yes, changing the BootOrder
variable (via the -o
option to efibootmgr
) as you suggest is appropriate. You can delete the OpenSUSE entry with:
sudo efibootmgr -b 0 -B
There may be OpenSUSE files installed that you can delete using rm
-- probably sudo rm -r /boot/efi/EFI/opensuse
from Ubuntu. (These files shouldn't do any harm per se, but they could be confusing or be accidentally re-activated in the future.) You can remove the Ubuntu GRUB in a similar way, although it might be re-installed if/when Ubuntu updates it in the future. Also, keeping it around as a backup method of booting may make sense.
If you leave Ubuntu's GRUB installed but don't want to see it in rEFInd's menu, you can use dont_scan_dirs
or dont_scan_files
in refind.conf
(probably /boot/efi/EFI/refind/refind.conf
from Ubuntu) to hide the GRUB entry.
Solution 2
This happened to me and I fixed it with the following while in Ubuntu (this is specific to your case as your Ubuntu boot is Boot0001*
):
sudo efibootmgr -o 80,1
If you type again sudo efibootmgr
, your boot order should be now BootOrder: 0080,0001
. This guarantees that Mac is booted first, and since rEFInd was installed in Mac, then it should come up first.
Related videos on Youtube
kernstock
Updated on September 18, 2022Comments
-
kernstock over 1 year
I'm having a little of a problem with rEFInd and couldn't find something specific about it.
I succesfully installed Ubuntu 14.04 for dual boot with OS X Yosemite on my MacBook Pro 3.1 using rEFInd but now after booting into Ubuntu the rEFInd menu doesn't show after a reboot. It just goes straight into grub. After booting again into OS X (using the option key on startup) sometimes rEFInd comes up, sometimes not, couldn't figure out how it is triggered.
Is there way to ensure rEFInd is coming up first, no matter which OS i booted previously?
Edit
Using
efibootmgr -v
gives me:BootCurrent: 0001 Timeout: 5 seconds BootOrder: 0001,0080,0000 Boot0000* opensuse-secureboot HD(4,1962b000,4e800,11f33185-0ff8-493d-86bd-b9fee568adb8)File(\EFI\opensuse\shim.efi) Boot0001* ubuntu HD(1,28,64000,7e798e0a-82c3-4719-95ed-d79675efd190)File(\EFI\ubuntu\shimx64.efi) Boot0080* Mac OS X HD(1,28,64000,7e798e0a-82c3-4719-95ed-d79675efd190)File(\EFI\refind\refind_x64.efi) Boot0081* Mac OS X ACPI(a0341d0,0)PCI(1f,2)03120a00000000000000HD(2,64028,1d02ba00,0b1ce04a-50b7-40b5-94f0-1a255d748d15) Boot0082* ACPI(a0341d0,0)PCI(1f,2)03120a00000000000000HD(2,64028,19490d60,20cc89c9-1320-4d70-b8bb-fffdf9900374) BootFFFF* ACPI(a0341d0,0)PCI(1f,2)03120a00000000000000HD(2,64028,19490d60,20cc89c9-1320-4d70-b8bb-fffdf9900374)File(\System\Library\CoreServices\boot.efi)
If I set the NextBoot with the
-n
-option to 0080, after reboot, rEFInd comes up. FFFF brings me directly into OSX. 0081 seems to fail.Thanks for the help!
-
kernstock over 8 yearsPlease see my edit above. So the next step, I assume, would be deleting the opensuse-entry(I removed this distro some time ago) and the set the BootOrder to "0080,0001,FFFF" for example. Is that correct? Additionally I would't mind to fully remove GRUB2, but how can I do this and get rEFInd to boot into Ubuntu directly? Will I have to install the EFI Stub Loader as pointed out on your website? Thanks again!
-
Rod Smith over 8 yearsPlease see my edit above.
-
kernstock over 8 yearsNow this definitely solved my question. But before I remove GRUB2 I would like to have rEFInd get its way into Ubuntu, but it doesn't. In the rEFInd menu I see two Ubuntu entries, one that says "grub_x64" and one that trys to boot directly into Ubuntu using the kernel vmlinuz-3.13.0-67-generic which, when selected, will hang in rEFInd-booting-prompt. Hitting F2 in the menu will let me choose my actual version (3.19.0-32-generic), but with the same result. When hitting F2 again the options show as in /boot/refind_linux.conf
ro quiet splash nomodeset vt.handoff=7
which are the same as in GRUB. -
Rod Smith over 8 yearsIs there a
root={something}
specification inrefind_linux.conf
? If not, it needs to be added. You should be able to get this working by running themkrlconf
script that comes with rEFInd, but you'll probably have to add the--force
option, as insudo mkrlconf --force
(but maybe with the complete path tomkrlconf
). If that still omits theroot=
option, please show me what happens when you typecat /proc/cmdline
. -
kernstock over 8 yearsThe
refind-linux.conf
that I made by using yourmkrlconf
-script has three entries with aroot=
-specification (see here). In GRUB2 I had to add the optionnomodeset
to get my nVidia-GPU running.cat /proc/comdline
gives me:BOOT_IMAGE=/boot/vmlinuz-3.19.0-32-generic root=UUID=1b9ece72-754f-4f4b-85c0-5b5ed6fc89e1 ro quiet splash nomodeset vt.handoff=7
. Also despite the boot process hangs visually in the rEFInd-booting-screen, the system seems to start, for example my fan-control-daemon is being started and fans go slow. -
kernstock over 8 yearsNow here is the boot-screen.
-
Rod Smith over 8 yearsIt looks OK to me. As a wild guess, try removing the
vt.handoff=7
option. (You can do this on a one-boot basis by hitting F2 or Insert twice to open a simple text editor on the boot options.) You could also try removing thenomodeset
option, just in case that's required only with GRUB. If both of those changes fail, you may need to continue booting through GRUB -- but of course you can do that via rEFInd, if you like. If it comes to that, you can remove the EFI filesystem driver to keep the options to boot the kernels directly out of the rEFInd menu. -
Rod Smith over 8 yearsAnother thought: You might try the
spoof_osx_version
option inrefind.conf
. It's uncommented by default, but there's a chance that uncommenting it will make your video hardware work. (OTOH, it could create new problems, like USB devices that become unresponsive; but you can always comment it back out if that happens.) -
Melebius over 6 yearsThe command above solved my problem. However, before blindly executing a
sudo
command, I found some documentation aboutefibootmgr
at wiki.gentoo.org/wiki/Efibootmgr.