Grub update failed during PVE 6.4 -> 7.1 upgrade - switch to UEFI boot?

j4ys0n

Member
Jan 15, 2020
38
7
13
i've upgraded 2 of the 4 nodes in my cluster already without issues, but on upgrading this current node, grub failed to update.

here are the relevant output lines from when the failure occurred.

Code:
Setting up pve-docs (7.1-2) ...
Setting up libpython2.7-stdlib:amd64 (2.7.18-8) ...
Setting up grub-pc (2.04-20) ...
Unknown device "/dev/": Inappropriate ioctl for device
Unknown device "/dev/": Inappropriate ioctl for device
Unknown device "/dev/": Inappropriate ioctl for device
Unknown device "/dev/": Inappropriate ioctl for device
/usr/sbin/grub-install: 14: warn: not found
/usr/sbin/grub-install: 14: warn: not found
Unknown device "/dev/": Inappropriate ioctl for device
Unknown device "/dev/": Inappropriate ioctl for device
Unknown device "/dev/": Inappropriate ioctl for device
Unknown device "/dev/": Inappropriate ioctl for device
Use of uninitialized value in string eq at /usr/share/perl5/Debconf/Element/Multiselect.pm line 38.
Use of uninitialized value in string eq at /usr/share/perl5/Debconf/Element/Multiselect.pm line 38.
/usr/sbin/grub-install: 14: warn: not found
/usr/sbin/grub-install: 14: warn: not found
Unknown device "/dev/": Inappropriate ioctl for device
Unknown device "/dev/": Inappropriate ioctl for device
Unknown device "/dev/": Inappropriate ioctl for device
Unknown device "/dev/": Inappropriate ioctl for device
Use of uninitialized value in string eq at /usr/share/perl5/Debconf/Element/Multiselect.pm line 38.
Use of uninitialized value in string eq at /usr/share/perl5/Debconf/Element/Multiselect.pm line 38.
/usr/sbin/grub-install: 14: warn: not found
/usr/sbin/grub-install: 14: warn: not found
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-5.13.19-6-pve
Found initrd image: /boot/initrd.img-5.13.19-6-pve
Found linux image: /boot/vmlinuz-5.4.174-2-pve
Found initrd image: /boot/initrd.img-5.4.174-2-pve
Found linux image: /boot/vmlinuz-5.4.114-1-pve
Found initrd image: /boot/initrd.img-5.4.114-1-pve
Found linux image: /boot/vmlinuz-5.4.73-1-pve
Found initrd image: /boot/initrd.img-5.4.73-1-pve
Found memtest86+ image: /ROOT/pve-1@/boot/memtest86+.bin
Found memtest86+ multiboot image: /ROOT/pve-1@/boot/memtest86+_multiboot.bin
done

and then at the end, the update process ran this..
Code:
Processing triggers for initramfs-tools (0.140) ...
update-initramfs: Generating /boot/initrd.img-5.13.19-6-pve
Running hook script 'zz-proxmox-boot'..
Re-executing '/etc/kernel/postinst.d/zz-proxmox-boot' in new private mount namespace..
/dev/disk/by-uuid/82F4-E7C8 contains no grub directory - skipping
/dev/disk/by-uuid/82F5-2486 contains no grub directory - skipping

i think i can update it manually, but i wanted to run that process by you guys so i don't potentially end up with a machine that doesn't boot!

i ran a few things to check the boot info/state:

Code:
root@phoenix:~# cat /etc/kernel/cmdline
root=ZFS=rpool/ROOT/pve-1 boot=zfs

root@phoenix:~# cat /etc/kernel/proxmox-boot-uuids
82F4-E7C8
82F5-2486

root@phoenix:~# proxmox-boot-tool kernel list
Manually selected kernels:
None.

Automatically selected kernels:
5.13.19-6-pve
5.4.174-2-pve

root@phoenix:~# proxmox-boot-tool status
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
System currently booted with legacy bios
82F4-E7C8 is configured with: uefi (versions: 5.4.114-1-pve, 5.4.73-1-pve)
82F5-2486 is configured with: uefi (versions: 5.4.114-1-pve, 5.4.73-1-pve)

root@phoenix:~# efibootmgr -v
EFI variables are not supported on this system.

and first part of the grub config

Code:
root@phoenix:~# cat /etc/default/grub
# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
#   info -f grub -n 'Simple configuration'

GRUB_DEFAULT=0
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="Proxmox Virtual Environment"
GRUB_CMDLINE_LINUX_DEFAULT="quiet"
GRUB_CMDLINE_LINUX="root=ZFS=rpool/ROOT/pve-1 boot=zfs"

I might not need to manually select the kernel as it looks like it's listed as automatically selected, but it probably can't hurt?
Code:
proxmox-boot-tool kernel add 5.13.19-6-pve

or I can probably just remove the old kernel:
Code:
proxmox-boot-tool kernel remove 5.4.174-2-pve

other than that, it looks like it might be good to go?


It looks like the difference might be that this system uses legacy boot and my other systems use UEFI boot. when i run the commands above on those UEFI systems, i get outputs that make sense. proxmox-boot-tool status says booted with UEFI and efibootmgr produces some efi boot output.
 
I have not seen that - thanks for sending.

Going through the guide - I'm pretty sure I started this server on 6.4, so proxmox-boot-tool is set up and looks to be configured. (at least the purchase dates line up to indicate that 6.4 was available before I purchased the hardware).

I haven't run any of the commands yet other than proxmox-boot-tool status.
https://pve.proxmox.com/wiki/ZFS:_Switch_Legacy-Boot_to_Proxmox_Boot_Tool#3._Verify_the_status
There's one thing in the guide that has me hung up, the guide says I should have grub or uefi,grub listed but my system only has uefi listed.

from the guide:
Code:
# proxmox-boot-tool status
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
373A-957C is configured with: grub
3961-474D is configured with: grub
3C07-40DC is configured with: grub

from my system:
Code:
# proxmox-boot-tool status
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
System currently booted with legacy bios
82F4-E7C8 is configured with: uefi (versions: 5.4.114-1-pve, 5.4.73-1-pve)
82F5-2486 is configured with: uefi (versions: 5.4.114-1-pve, 5.4.73-1-pve)

Everything else appears to be set up correctly. Should I try rebooting or should I try step 2?
https://pve.proxmox.com/wiki/ZFS:_S...ize_.26_Add_the_new_intermediate_boot_devices
 
Alternatively - I'm trying to figure out if I should switch to UEFI boot. I'm not totally sure why this system uses legacy bios boot as it's a newer board and its bios is UEFI. Maybe because the boot drives are SATA and not NVMe?
 

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!