Crashed Proxmox4 reboots only to the grub boot prompt!?

zenny

Active Member
Jul 7, 2008
86
2
28
As @guletz stated at https://forum.proxmox.com/threads/c...n-grub-rescue-prompt.34172/page-2#post-168936, I am also getting only the grub boot prompt in a machine WITHOUT hw RAID with zfsroot running proxmox 4.4 which crashed without a reason.

Code:
grub > insmod zfs
grub > ls
(hd0) (hd0,gpt9) (hd0,gpt2) (hd0,gpt1) (hd1) (hd1,gpt9) (hd1,gpt1)
grub > ls (hd0,gpt1)
Partition hd0,gpt1: No known filesystem detected - Partition start at 17KiB - Total size 1007KiB
grub > ls (hd0,gpt2)
Partition hd0,gpt2: Filesystem type zfs - Label `rpool' - Last modification time 2017-10-18 19:56:24 Wednesday, UUID a1a8xxxxxxxxxxxxxxxx - Partition start at 1024KiB - Total size 1953505351KiB

Any input appreciated.

Cheers,
zenny
 

fabian

Proxmox Staff Member
Staff member
Jan 7, 2016
7,870
1,507
164
what does
"set"
and
"insmod normal"

output?
 

zenny

Active Member
Jul 7, 2008
86
2
28

Attachments

  • image-0-02-05-062b21127d489b4d1f839f0ec4b91588f0887f61cd9396f2097f44db74df18e3-V.jpg
    image-0-02-05-062b21127d489b4d1f839f0ec4b91588f0887f61cd9396f2097f44db74df18e3-V.jpg
    123.1 KB · Views: 87

fabian

Proxmox Staff Member
Staff member
Jan 7, 2016
7,870
1,507
164
and what does "ls (hd0,gpt2)/ROOT/pve-1@/boot/grub" say?
 

zenny

Active Member
Jul 7, 2008
86
2
28
Code:
grub > ls (hd0,gpt2)/ROOT/pve-1@/boot/grub
unicode.pf2 i386-pc/ locales/ fonts/ grubenv grub.cfg

When I checked the grub.cfg, the entries related to PVE have disappeared as seen at http://picpaste.com/P4fv0kEi.jpg

What is the right way to restore the entries with PVE running in zroot?
 
Last edited:

fabian

Proxmox Staff Member
Staff member
Jan 7, 2016
7,870
1,507
164
you can check with "ls (hd0,gpt2)/ROOT/pve-1@/boot/", if the kernel and initrd are there you can just boot manually, replace YOURKERNELVERSION according to the ls output (e.g., with "4.4.87-1-pve")

Code:
linux /ROOT/pve-1@/boot/vmlinux-YOURKERNELVERSION root=ZFS=rpool/ROOT/pve-1 boot=zfs
initrd /ROOT/pve-1@/boot/initrd.img-YOURKERNELVERSION

once booted, you can run "update-grub" to regenerate the config, and "grub-install /dev/WHATEVER" to re-install grub in the bios boot partition.

another approach would be to use a live environment, this would also work if you have no kernels or broken initrds in /boot:
  1. boot a live CD with ZFS support (e.g., any Ubuntu >= 16.04, or the Debug shell of the PVE installer)
  2. import pool with altroot into an empty target directory
  3. bind mount dev, proc and sys into the appropriate subdirectories
  4. chroot into the target directory
  5. install kernel packages and/or proxmox-ve if missing
  6. run update-initramfs -u
  7. run update-grub
  8. verify config, kernel and initramfs
  9. run grub-install /dev/FOO for all your boot disks
  10. exit chroot
  11. unmount target/{dev,sys,proc}
  12. export the pool
  13. reboot
 
  • Like
Reactions: chrone
Jun 28, 2019
25
1
8
Hello,

Thank you for this step-by-step, as I'm having the issue where I have no kernels.

I have a couple questions. For step 3, how is this accomplished? For step 5, would I need offline packages or should I be able to use apt/apt-get?

Thanks,
Craig

another approach would be to use a live environment, this would also work if you have no kernels or broken initrds in /boot:
  1. boot a live CD with ZFS support (e.g., any Ubuntu >= 16.04, or the Debug shell of the PVE installer)
  2. import pool with altroot into an empty target directory
  3. bind mount dev, proc and sys into the appropriate subdirectories
  4. chroot into the target directory
  5. install kernel packages and/or proxmox-ve if missing
  6. run update-initramfs -u
  7. run update-grub
  8. verify config, kernel and initramfs
  9. run grub-install /dev/FOO for all your boot disks
  10. exit chroot
  11. unmount target/{dev,sys,proc}
  12. export the pool
  13. reboot
 
Last edited:

fabian

Proxmox Staff Member
Staff member
Jan 7, 2016
7,870
1,507
164
3: using 'mount'
5: you should have your net access from outside the chroot available inside (thanks to bind-mounting /dev and /sys ;))
 
  • Like
Reactions: cjones

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get your own in 60 seconds.

Buy now!