Proxmox 7.X Fails to Boot After Sudden Power Outage


1. Problem

grub rescue> ls

(hd0) (hd0,gpt1) (hd0,gpt2) (hd0,gpt3)

grub rescue> ls (hd0)

error: unknown filesystem

grub rescue> ls (hd0,gpt1)

error: unknown filesystem

grub rescue> ls (hd0,gpt2)

error: unknown filesystem

grub rescue> ls (hd0,gpt3)

error: unknown filesystem

2. Solution

2.1 Step 1: Enter Debug Install Mode

Burn the corresponding version of Proxmox to a USB drive. At the boot screen, select the debug install mode.

When the screen prompts to press CTRL+D to continue for the first time, press CTRL+D. When the prompt appears a second time, do not press it immediately.

2.2 Resize /dev/pve/root LV and Then Resize Back

lvdisplay /dev/pve/root  # View the LV size

e2fsck -ff /dev/pve/root

resize2fs /dev/pve/root 995G  # size 996G – 1G

lvreduce -L -1G /dev/pve/root

lvextend -l +100%FREE /dev/pve/root

resize2fs /dev/pve/root 996G

2.3 Repair Boot

vgscan

vgchange -ay

mkdir /media/RESCUE

mount /dev/pve/root /media/RESCUE/

mount -t proc proc /media/RESCUE/proc

mount -t sysfs sys /media/RESCUE/sys

mount -o bind /dev /media/RESCUE/dev

mount -o bind /run /media/RESCUE/run

proxmox-boot-tool format /dev/sda2

proxmox-boot-tool init /dev/sda2

proxmox-boot-tool refresh

2.3 Restart


Leave a Reply

Your email address will not be published. Required fields are marked *