I'm aware that this is >3 years old and might not be relevant for the original bug reporters any longer, but I stumbled upon this when having a similar issue and I might safe someone else time if running into a similar issue.
I had to recover a failing PVE system from booting, failing with `
symbol "grub_is_lockdown" not found.` as reported at e.g.
https://forum.proxmox.com/threads/grub-rescue-error-symbol-grub_is_lockdown-not-found.154139/
Trying to switch the PVE system to proxmox-boot-tool, I booted the OVH rescue system and prepared the chroot environment, then:
# proxmox-boot-tool format /dev/nvme0n1p1
[...]
# proxmox-boot-tool init /dev/nvme0n1p1
Re-executing '/usr/sbin/proxmox-boot-tool' in new private mount namespace..
UUID="" SIZE="535822336" FSTYPE="" PARTTYPE="" PKNAME="nvme0n1" MOUNTPOINT=""
E: '/dev/nvme0n1p1' has wrong partition type (!= c12a7328-f81f-11d2-ba4b-00a0c93ec93b).
But the partition itself looked as expected:
# sgdisk -i 1 /dev/nvme0n1 | grep -i c12a7328-f81f-11d2-ba4b-00a0c93ec93b Partition GUID code: C12A7328-F81F-11D2-BA4B-00A0C93EC93B (EFI system partition)
Turns out, there's a problem if
/run/udev isn't available inside the chroot.
proxmox-boot-tool checks for properly set `
PARTTYPE` via:
lsblk --bytes --pairs -o 'UUID,SIZE,FSTYPE,PARTTYPE,PKNAME,MOUNTPOINT'/dev/XXX
Compare this from outside the chroot:
# lsblk --bytes --pairs -o 'UUID,SIZE,FSTYPE,PARTTYPE,PKNAME,MOUNTPOINT' /dev/nvme0n1p1
UUID="09D3-420C" SIZE="535822336" FSTYPE="vfat" PARTTYPE="c12a7328-f81f-11d2-ba4b-00a0c93ec93b" PKNAME="nvme0n1" MOUNTPOINT=""
... with from inside the chroot
without /run/udev being mount-binded:
[EMAIL='root@rescue12-customer-eu:/#']#[/EMAIL] lsblk --bytes --pairs -o 'UUID,SIZE,FSTYPE,PARTTYPE,PKNAME,MOUNTPOINT' /dev/nvme0n1p1
UUID="" SIZE="535822336" FSTYPE="" PARTTYPE="" PKNAME="nvme0n1" MOUNTPOINT=""
Might be worth checking this also with sgdisk, or at least provide a hint in the error message what might be wrong about it, as it's really not obvious.
FTR, the fix/workaround is to make sure `
/run/udev` is available inside the chroot where `
proxmox-boot-tool` is invoked, like:
mount --bind /run/ /mnt/run/
HTH