Woke up this morning to this after enlarging a big disk yesterday:
The computer then tries to boot but fails with a Kernel panic:
Doing a quick google and including the word Proxmox leads me to this forum post with these solutions:
https://forum.proxmox.com/threads/servers-stuck-at-grub-rescue-attempt-to-read-or-write-outside-of-disk-hd0.116320/
this is usually the result of
– big disks or hardware raid (the latter might just “lie” about the disk size)
– in combination with legacy biosgrub gets the disk size from bios/HW raid firmware and honors that, even if the reported size might be lower than the actual disk size. if any of the files it needs to read (grub modules/.., kernel, initrd) are outside of this boundary you will get this error.
there are a few solutions/workarounds:
– switch to UEFI which handles modern disk sizes (but might not help if you are using HW raid)
– move /boot to another disk/partition that is small enough to not bother grub
– rewrite the affected files (workaround, requires “luck” so they end up in the front part of the disk)
Switching to UEFI
Let’s try this first as it seems the “simplest” solution:
Apparently not. First have to read the docs. Let’s see how this goes.
https://server.example.com:8006/pve-docs/chapter-qm.html#qm_bios_and_uefi
You can create such a disk with the following command:
# qm set <vmid> -efidisk0 <storage>:1,format=<format>,efitype=4m,pre-enrolled-keys=1
Where <storage> is the storage where you want to have the disk, and <format> is a format which the storage supports. Alternatively, you can create such a disk through the web interface with Add → EFI Disk in the hardware section of a VM.
Since <format> doesn’t have any tips, let’s try the UI instead.
That works! I have all my data back.