Grub failure ZFS

killmasta93

Renowned Member
Aug 13, 2017
958
56
68
30
Hi,
Currently was wondering whats the current wiki to check this information, Recently i had a grub failure on proxmox legacy mode and i had to format it so i was checking around but really didn't find anything only this wiki but i think its outdated
https://pve.proxmox.com/wiki/Recover_From_Grub_Failure

I did read something about booting proxmox ISO and run in debug mode and import the rpool but not sure whats the next step?


Thank you
 
Hi,

this WIKI is not outdated it is for LVM default installation.

instead, lvscan you use the "zpool import"

the rest is the same.
 
allright so this is what i have done so far, maybe if this works ill write up a new tutorial so it can get updated on the wiki
zpool import -R /mnt/ rpool
mkdir /media/RESCUE

So these parts how would they apply on zfs?
  • sudo mount /dev/pve/root /media/RESCUE/
i tried
mount /mnt/rpool/ROOT /media/RESCUE

but i get is not a block device

as for the /dev/sda1, because its in ZFS i would mount the 2 disks which contains the grub?
im guessing its the /dev/sda2 and /dev/sdb2 which both have size of 512mb

  • sudo mount /dev/sda1 /media/RESCUE/boot

and guessing these other parts would be the same?
  • sudo mount -t proc proc /media/RESCUE/proc
  • sudo mount -t sysfs sys /media/RESCUE/sys
  • sudo mount -o bind /dev /media/RESCUE/dev
Thank you
 
the problem here is ZFS tries to automount the imported pool.
But as the error message say "/" is not empty.
so you have to change the mount point.

Code:
zfs set mountpoint=/media/RESCUE
zfs mount rpool/ROOT/pve-1

after you reinstall grub you have to set the mount point back to "/" and export the rpool
 
Thanks for the reply, i somewhat got confused so
these would be the steps at first?

zpool import -R /mnt/ rpool
mkdir /media/RESCUE
zfs set mountpoint=/media/RESCUE
zfs mount rpool/ROOT/pve-1
 
Yes this is the first step.
after you have mount the pool to the correct path you can follow the wiki.
 
Thanks for the reply,
i tried this

zpool import -R /mnt/ rpool
mkdir /media/RESCUE
zfs set mountpoint=/media/RESCUE rpool



but when i try running zfs mount rpool/ROOT/pve-1
i get cannot open rpool/ROOT/pve dataset does not exist
 
Please send the output of this command

Code:
zfs get mountpoint,mounted
 
Thanks for the reply, as at #7 i tried following the commands but then on #9 showed the issue
 

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 yours easily in our online shop.

Buy now!