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 ..

Moving VMWARE VM to Proxmox: The steps to follow

first download the OVFtool from VMARE and make sure you put the ‘bundle’  file on your Proxmox host. I used: VMware-ovftool-4.4.0-15722219-lin.x86_64.bundle

Make sure  sure the prerequisites of ovftool are present on the proxmox host
apt install libncursesw5

This file could be needed (I saw somewhere that someone had an error missing this dependency), so I installed it.

than make sure the VMWARE-ovftool can be executed so chmod it to ie. 755

install it with ./VMWARE-ovftool-xxxx
after the installation is finished it will tell you that it has been installed correctly

Than follow the following steps:

  1. ovftool vi:root@[vmware-machine]/[name-of-vm] .
    This will download the VM onto your Proxmox host
  2. qm importovf 200 [name-of-vm].ovf local-zfs
    this will convert your VM to Proxmox and put it on (in my case) local-zfs
    when ready you need to add a network card to the hardware in Proxmox, as this is not transferred from VMWARE
  3. Add the vmxnet3 driver for network in Proxmox
    boot the machine and login.

check the ensXX where XX can be different from VMWARE, so change it (easy to be seen with the command ‘ ip address ‘

change it to the correct new number in the file: /etc/networking/interface
shutdown machine again and reboot

VM is being converted from VMWARE to Proxmox

NB. I used Proxmox 6.2-10 with their ISO on a HP Gen8 MicroServer (Community Edition)