rEFInd showing multiple ubuntu after update

I use rEFInd to boot ubuntu from a Macbook Pro. Ubuntu asked me to update (not upgrade), and I did. When I restarted, rEFInd was showing two entries for ubuntu (Boot boot\vmlinuz-0.2.7 vs. 0.1.9 for example).

Is this problematic? Is there any way to remove the extra boot entry? Is there any way to prevent this from happening after future updates?


Solution 1:

This happened because a new kernel was installed, triggering that rEFInd created a new entry. vmlinuz is the name of the Linux kernel executable. When 2 or more kernels are installed, you can use either of them and select them at boot.

Is this problematic?

No. It's just a new entry, you can select either and you should boot on Ubuntu. Please, be aware that the newer kernel is normally better than the old one.

Is there any way to remove the extra boot entry?

There is no "extra". Just a new one, that includes the latest updates and fixes. When upgrading the packages again, the package management will delete the oldest kernel automatically. If you feel the newer kernel works fine, you can also uninstall the older kernel.

Is there any way to prevent this from happening after future updates?

You should not prevent this behavior, is totally expected and the best way to go. You also shouldn't prevent the kernel updates, since it leaves you with possible bugs and unsupported new hardware, or without latest optimizations.

One easy way to set your latest Ubuntu kernel as rEFInd default would be to use file manager to confirm location of refind.conf; if you are not sure already. A default rEFInd install would be /boot/efi/EFI/rEFInd/refind.conf but yours could be different.

Once the location is confirmed open gedit with superpowers gksu gedit /boot/efi/rEFInd/refind.conf making sure your refind location is used.

Use Ctrl + F and type "default_selection" in the text box that opens to find the location of setting that is needed to change. Change the numerical value to 2 or 3 according to where the icon is displayed by rEFInd at boot time. (numbers ascend left to right with no zero i.e.the first on left is 1).

Remember to uncomment the #default_selection line (the one we just edited) to make it applicable. Save the document and close gedit.

After making sure everything is behaving as expected after editing refind.conf; you could repeat the gedit procedure in order to change refind.conf file but this time adjusting the timeout 20 to a lower value. Setting it to 2 gives just about enough time to catch refind if needed (if paying attention) but will improve boot time left unattended.