Set Default Kernel with Grub

adresner

Member
Mar 22, 2023
100
17
18
I'm getting mixed signals.
Found this: https://forum.proxmox.com/threads/select-default-boot-kernel.79582/post-398029
But
Also found this: https://pve.proxmox.com/wiki/Host_Bootloader#sysboot_kernel_pin
Even found this guy
https://www.youtube.com/watch?v=NU4oE1_huC4

Currently booting 6.2.9-1 which killed my hardware transcoding with my 13th Gen Intel. Manually rolled back to 6.2.6-1 and all good again. Would appreciate some guidance as I have never done this before and don't want to bork my install. Thank you
 
Last edited:
  • Like
Reactions: adresner
That does help, so at least I can focus on the official solution until the kernel and my new hardware are old friends.

Organizing some steps:

Code:
grep menu /boot/grub/grub.cfg

if [ x"${feature_menuentry_id}" = xy ]; then
menuentry_id_option="--id"
menuentry_id_option=""
export menuentry_id_option
set timeout_style=menu
set menu_color_normal=cyan/blue
set menu_color_highlight=white/blue
menuentry 'Proxmox VE GNU/Linux' --class proxmox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-simple-f99e4a6b-b6bf-473c-9780-6031fcda1048' {
submenu 'Advanced options for Proxmox VE GNU/Linux' $menuentry_id_option 'gnulinux-advanced-f99e4a6b-b6bf-473c-9780-6031fcda1048' {
menuentry 'Proxmox VE GNU/Linux, with Linux 6.2.9-1-pve' --class proxmox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.2.9-1-pve-advanced-f99e4a6b-b6bf-473c-9780-6031fcda1048' {
menuentry 'Proxmox VE GNU/Linux, with Linux 6.2.9-1-pve (recovery mode)' --class proxmox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.2.9-1-pve-recovery-f99e4a6b-b6bf-473c-9780-6031fcda1048' {
menuentry 'Proxmox VE GNU/Linux, with Linux 6.2.6-1-pve' --class proxmox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.2.6-1-pve-advanced-f99e4a6b-b6bf-473c-9780-6031fcda1048' {
menuentry 'Proxmox VE GNU/Linux, with Linux 6.2.6-1-pve (recovery mode)' --class proxmox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.2.6-1-pve-recovery-f99e4a6b-b6bf-473c-9780-6031fcda1048' {
menuentry 'Proxmox VE GNU/Linux, with Linux 5.15.104-1-pve' --class proxmox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.104-1-pve-advanced-f99e4a6b-b6bf-473c-9780-6031fcda1048' {
menuentry 'Proxmox VE GNU/Linux, with Linux 5.15.104-1-pve (recovery mode)' --class proxmox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.104-1-pve-recovery-f99e4a6b-b6bf-473c-9780-6031fcda1048' {
menuentry 'Proxmox VE GNU/Linux, with Linux 5.15.102-1-pve' --class proxmox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.102-1-pve-advanced-f99e4a6b-b6bf-473c-9780-6031fcda1048' {
menuentry 'Proxmox VE GNU/Linux, with Linux 5.15.102-1-pve (recovery mode)' --class proxmox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-5.15.102-1-pve-recovery-f99e4a6b-b6bf-473c-9780-6031fcda1048' {
menuentry "Memory test (memtest86+)" {
menuentry "Memory test (memtest86+, serial console 115200)" {
menuentry "Memory test (memtest86+, experimental multiboot)" {
menuentry "Memory test (memtest86+, serial console 115200, experimental multiboot)" {
menuentry 'UEFI Firmware Settings' $menuentry_id_option 'uefi-firmware' {
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change


I am booting

menuentry 'Proxmox VE GNU/Linux, with Linux 6.2.9-1-pve' --class proxmox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.2.9-1-pve-advanced-f99e4a6b-b6bf-473c-9780-6031fcda1048' {

But I want to boot

menuentry 'Proxmox VE GNU/Linux, with Linux 6.2.6-1-pve' --class proxmox --class gnu-linux --class gnu --class os $menuentry_id_option 'gnulinux-6.2.6-1-pve-advanced-f99e4a6b-b6bf-473c-9780-6031fcda1048' {

nano /etc/default/grub

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="quiet intel_iommu=on iommu=pt"

Edit the 4th line
From:
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
To:
???????
My guess:
GRUB_CMDLINE_LINUX_DEFAULT=“gnulinux-6.2.6-1-pve-advanced-f99e4a6b-b6bf-473c-9780-6031fcda1048”

Lastly run update-grub

Reboot and hold breath

I can’t seem to find on google or in the forums an example
 
I mistyped before. The section is 3.12.7. All you need to do is run proxmox-boot-tool kernel pin 6.2.6-1-pve as root if you want to pin the 6.2.6-1 kernel. (To find other kernels you have installed and which ones are available to download you can run apt list | grep pve-kernel.)
On reboot, grub will select the "advanced options" tab and directly boot into the kernel you pinned.

For future help: If you want to test things in proxmox but do not want to risk borking your system, you can set up a Proxmox VM inside of your Proxmox and try them there (see also the nested virtualization section in our wiki [1])

A little help here please?
I don't work Wednesdays. If you need time-critical responses you can get a subscription [2].

[1]: https://pve.proxmox.com/wiki/Nested_Virtualization
[2]: https://www.proxmox.com/en/proxmox-ve/pricing
 
  • Like
Reactions: adresner
I'm considering the subscription as I build out and test, coming over from UNRAID

That seems easy enough, thank you !
 
  • Like
Reactions: noel.
  • Like
Reactions: noel.

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!