How to set grub to boot into latest kernel?

  • I cannot get grub to boot into the latest kernel. OS filesystem is btrfs


    Here the /etc/default/grub

    after running grub-update I get


    but after reboot I still get the 5.16 kernel

    Code
    19:41:20 root@hawk:/# uname -a
    Linux hawk 5.16.0-0.bpo.4-amd64 #1 SMP PREEMPT Debian 5.16.12-1~bpo11+1 (2022-03-08) x86_64 GNU/Linux
    19:42:05 root@hawk:/# 

    Before that I tried to set the latest kernel by the kernel plugin, but that did not change anything either.


    Thanks for ideas

  • macom

    Changed the title of the thread from “How to set grub to boot into latest kernel” to “How to set grub to boot into latest kernel?”.
  • Do you have grub installed on more than one drive? You could also just remove the 5.16 kernel. apt-get will warn you but you can still do it.

    omv 6.0.41-1 Shaitan | 64 bit | 5.19 proxmox kernel | plugins :: omvextrasorg 6.1.1 | kvm 6.1.23 | mergerfs 6.3.3 | zfs 6.0.11
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • I just think update-grub might be writing to the wrong drive.

    omv 6.0.41-1 Shaitan | 64 bit | 5.19 proxmox kernel | plugins :: omvextrasorg 6.1.1 | kvm 6.1.23 | mergerfs 6.3.3 | zfs 6.0.11
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • /boot/grub/grub.cfg

    on the old drive is just showing the 5.16 and 5.10 kernel


    but maybe it is booting from the old drive. When moving to the new drive I cloned with clonezilla and changed the UUID of the old boot filesystem. So the entry in grub.cfg on the old drive is pointing at the new drive.


    Will attach a monitor and check.

    Thank

  • changing the uuid won't change anything with the bios choosing which drive to boot from.

    omv 6.0.41-1 Shaitan | 64 bit | 5.19 proxmox kernel | plugins :: omvextrasorg 6.1.1 | kvm 6.1.23 | mergerfs 6.3.3 | zfs 6.0.11
    omv-extras.org plugins source code and issue tracker - github


    Please try ctrl-shift-R and read this before posting a question.
    Please don't PM for support... Too many PMs!

  • Yep, that is what I thought. Now connected a monitor. Weird thing is, that the boot menu showed two options. The current drive (USB thumb drive) and another drive, which is a data drive as first option. I now disabled the data drive (no grub installed there), so that only the USB drive is left. Now it booted into the latest kernel.

    Do not fully understand what happened, but at least it is booting now correctly. Maybe spend some time to investigate at the weekend.


    Thank you for the help.

  • macom

    Added the Label resolved

Participate now!

Don’t have an account yet? Register yourself now and be a part of our community!