How to edit rEFInd to make Ubuntu boot automatically in my Macbook Pro 15 2018?

I have been having quite a few rough days trying to install Ubuntu on a Macbook Pro 15 2018. With rEFInd and lots of help I've managed to install Ubuntu on the Mac. However, I'd like Ubuntu to start automatically without me having to select it in the rEFInd menu. How may I achieve this? Also what would happen after achieving this how would I be able to get back to the rEFInd menu?

Also when I boot onto Ubuntu from the rEFINd menu, the screen goes black with lots of lines of code and it takes 3 minutes to boot up (with a timer in the last line) is that normal? See screenshots:

Picture 1:

Picture 2:

P.D. From what I've read online (and found myself) the rEFInd file can be found on the path

/boot/efi/EFI/refind/refind.conf 

However, when I do ls -a from home directory, the boot folder does not appear, why is that so? How may I manually find the root folder? Is it even in the home directory?

1

1 Answer

The simplest way to get Ubuntu to start automatically, given your current setup, is to edit /boot/efi/EFI/refind/refind.conf (assuming rEFInd is installed in the usual place) and edit two options:

  • timeout -- This option sets the time that the rEFInd configuration screen appears. It defaults to 20 (seconds). You could set it to 1 to have the default OS boot quickly, or to -1 to have it boot without displaying the rEFInd menu at all. (In the latter case, you'd need to press a key as the machine powers up, and before rEFInd begins to execute, to "wake up" the rEFInd menu when you want to boot another OS.)
  • default_selection -- This option sets the default OS to be booted. The default for this option is to boot the last-booted OS. Uncomment one of the examples and change it or add a new one tailored for your system to have rEFInd always boot Ubuntu by default. Setting default_selection vmlinuz should work for a stock Ubuntu installation; or if you boot through GRUB 2, default_selection grubx64.efi should do the trick. Look at the description that appears on the rEFInd screen when you highlight the Ubuntu target you want to use to decide what to enter on this line.

You'll need root privileges to edit this file; you can't edit it (or even see it) as a normal user. Something like sudo nano /boot/efi/EFI/refind/refind.conf should open the nano editor on the file. (You can use any other editor you like instead of nano.)

As to the verbose boot screens, you can produce the simpler (but less informative) screen by adding quiet splash to the boot options, which are stored in /boot/refind_linux.conf. (If that file doesn't exist, then the mkrlconf script that comes with rEFInd should create it, when run from Ubuntu.) Add quiet splash to the end of the second quoted field in that file. For instance, if that line is currently this:

"Boot with standard options" "ro root=/dev/mapper/mylinux-u2004 "

...then you would change it to:

"Boot with standard options" "ro root=/dev/mapper/mylinux-u2004 quiet splash"

As with refind.conf, you must use sudo to edit /boot/refind_linux.conf.

Your Answer

Sign up or log in

Sign up using Google Sign up using Facebook Sign up using Email and Password

Post as a guest

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

You Might Also Like