Technical

Grub hangs when loading initramfs: fix it on Proxmox from the GRUB prompt

Grub hangs when loading initramfs: fix it on Proxmox from the GRUB prompt

Grub hangs when loading initramfs on Proxmox? It’s usually a broken initramfs or a ZFS pool that won’t import. You can fix it from the GRUB prompt without reinstalling.

Focused view of a modern data server rack with blinking lights in a blue-lit environment.

What’s happening

When GRUB loads the kernel and initramfs, it hands off to the initramfs to find your root filesystem. If the initramfs is corrupt, missing drivers, or can’t import your ZFS pool, it just sits there. No error, no panic, just a hang.

Boot from the GRUB prompt

At the GRUB menu, press c to get a command line. Then load your kernel and initramfs manually:

linux /vmlinuz root=ZFS=rpool/ROOT/pve-1 ro
initrd /initrd.img
boot

If that hangs too, the initramfs is likely bad. You’ll need to boot a live USB and chroot in.

Detailed view of a black data storage unit highlighting modern technology and data management.

Rebuild initramfs from a live USB

Boot a Proxmox ISO in rescue mode. Import your pool and chroot:

zpool import -f rpool
mount /dev/rpool/ROOT/pve-1 /mnt
mount --bind /dev /mnt/dev
mount --bind /proc /mnt/proc
mount --bind /sys /mnt/sys
chroot /mnt /bin/bash

Then rebuild the initramfs:

update-initramfs -u -k all
update-grub

That regenerates the initramfs with all current modules and fixes most hangs.

Check your ZFS pool

If the pool is degraded or has a missing device, the initramfs can hang trying to import it. Check status:

zpool status

If a disk is missing, replace it or remove it from the pool. Then update the initramfs again.

My take

This is annoying. The error message is useless—it just hangs. But it’s almost always the initramfs or ZFS. Rebuild first, check pool second. Don’t reinstall. I’d also keep a Proxmox ISO on a USB stick for rescue, it saves a lot of time.

If you’re on PVE 8 and thinking of upgrading to 9, check this post on the upgrade path before you do.

Leave a comment

Comments are reviewed before they appear. Your email is never published.