1

I recently installed Arch on one of my machines. I installed grub in UEFI mode. While setting up Arch, I had installed linux-lts. I used it for some days, and later decided to use both LTS and regular kernel. So, I installed linux (regular) package. After its installation, I assumed grub to boot into the latest linux. But, it continued to boot into older linux-lts. I tried to regenerate initramfs and updated grub a few times but didn't succeed. To get grub to boot in latest linux, I had to edit grub menu entries using grub-customizer.

Is this normal behavior of grub ? I had read somewhere that grub actually prioritize latest kernel if found and boots in it directly. Then, in my case why is this different ? Have I misconfigured something ?

1 Answer 1

1

I found the expected behaviour of grub's default kernel priority. As I stated in question, grub is actually able to detect the greater version number of a kernel and set it as the default kernel. When grub-mkconfig is called, it loads shell scripts in /etc/grub.d. One of the script is /etc/grub.d/10_linux. This script has a function version_find_latest that helps to actually detect the new version. More info here : https://askubuntu.com/questions/1254758/how-does-update-grub-decide-which-kernel-to-set-as-the-default

I was not able to figure out what was wrong with my Arch system, though. I had to reinstall the system due to some critical error caused by my mistake and later I switched my distribution.

But, as Arch uses the same command grub-mkconfig and it also has same scripts in /etc/grub.d, it should show the same behaviour.

See : https://archlinux.org/packages/core/x86_64/grub/

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .