Rollback to Kernel 5.4

Veeh

Well-Known Member
Jul 2, 2017
70
13
48
38
Hi,

My node is running pve7.0 and I upgraded to Kernel 5.11.
I have been getting some Kernel Panic not syncing fatal exception in interrupt since the update.

I have been looking around to find out how to roll back to kernel 5.4 and set it as default in the grub but no luck so far.

My node is using zfs raid1 as boot drive.
Kernel 5.4 is still available in the boot selector, and I can get it, but I'm having trouble to set it as default.
So It seems that the GRUB_DEFAULT line doesn't have any effect.
I added the initrd path in the /etc/kernel/cmdline but it doesn't do anything.

Removing the kernel with apt-get doesn't work as well.
apt want to remove proxmox-ve

Any idea where to set the default grub option for a zfs boot drive ?
thanks.

Veeh
 
hi,

if you installed on a ZFS drive then you're most likely using systemd-boot instead of grub

check the output of proxmox-boot-tool status

proxmox-boot-tool kernel list should give you the list of kernels. you can also use the syntax proxmox-boot-tool kernel <add|remove> <kernel-version> to select which kernels you'd like, and use proxmox-boot-tool refresh at the end
 
Yes that's what I did but It did not help.

In fact right now I have both kernel as auto:

Code:
root@stmx:~# pve-efiboot-tool kernel list
Manually selected kernels:
None.

Automatically selected kernels:
5.11.22-1-pve
5.4.124-1-pve

Adding in switch the kernel from auto to manual, and If I remove it, it goes back to the auto list.
Looks like I can't remove it from the auto list

Does that make a difference it I use pve-efiboot-tool instead of proxmox-boot-tool ?
I have proxmox install on a UEFI bios.

Thanks Oguz
 
Does that make a difference it I use pve-efiboot-tool instead of proxmox-boot-tool ?
no, it's symlinked to proxmox-boot-tool :)

you can edit the loader.conf file in your ESP directory and change the default kernel there to the one you want to boot from.
 
I don't have any loader.conf file. In fact the folder /boot/efi/ is empty.
I do have /boot/grub/grub.cfg, but I have 3 kernels listed in there and I only get 2 during the boot selection.
So I don't think it will do anything.

I found this:
https://pve.proxmox.com/wiki/Host_Bootloader#sysboot_proxmox_boot_setup

Code:
root@stmx:/boot/grub# efibootmgr -v
BootCurrent: 0001
Timeout: 1 seconds
BootOrder: 0001,0002,0003,0004
Boot0001* UEFI OS       HD(2,GPT,61752e73-511e-45dc-95e2-e2fbf695401a,0x800,0x100000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Boot0002* UEFI OS       HD(2,GPT,c8d25321-2ccb-405f-ae48-0521179eeb0b,0x800,0x100000)/File(\EFI\BOOT\BOOTX64.EFI)..BO
Boot0003* Hard Drive    BBS(HD,,0x0)..GO..NO........O.S.T.8.0.0.0.V.N.0.0.2.2.-.2.E.L.1.1.2................>..Gd-.;
.A..MQ..L. . . . . . . . . . . . .A.Z.E.1.S.Y.Q.M.......BO..NO........O.S.e.a.g.a.t.e. .I.r.o.n.W.o.l.f. .Z.A.2.5.0.N.M.1.0.0.0.2.-.2.Z.G.1.0.0................>..Gd-.;
.A..MQ..L.T.7.0.A.2.0.K.F. . . . . . . . . . . . .......BO..NO........O.S.e.a.g.a.t.e. .I.r.o.n.W.o.l.f. .Z.A.2.5.0.N.M.1.0.0.0.2.-.2.Z.G.1.0.0................>..Gd-.;
.A..MQ..L.T.7.0.A.2.0.9.G. . . . . . . . . . . . .......BO..NO........O.S.e.a.g.a.t.e. .I.r.o.n.W.o.l.f. .Z.A.2.5.0.N.M.1.0.0.0.2.-.2.Z.G.1.0.0................>..Gd-.;
.A..MQ..L.T.7.0.A.2.0.Y.D. . . . . . . . . . . . .......BO..NO........O.S.a.m.s.u.n.g. .S.S.D. .8.4.0. .E.V.O. .2.5.0.G.B................>..Gd-.;
.A..MQ..L.1.S.B.D.S.N.F.A.6.B.5.4.6.5. .P. . . . .......BO..NO........O.S.e.a.g.a.t.e. .I.r.o.n.W.o.l.f. .Z.A.2.5.0.N.M.1.0.0.0.2.-.2.Z.G.1.0.0................>..Gd-.;
.A..MQ..L.T.7.0.A.2.0.J.F. . . . . . . . . . . . .......BO..NO........O.S.T.8.0.0.0.V.N.0.0.2.2.-.2.E.L.1.1.2................>..Gd-.;
.A..MQ..L. . . . . . . . . . . . .A.Z.E.1.S.Y.M.A.......BO..NO........O.S.T.8.0.0.0.V.N.0.0.2.2.-.2.E.L.1.1.2................>..Gd-.;
.A..MQ..L. . . . . . . . . . . . .A.Z.G.1.C.2.9.6.......BO

The entry is similar to exemple given in the doc:
Boot0006* Linux Boot Manager [...] File(\EFI\systemd\systemd-bootx64.efi)

So I assume I'm using systemd-boot.
Code:
root@stmx:/boot/grub# proxmox-boot-tool status       
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
System currently booted with uefi
3EA7-D733 is configured with: uefi (versions: 5.11.22-1-pve, 5.4.124-1-pve)
3EA8-06EA is configured with: uefi (versions: 5.11.22-1-pve, 5.4.124-1-pve)

I have added once again kernel 5.4 manually
Code:
root@stmx:/boot/grub# proxmox-boot-tool kernel list
Manually selected kernels:
None.

Automatically selected kernels:
5.11.22-1-pve
5.4.124-1-pve
root@stmx:/boot/grub# proxmox-boot-tool kernel add 5.4.124-1-pve
Added kernel '5.4.124-1-pve' to manual kernel list. Use the 'refresh' command to update the ESPs.
root@stmx:/boot/grub# proxmox-boot-tool refresh
Running hook script 'proxmox-auto-removal'..
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
Copying and configuring kernels on /dev/disk/by-uuid/3EA7-D733
        Copying kernel and creating boot-entry for 5.11.22-1-pve
        Copying kernel and creating boot-entry for 5.4.124-1-pve
Copying and configuring kernels on /dev/disk/by-uuid/3EA8-06EA
        Copying kernel and creating boot-entry for 5.11.22-1-pve
        Copying kernel and creating boot-entry for 5.4.124-1-pve
root@stmx:/boot/grub#  proxmox-boot-tool kernel list
Manually selected kernels:
5.4.124-1-pve

Automatically selected kernels:
5.11.22-1-pve

Still no loader.conf file in /boot/efi/
After the reboot, 5.11 is still the default kernel selected by the system.
 
This is bootctl status output:

Code:
Boot Loaders Listed in EFI Variables:
        Title: UEFI OS
           ID: 0x0001
       Status: active, boot-order
    Partition: /dev/disk/by-partuuid/61752e73-511e-45dc-95e2-e2fbf695401a
         File: └─/EFI/BOOT/BOOTX64.EFI
Code:
/dev/sda2: UUID="3EA7-D733" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="61752e73-511e-45dc-95e2-e2fbf695401a"

/dev/sda2 is a EFI system partition type.
the thing is that I cannot find it in the system used partitions.

I only see rpool mapped to the root. that's it.
 
I don't have any loader.conf file. In fact the folder /boot/efi/ is empty.
proxmox-boot-tool does not keep the ESP mounted during regular operations - it gets mounted when you run `proxmox-boot-tool refresh` (and other operations) - this also happens when you install a new kernel.

(The rationale behind this is - that there might be many ESPs configured for a system (e.g. all disks in your raid) and that the filesystem might get damaged when being mounted and there's a power-outage)

you can mount the ESPs manually and edit the config-files then (make sure to do that for all ESPs in the system)

I hope this helps!
 

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!