Hi Gerard,

Gerard ROBIN <[email protected]> writes:

> Hello,
>
> After a recent upgrade, the linux-image-6.19.6+deb14+1-amd64 kernel was
> installed on my Forky laptop, but when I restart my machine, the old kernel,
> linux-image-6.19.6+deb14-amd64, is selected by default. So I have two
> questions:
>
> Q1: Why isn't 6.19.6+deb14+1 selected by default?
> (When I select it manually, it works fine.)
>

This seems to be due to the alphabetic sorting order. Considering the 2
kernel names:

,----[ Notice the place marked by ^ ]
| linux-image-6.19.6+deb14-amd64
|                         ^ 
| linux-image-6.19.6+deb14+1-amd64
|                         ^
`----

The ascii code of '+' is 43, and '-' is 45, so '-' is considered a
bigger value so it's placed in higher precedence.

(I hope the kernel team can find a better naming scheme, as this is
really confusing for most users.)

> Q2: How can I make 6.19.6+deb14+1 the default kernel instead of
> linux-image-6.19.6+deb14-amd64 ?
>

You have a few options:

* Manually select the newer kernel in Grub during boot, and remove the
  older kernel, and after that it will use "+deb14+1".

* Change the GRUB_DEFAULT value in `/etc/default/grub'.

  - Find which entry the "+deb14+1" kernel is in /boot/grub/grub.cfg and
    use the unique ID of that entry in GRUB_DEFAULT. I used the
    following command and its output quoted below:

    ,----[ First line is the command I used ($ is the prompt) ]
    | $ sudo grep "Debian" /boot/grub/grub.cfg
    | menuentry 'Debian GNU/Linux' --class debian --class gnu-linux --class gnu 
--class os $menuentry_id_option 
'gnulinux-simple-c381db16-07ef-4cd9-b5c3-1363344ecbe9' {
    | submenu 'Advanced options for Debian GNU/Linux' $menuentry_id_option 
'gnulinux-advanced-c381db16-07ef-4cd9-b5c3-1363344ecbe9' {
    |         menuentry 'Debian GNU/Linux, with Linux 6.19.6+deb14-amd64' 
--class debian --class gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-6.19.6+deb14-amd64-advanced-c381db16-07ef-4cd9-b5c3-1363344ecbe9' {
    |         menuentry 'Debian GNU/Linux, with Linux 6.19.6+deb14-amd64 
(recovery mode)' --class debian --class gnu-linux --class gnu --class os 
$menuentry_id_option 
'gnulinux-6.19.6+deb14-amd64-recovery-c381db16-07ef-4cd9-b5c3-1363344ecbe9' {
    |         menuentry 'Debian GNU/Linux, with Linux 6.19.6+deb14+1-amd64' 
--class debian --class gnu-linux --class gnu --class os $menuentry_id_option 
'gnulinux-6.19.6+deb14+1-amd64-advanced-c381db16-07ef-4cd9-b5c3-1363344ecbe9' {
    |         menuentry 'Debian GNU/Linux, with Linux 6.19.6+deb14+1-amd64 
(recovery mode)' --class debian --class gnu-linux --class gnu --class os 
$menuentry_id_option 
'gnulinux-6.19.6+deb14+1-amd64-recovery-c381db16-07ef-4cd9-b5c3-1363344ecbe9' {
    `----

    Now this can get a little complicated as the new kernel entry is
    nested in a submenu: you need to get the whole path of the unique
    IDs, one from the "submenu", and one from the menuentry for
    6.19.6+deb14+1-amd64, and use the format
    "submenu_unique_id>menuentry_unique_id" (note the double quote is
    required). For my case, it's like below:
    
    
GRUB_DEFAULT="gnulinux-advanced-c381db16-07ef-4cd9-b5c3-1363344ecbe9>gnulinux-6.19.6+deb14+1-amd64-advanced-c381db16-07ef-4cd9-b5c3-1363344ecbe9"

  - Run `sudo update-grub' to let the new grub settings take effect.

After this, you should be using the newer kernel on your next boot.

Once you have the correct kernel, I would suggest that you remove the
older kernel(s), and set GRUB_DEFAULT back to 0, and run `sudo
update-grub' again to update it. Otherwise it will continue to use the
select kernel in future upgrades, which is mostly likely not what you
want.

> Thanks.

-- 
Regards,
Xiyue Deng

Attachment: signature.asc
Description: PGP signature

Reply via email to