Can't change default boot entry

Setting a default kernel does not currently work properly with grub and btrfs.

What you can do instead is enable the last booted kernel to be used. This is not perfect but it is an adequate workaround to setting a permanent default kernel. To get this working is a bit of a pain, but unless you follow this procedure you will not be able to alter the kernel which is normally booted.

Before editing important root configuration files be sure to make a backup first. Backup /etc/default/grub before editing grub's configuration fie:

sudo cp /etc/default/grub /etc/default/grub.bak

In the file /etc/default/grub change GRUB_DEFAULT="0" to GRUB_DEFAULT="2" as below:

GRUB_DEFAULT="2"

Comment out GRUB_SAVEDEFAULT="false" or GRUB_SAVEDEFAULT="true" as below:

#GRUB_SAVEDEFAULT="true" 

Then run:

sudo update-grub

Then reboot into the kernel you wish to use normally.

Then remove all the kernels you don't want to boot into normally with the command below:

sudo mhwd-kernel -r linux-zen

Substitute whichever other kernels you want to remove instead of linux-zen into the command above.

Remove all the kernels you don't want to boot normally, leaving only the kernel you want to boot into on a regular basis, (such as linux-lts, or another)

Then reboot, and then reinstall the other kernels youd like to have as extras using mhwd with the command below:

sudo mhwd-kernel -i linux-zen

Substitute whichever other kernels you want to install instead of linux-zen into the command above and repeat for each spare kernel you wish installed.

To make this work you must delete all kernels except the one you want to boot into, then restart. After that you can add the extra kernels you wish and your originally installed kernel should continue to boot every time now.

6 Likes