Fixing Proxmox boot ending in grub prompt with ZFS disks

I have removed my outdated how-to as it was not functional for my proxmox version (6.4x) during a planned reboot on 5-7-2021 .. I am lucky I did not had a power outtage earlier as that would have given me more troubles ..

Proxmox has made a great tool: proxmox boot tool .. and following the guidelines in the link below gave me a working proxmox in only minutes (it took some hours before I had a USB thumbdrive working (one defect one) ..

But there is a great how to here

Important parts

Repairing a System Stuck in the GRUB Rescue Shell

If you end up with a system stuck in the grub rescue> shell, the following steps should make it bootable again:

  1. Boot using a Proxmox VE version 6.4 or newer ISO
  2. Select Install Proxmox VE (Debug Mode)
  3. Exit the first debug shell by typing Ctrl + D or exit
  4. The second debug shell contains all the necessary binaries for the following steps
  5. Import the root pool (usually named rpool) with an alternative mountpoint of /mnt:
    zpool import -f -R /mnt rpool
  6. Find the partition to use for proxmox-boot-tool, following the instructions from Finding potential ESPs
  7. Bind-mount all virtual filesystems needed for running proxmox-boot-tool:
    mount -o rbind /proc /mnt/proc
    mount -o rbind /sys /mnt/sys
    mount -o rbind /dev /mnt/dev
    mount -o rbind /run /mnt/run
  8. change root into /mnt
    chroot /mnt /bin/bash
  9. Format and initialize the partitions in the chroot – see Switching to proxmox-boot-tool
  10. Exit the chroot-shell (Ctrl + D or exit) and reset the system (for example by pressing CTRL + ALT + DEL)
  11. Note: The next boot can end up in an initramfs shell, due to the hostid mismatch (from importing the pool in the installer).
    If this is the case, simply import it again with using the force -f flag:
    # zpool import -f rpool

This first part gives you the start to fix grub again

Find the partitions:

lsblk -o +FSTYPE

(in my situation) with the vfat > 512MB

format it again

# proxmox-boot-tool format /dev/sda2
# proxmox-boot-tool format /dev/sdb2

NB. I used the –forced option as there is data on the vfat

the init part

# proxmox-boot-tool init /dev/sda2
# proxmox-boot-tool init /dev/sdb2

and if needed (what was the case in my situation)

# proxmox-boot-tool clean

Reboot and I was up and running again with my node in my cluster ..