Problem pinning kernel with proxmox-boot-tool

jonathan.young

Active Member
Apr 26, 2020
33
0
26
59
I am trying set boot image with: proxmox-boot-tool kernel pin 6.5.13-5-pve This reports back:

Code:
Set kernel '6.5.13-5-pve' in /etc/kernel/proxmox-boot-pin.
Refresh the actual boot ESPs now? [yN] y
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..

However, when I reboot, Proxmox always wants to use kernel 6.8.4-3-pve.

proxmox-boot-tool statusreports:
Code:
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
System currently booted with uefi

proxmox-boot-tool kernel listreports:
Code:
Manually selected kernels:
None.

Automatically selected kernels:
6.5.13-5-pve
6.8.4-3-pve

Pinned kernel:
6.5.13-5-pve

I have tried:
proxmox-boot-tool refresh
proxmox-boot-tool clean
proxmox-boot-tool reinit
and even proxmox-boot-tool init /dev/nvme0n1p2

all to no avail. Can anyone help me to get the right kernel booting. I can select the right kernel manually, but this machine is normally headless so it would b egreta if I can get this working.

Thanks
 
I think proxmox-boot-tool status should print your entries in the ESP partition if you boot via UEFI
The same entries that appear in the /etc/kernel/proxmox-boot-uuids file

¿Do you have folders for your boot options in the ESP?
 
proxmox-boot-tool status just gives:
Code:
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
System currently booted with uefi

My /etc/kernel/proxmox-boot-uuids file is present but empty. I think this is ok as I have another machine where proxmox-boot-tool does work as expected and the same file is empty on that machine.

My ESP partition (mounted at /boot/efi) looks like this:

Code:
ls -lr /boot/efi/*/*
/boot/efi/EFI/proxmox:
total 164
-rwxr-xr-x 1 root root 167936 Dec 10 14:11 grubx64.efi

/boot/efi/EFI/BOOT:
total 164
-rwxr-xr-x 1 root root 167936 Oct 25  2023 BOOTx64.EFI
 
According to Documentation, /etc/kernel/proxmox-boot-uuids must contain the uuids of the ESP partitions used. If not, your system will not be properly configured for using proxmox-boot-tool
proxmox-boot-tool init should add the ESP uuid to that file. If so, then do refresh

I do not use UEFI, but the tool modifies grub.cfg to achieve the same result.
 
You can use apt info proxmox-default-kernel command to see the default booting kernel, it should look something like this:

Code:
Package: proxmox-default-kernel
Version: 1.0.1
Priority: optional
Section: admin
Source: proxmox-kernel-meta
Maintainer: Proxmox Support Team <support@proxmox.com>
Installed-Size: 8,192 B
Depends: proxmox-kernel-6.5
Download-Size: 1,796 B
APT-Manual-Installed: no
APT-Sources: http://download.proxmox.com/debian/pve bookworm/pve-no-subscription amd64 Packages
Description: Default Proxmox Kernel Image
 This is a metapackage which will install the kernel image for the default
 Proxmox kernel series.

If not, you can edit/create /etc/apt/preferences.d/proxmox-default-kernel with the following content to pin corresponding kernel version (1.0.1) :

Code:
Package: proxmox-default-kernel
Pin: version 1.0.1
Pin-Priority: 1001
 
  • Like
Reactions: masipcat
Hi, thanks for all your help tsprox. It's working now but I am not sure why. I have a 'standard' install with no zfs:
Code:
/dev/nvme0n1p1      34       2047       2014  1007K BIOS boot
/dev/nvme0n1p2    2048    2099199    2097152     1G EFI System
/dev/nvme0n1p3 2099200 1953525134 1951425935 930.5G Linux LVM

apt info proxmox-default-kernel gives:
Code:
Package: proxmox-default-kernel
Version: 1.1.0
Priority: optional
Section: admin
Source: proxmox-kernel-meta
Maintainer: Proxmox Support Team <support@proxmox.com>
Installed-Size: 10.2 kB
Depends: proxmox-kernel-6.8
Download-Size: 2,196 B
APT-Manual-Installed: no
APT-Sources: http://download.proxmox.com/debian/pve bookworm/pve-no-subscription amd64 Packages
Description: Default Proxmox Kernel Image
 This is a metapackage which will install the kernel image for the default
 Proxmox kernel series.

N: There are 2 additional records. Please use the '-a' switch to see them.

I have kernel 6.5.13-5-pve pinned and proxmox boots that even given the above (which is what I need).

I had to umount /boot/efi and then I did
proxmox-boot-tool init /dev/nvme0n1p2 and then a proxmox-boot-tool init /dev/nvme0n1p2 grub as I boot from grub.

Code:
ls -l /boot/efi/
total 129240
drwxr-xr-x 4 root root     4096 Oct 25  2023 EFI
drwxr-xr-x 5 root root     4096 May  8 16:54 grub
-rwxr-xr-x 1 root root 51866875 Apr 10 10:49 initrd.img-6.5.13-5-pve
-rwxr-xr-x 1 root root 52753662 May  7 12:12 initrd.img-6.8.4-3-pve
-rwxr-xr-x 1 root root 13560936 Apr  5 12:03 vmlinuz-6.5.13-5-pve
-rwxr-xr-x 1 root root 14146664 May  2 12:55 vmlinuz-6.8.4-3-pve
which doesn't look right to me as my other machine has initrd and vmlinuz in /boot/ directory. Should I remove these from /boot/efi?
 

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!