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:
- Boot using a Proxmox VE version 6.4 or newer ISO
- Select
Install Proxmox VE (Debug Mode)
- Exit the first debug shell by typing
Ctrl + D
orexit
- The second debug shell contains all the necessary binaries for the following steps
- Import the root pool (usually named
rpool
) with an alternative mountpoint of/mnt
:-
zpool import -f -R /mnt rpool
-
- Find the partition to use for
proxmox-boot-tool
, following the instructions from Finding potential ESPs - 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
-
- change root into
/mnt
-
chroot /mnt /bin/bash
-
- Format and initialize the partitions in the chroot – see Switching to proxmox-boot-tool
- Exit the chroot-shell (
Ctrl + D
orexit
) and reset the system (for example by pressingCTRL + ALT + DEL
) - Note: The next boot can end up in an
initramfs
shell, due to thehostid
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
- If this is the case, simply import it again with using the force
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 ..