[SOLVED] PVE 9 - GRUB stops the machine immediately

hidigoudi

New Member
Aug 27, 2023
11
0
1
Hello,

I performed the upgrade from PVE 8.4.9 to 9.0.3 yesterday without any error during the Debian 12 > 13 upgrade by following the documentation.

However, since I rebooted, I'm stuck in the "Welcome grub" step during around 0.5 seconds and then the machine reboots immediately and goes in BIOS setting itself. I can't even reach the list of kernels I can boot from.

I booted using systemrescuecd ISO and chroot inside my system, I find nothing weird or broken, I tried :

Code:
grub-install /dev/sdX
Code:
update-grub
Code:
apt install -f
Code:
dpkg configure -a

All commands work without any error, grub is correctly installed (2.12-9+pmx2 version). I can't figure out what is going on...

I'm on EFI system and the BIOS settings did not change since the upgrade of yesterday (obviously).

PS: My CPU is an Intel Core i5 7400 and my BIOS / MB is American Megatrends version 2.18.1263

Is someone able to help me ?

Thank you.
 
Last edited:
did you mount all the required file systems before chrooting (including the ESP and things like /dev /sys /proc ?)?

could you post the full output of the following commands, running inside the chroot:

Code:
apt update
apt full-upgrade
apt policy
pveversion -v
proxmox-boot-tool status
grub-install --target x86_64-efi --no-floppy --bootloader-id proxmox /dev/sdX
grub-install --target x86_64-efi --no-floppy --bootloader-id proxmox --removable /dev/sdX
efibootmgr -v
update-grub
 
did you mount all the required file systems before chrooting (including the ESP and things like /dev /sys /proc ?)?
Yes, I mounted /, /boot, /boot/efi and also :
Code:
mount --bind /dev /mnt/dev
mount --bind /sys /mnt/sys
mount --bind /proc /mnt/proc
Then :
Code:
chroot /mnt

Then, I had to do this (inside the chroot) :
Code:
mount -t efivarfs efivarfs /sys/firmware/efi/efivars

Unfortunately, I can't send you the output of commands you asked now (I have no access to the server right now).

The only thing I'm sure because I already did it is :
  • apt update -> No error, no package to upgrade
  • apt full-upgrade -> No error, everything is up to date
  • pveversion -v -> 9.0.3
  • grub-install /dev/sdX -> No error + correctly installed
  • efibootmgr -v -> I have several boot "slots", the first one in the order is Debian system (00008)
I will be able to show you more information later.
 
I did these 3 commands :
Code:
proxmox-boot-tool status
grub-install --target x86_64-efi --no-floppy --bootloader-id proxmox /dev/sdX
grub-install --target x86_64-efi --no-floppy --bootloader-id proxmox --removable /dev/sdX

The first one showed :
E: /etc/kernel/proxmox-boot-uuids does not exist.

The 2 last commands for grub-install ran successfully. I rebooted the machine, now I'm able to access to GRUB and list kernels !

However, the initramfs shell appears instead of the system. I tried in addition :
Code:
update-initramfs -u
But same issue.
 
Last edited:
Problem solved : I had to rebuild the initramfs of all kernels :
Code:
update-initramfs -u -k all

I still don’t know what happened during the initial upgrade, as everything appeared to be fine. I have 3 others Proxmox machines in a cluster, I hope it will not be the same behavior.
 
Last edited:
the efibootmgr output would be interesting - I suspect you were booting from the removable boot loader entry and that got out of sync with the rest of the ESP.

could you run "proxmox-boot-tool refresh" and post the output here?
 
Code:
root@proxmox:~# 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..
No /etc/kernel/proxmox-boot-uuids found, skipping ESP sync.
root@proxmox:~#
The efibootmgr -v command output before the correction showed "debian" efi file instead of "proxmox" I got thanks to:
Code:
grub-install --target x86_64-efi --no-floppy --bootloader-id proxmox /dev/sdX

Now, I have :
Code:
root@proxmox:~# efibootmgr -v
BootCurrent: 0000
Timeout: 2 seconds
BootOrder: 0000,0001,0004,0008,000A,0009
Boot0000* proxmox    HD(1,GPT,8a89e9f3-5db5-4036-8a11-2f21995b9f4e,0x800,0x17800)/File(\EFI\PROXMOX\SHIMX64.EFI)
      dp: 04 01 2a 00 01 00 00 00 00 08 00 00 00 00 00 00 00 78 01 00 00 00 00 00 f3 e9 89 8a b5 5d 36 40 8a 11 2f 21 99 5b 9f 4e 02 02 / 04 04 36 00 5c 00 45 00 46 00 49 00 5c 00 50 00 52 00 4f 00 58 00 4d 00 4f 00 58 00 5c 00 53 00 48 00 49 00 4d 00 58 00 36 00 34 00 2e 00 45 00 46 00 49 00 00 00 / 7f ff 04 00