PBS prompted for manual grub location selection on update

Sep 17, 2024
46
11
8
Today I ran the basic apt update && apt upgrade. I was greeted with a question from grub update about where I would like to install the grub bootloader. My system boots from dell raid controller using UEFI and has not asked such questions before when updating. I selected the /dev/sda as per that is the disk where the pbs itself is installed on. After selecting that, the installer created warning that the boot partition was under 1mb??

I have not yet tried to reboot the system but should I do some more checks before that to ensure my system would boot again without issues in UEFI mode?
 
It says that no updates available and running the dist-upgrade command returns that nothing is available...

How can I fix this?

I also thought that apt upgrade would not install updates that require the dist upgrade? That is the case at least on Ubuntu and basic Debian distros as they use different apt repos for different major versions of the os.
 
Last edited:
please post the output of
- pveversion -v
- efibootmgr -v
- mount

and the part of /var/log/apt/term.log covering the update with the prompt!
 
please post the output of
- pveversion -v
- efibootmgr -v
- mount

and the part of /var/log/apt/term.log covering the update with the prompt!
Here are the outputs:

Code:
root@pbs:~# pveversion -v
-bash: pveversion: command not found

Code:
root@pbs:~# efibootmgr -v
BootCurrent: 0007
BootOrder: 0007,0006,0003
Boot0000  PLDS DVD+/-RW DS-8ABSH    BBS(CDROM,PLDS DVD+/-RW DS-8ABSH,0x0)........................_...................................................... ......A.........................P.L.D.S. .D.V.D.+./.-.R.W. .D.S.-.8.A.B.S.H...
Boot0001  MLNX FlexBoot 3.4.100 (PCI 04:00.0)    BBS(128,MLNX FlexBoot 3.4.100 (PCI 04:00.0),0x0)................`...........p.........................................................A.....................M.L.N.X. .F.l.e.x.B.o.o.t. .3...4...1.0.0. .(.P.C.I. .0.4.:.0.0...0.)...
Boot0002  BRCM MBA Slot 0100 v21.6.0    BBS(128,BRCM MBA Slot 0100 v21.6.0,0x0)................f...........K.........................................................A.....................B.R.C.M. .M.B.A. .S.l.o.t. .0.1.0.0. .v.2.1...6...0...
Boot0003  EFI DVD/CDROM 1    PciRoot(0x0)/Pci(0x1f,0x2)/Sata(5,0,0)
Boot0006  Windows Boot Manager    HD(2,GPT,a29b0898-c4ec-4d50-8636-d27a8b57d00d,0xfa000,0x31800)/File(\EFI\Microsoft\Boot\bootmgfw.efi)WINDOWS.........x...B.C.D.O.B.J.E.C.T.=.{.9.d.e.a.8.6.2.c.-.5.c.d.d.-.4.e.7.0.-.a.c.c.1.-.f.3.2.b.3.4.4.d.4.7.9.5.}....................
Boot0007* proxmox    HD(2,GPT,bd85662a-a180-47fb-89c7-dfe993035fd8,0x3d2,0x200000)/File(\EFI\proxmox\shimx64.efi)
root@pbs:~#

Output of mount:
Code:
root@pbs:~# mount
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,relatime)
udev on /dev type devtmpfs (rw,nosuid,relatime,size=32841732k,nr_inodes=8210433,mode=755,inode64)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,nodev,noexec,relatime,size=6574980k,mode=755,inode64)
/dev/mapper/pbs-root on / type ext4 (rw,relatime,errors=remount-ro)
securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev,inode64)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k,inode64)
cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs (rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=8258)
mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
ramfs on /run/credentials/systemd-sysusers.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-tmpfiles-setup-dev.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
/dev/sdb1 on /mnt/datastore/backup-pool type ext4 (rw,relatime)
ramfs on /run/credentials/systemd-sysctl.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
ramfs on /run/credentials/systemd-tmpfiles-setup.service type ramfs (ro,nosuid,nodev,noexec,relatime,mode=700)
binfmt_misc on /proc/sys/fs/binfmt_misc type binfmt_misc (rw,nosuid,nodev,noexec,relatime)
sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
tmpfs on /run/user/0 type tmpfs (rw,nosuid,nodev,relatime,size=6574976k,nr_inodes=1643744,mode=700,inode64)
 
Here is the part of the term.log file when the update was started and finished.

It is showing the special characters also that the interactive prompt outputted to the terminal.

Before this last update it seems there are this kind of entries in the term.log file relating to grub stuff when the kernel image was updated:

Code:
Setting up proxmox-kernel-6.8.12-8-pve-signed (6.8.12-8) ...
Examining /etc/kernel/postinst.d.
run-parts: executing /etc/kernel/postinst.d/initramfs-tools 6.8.12-8-pve /boot/vmlinuz-6.8.12-8-pve
update-initramfs: Generating /boot/initrd.img-6.8.12-8-pve
I: The initramfs will attempt to resume from /dev/dm-0
I: (/dev/mapper/pbs-swap)
I: Set the RESUME variable to override this.
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
No /etc/kernel/proxmox-boot-uuids found, skipping ESP sync.
System booted in EFI-mode but 'grub-efi-amd64' meta-package not installed!
Install 'grub-efi-amd64' to get updates.
Couldn't find EFI system partition. It is recommended to mount it to /boot or /efi.
Alternatively, use --esp-path= to specify path to mount point.
run-parts: executing /etc/kernel/postinst.d/proxmox-auto-removal 6.8.12-8-pve /boot/vmlinuz-6.8.12-8-pve
run-parts: executing /etc/kernel/postinst.d/zz-proxmox-boot 6.8.12-8-pve /boot/vmlinuz-6.8.12-8-pve
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
No /etc/kernel/proxmox-boot-uuids found, skipping ESP sync.
System booted in EFI-mode but 'grub-efi-amd64' meta-package not installed!
Install 'grub-efi-amd64' to get updates.
run-parts: executing /etc/kernel/postinst.d/zz-systemd-boot 6.8.12-8-pve /boot/vmlinuz-6.8.12-8-pve
Couldn't find EFI system partition. It is recommended to mount it to /boot or /efi.
Alternatively, use --esp-path= to specify path to mount point.
run-parts: executing /etc/kernel/postinst.d/zz-update-grub 6.8.12-8-pve /boot/vmlinuz-6.8.12-8-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.8.12-8-pve
Found initrd image: /boot/initrd.img-6.8.12-8-pve
Found linux image: /boot/vmlinuz-6.8.12-6-pve
Found initrd image: /boot/initrd.img-6.8.12-6-pve
Found linux image: /boot/vmlinuz-6.8.12-5-pve
Found initrd image: /boot/initrd.img-6.8.12-5-pve
Found linux image: /boot/vmlinuz-6.8.4-2-pve
Found initrd image: /boot/initrd.img-6.8.4-2-pve
Found memtest86+ 64bit EFI image: /boot/memtest86+x64.efi
done
 

Attachments

You've got the attention of staff here. Hopefully they have a fix.


...
Is your datastore on a different disk than your OS? It sounds like it. Boy, that would be convenient right now ...
If this was me, and that datastore was on a different drive ...

Well I'd have a copy of the PBS 3.3.1 ISO handy when I reboot.
I would probably reinstall 'just in case', and then remount the datastore.
 
Instead: proxmox-backup-manager versions --verbose
This command reports versions as follows:
Code:
root@pbs:~# proxmox-backup-manager versions --verbose
proxmox-backup                     3.3.0         running kernel: 6.8.12-8-pve
proxmox-backup-server              3.3.3-1       running version: 3.3.3     
proxmox-kernel-helper              8.1.0                                     
proxmox-kernel-6.8                 6.8.12-8                                 
proxmox-kernel-6.8.12-8-pve-signed 6.8.12-8                                 
proxmox-kernel-6.8.12-6-pve-signed 6.8.12-6                                 
proxmox-kernel-6.8.12-5-pve-signed 6.8.12-5                                 
proxmox-kernel-6.8.4-2-pve-signed  6.8.4-2                                   
ifupdown2                          3.2.0-1+pmx11                             
libjs-extjs                        7.0.0-5                                   
proxmox-backup-docs                3.3.3-1                                   
proxmox-backup-client              3.3.3-1                                   
proxmox-mail-forward               0.3.1                                     
proxmox-mini-journalreader         1.4.0                                     
proxmox-offline-mirror-helper      0.6.7                                     
proxmox-widget-toolkit             4.3.6                                     
pve-xtermjs                        5.3.0-3                                   
smartmontools                      7.3-pve1                                 
zfsutils-linux                     2.2.7-pve1
 
You've got the attention of staff here. Hopefully they have a fix.


...
Is your datastore on a different disk than your OS? It sounds like it. Boy, that would be convenient right now ...
If this was me, and that datastore was on a different drive ...

Well I'd have a copy of the PBS 3.3.1 ISO handy when I reboot.
I would probably reinstall 'just in case', and then remount the datastore.
Yeah I do have the datastore on separate virtual disk of the raid controller and I can do a reinstall if this problem is not easily fixable. Also dumped everything to tape overnight in addition just to be sure...
 
Last edited:
  • Like
Reactions: tcabernoch
Code:
System booted in EFI-mode but 'grub-efi-amd64' meta-package not installed!
Install 'grub-efi-amd64' to get updates.

I think you got your answer there in the upgrade log ;) the prompt was likely for the legacy variant of grub, which is not the one you are using to boot..
 
Code:
System booted in EFI-mode but 'grub-efi-amd64' meta-package not installed!
Install 'grub-efi-amd64' to get updates.

I think you got your answer there in the upgrade log ;) the prompt was likely for the legacy variant of grub, which is not the one you are using to boot..
Okay but is my systems till bootable or did the grub update destroy my boot settings? How can I check this? I installed the grub-efi-amd64 package.
 
do you have an ESP mounted? the log looks kind of like your boot setup was broken before (only non-EFI packages installed, but no ESP mounted, but booted in EFI mode).

you should ensure
- booted using EFI (seems to be the case)
- ESP mounted or managed by proxmox-boot-tool (seems to not be the case)
- current and correct grub packages installed (seems to be the case now)
 
do you have an ESP mounted? the log looks kind of like your boot setup was broken before (only non-EFI packages installed, but no ESP mounted, but booted in EFI mode).

you should ensure
- booted using EFI (seems to be the case)
- ESP mounted or managed by proxmox-boot-tool (seems to not be the case)
- current and correct grub packages installed (seems to be the case now)
Yes, my system is booted in UEFI mode, legacy boot is disabled in the bios of the server.
How can I get the proxmox-boot-tool to mount and manage the ESP partition?

It seems there is no fstab entry for mounting the efi partition at all. I cannot understand why? This server was installed in uefi only mode.
 
Last edited:
Okay I just ran proxmox-boot-tool init /dev/sda2
which seemed to work without errors. I got the output below:

Code:
root@pbs:~# proxmox-boot-tool init /dev/sda2
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
UUID="1D5B-900D" SIZE="1073741824" FSTYPE="vfat" PARTTYPE="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" PKNAME="sda" MOUNTPOINT=""
Mounting '/dev/sda2' on '/var/tmp/espmounts/1D5B-900D'.
Installing grub x86_64 target..
Installing for x86_64-efi platform.
Installation finished. No error reported.
Installing grub x86_64 target (removable)..
Installing for x86_64-efi platform.
Installation finished. No error reported.
Unmounting '/dev/sda2'.
Adding '/dev/sda2' to list of synced ESPs..
Refreshing kernels and initrds..
Running hook script 'proxmox-auto-removal'..
Running hook script 'zz-proxmox-boot'..
No /etc/kernel/cmdline found - falling back to /proc/cmdline
Copying and configuring kernels on /dev/disk/by-uuid/1D5B-900D
        Copying kernel 6.8.12-6-pve
        Copying kernel 6.8.12-8-pve
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-6.8.12-8-pve
Found initrd image: /boot/initrd.img-6.8.12-8-pve
Found linux image: /boot/vmlinuz-6.8.12-6-pve
Found initrd image: /boot/initrd.img-6.8.12-6-pve
done
        Disabling upstream hook /etc/initramfs/post-update.d/systemd-boot
        Disabling upstream hook /etc/kernel/postinst.d/zz-systemd-boot
        Disabling upstream hook /etc/kernel/postrm.d/zz-systemd-boot
root@pbs:~#

I will try to reboot this soon. I think this fixed the grub updating and the ESP should now be managed by the proxmox-boot-tool