You are not logged in.
I recently installed Arch on my laptop (UEFI mode). While setting up Arch I installed linux-lts. Later I decided to use both the linux stable and linux-lts. After installing linux stable, my GRUB still booted into older linux-lts. I actually wanted to use it as a fallback option. So, I referred to this :
https://wiki.archlinux.org/index.php/GR … le_entries
And, modified my GRUB menu entries using grub-customizer, to get latest stable linux to boot by default. I enabled GRUB's entry recalling function and timeout to let me to easily switch between linux and linux-lts. (BTW, I am using only single OS, Arch)
My question is, do grub prioritize latest kernel or the kernel installed first in order ? As I previously used Ubuntu, I observed that it's GRUB used to prioritize the latest kernel version. Why Arch's GRUB doesn't sets such priority ?
Last edited by Anonymous20210217 (2020-10-09 08:09:44)
Offline
Methinks GRUB2 config from grub-mkconfig makes usage of grubenv to store the latest booted kernel, so that’s unrelated to any default and it’s just a little persistence.
Otherwise I have no clue how you managed to end up with that behavior, because ArchLinux barely haves a sane default on the grub.cfg generator...
They get ordered in alphabetical order btw...
Without grub.cfg or anything that you may have changed its guessing game...
Offline
Afaik in the default config it picks the newer timestamp of the kernel image as the default.
Arch's GRUB doesn't set such a priority is because Arch just ships the default config as is without any adjustments. It's up to you to configure this.
Offline
Afaik in the default config it picks the newer timestamp of the kernel image as the default.
Arch's GRUB doesn't set such a priority is because Arch just ships the default config as is without any adjustments. It's up to you to configure this.
Or just write a grub.cfg manually...
No wonder I have no clue about the sh “magic” inside /etc/grub.d tho...
Offline
Ok. I think my question is not much clear so simplifying it....
My current kernel is LTS. I install new stable kernel. (Obviously it's version number is greater than LTS) Then I reboot and GRUB boots into LTS kernel again.
In other distros like Ubuntu, you see, if a new kernel is installed, it boots in that new kernel directly without any special configuration.
So why my grub is not booting into new kernel ? Why it still boots into older LTS kernel ? This means that grub-mkconfig don't set new kernel as default. I will need to do it manually.
Offline
Ok. I think my question is not much clear so simplifying it....
My current kernel is LTS. I install new stable kernel. (Obviously it's version number is greater than LTS) Then I reboot and GRUB boots into LTS kernel again.
In other distros like Ubuntu, you see, if a new kernel is installed, it boots in that new kernel directly without any special configuration.
So why my grub is not booting into new kernel ? Why it still boots into older LTS kernel ? This means that grub-mkconfig don't set new kernel as default. I will need to do it manually.
Yes you have to, because since you have not changed anything the old kernel is still stored as default in grubenv...
Don’t expect Arch to do things for you. :-)
Offline
GaKu999 wrote:
Yes you have to, because since you have not changed anything the old kernel is still stored as default in grubenv...Don’t expect Arch to do things for you. :-)
Okay, so it means that Ubuntu or other distros may do that thing readily for you.
But Arch expects this to be configured by user, giving the user more freedom in this regards.
This also means that there is no such thing as 'default kernel priority' in Arch GRUB. It will not set any priority itself as like Ubuntu. The user will need to set up this.
My doubt is cleared now. Thank you @GaKu999 & @V1del for you comments.
Marking this as solved.
Offline