I get only one successful boot after installation Proxmox Backup Server. Plz help)

scar83

Member
Mar 17, 2021
7
1
8
34
It is weird.

So i installed PBS 1.0-1 on good ol` HP DL120 G7. I use SanDisk USB Stick as system drive because all four SATA drive bays in this server is occupied by hard drives.

I choosed ZFS as root filesystem. Installation runs flawlessy. After installation server rebooted itself and i got awesome and fully functional PBS server.

BUT! It was so only to next reboot (no updates nor other changes) and after it i get error:

Attempting Boot From USB DriveKey (C:) error: unknown filesystem Entering rescue mode grub rescue>...

Now i dont know what i should do... I reinstalled whole thing several times with same result.

I used this exact same configuration on this server and this USB Stick for year with FreeNAS.

Any tips? I will appreciate any help. I attached some screenshotes...
 

Attachments

  • HPLOCONS_Bcxvf00NvJ.png
    HPLOCONS_Bcxvf00NvJ.png
    178.1 KB · Views: 12
  • HPLOCONS_9gi7wldoEB.png
    HPLOCONS_9gi7wldoEB.png
    32.4 KB · Views: 13
Yeah... It seems combination of USB Flash Drive, GPT, Legacy BIOS, GRUB and ZFS just cant boot up. I guess there is some simple solution but i can`t figure it out.

But i found a workaround! :cool: I will post it below

Sounds like a ZFS feature got enabled (just by using the ZFS and writing to the file system) that GRUB does not understand/support. This works the same in Proxmox Backup Server as in Proxmox VE. Booting from a ZFS rpool/boot with GRUB (instead of systemd-boot) is rather fragile, as can be seen from the requests for help in other parts of this forum.
 
So solution is simple: it is second USB Flash Drive :) Which will be good ol` MBR-type, ext4-filesystem and contain /boot directory. This way it will work. It is applies to USB HDDs well.

And for PVE it is all the same.

===

So basically i follow this awesome guide: https://qlr.ro/fix-proxmox-zfs-boot-issues-grub-device-not-found/
I will past it here (in case if link will be down)

Things you’ll need:​

  • proxmox server that refuses to boot
  • temporary USB stick (to boot sysresccd from)
  • permanent USB stick (or other block device – I was using an SD card) where the new boot partition will live

sysresccd​

It is a pretty nifty tool, but what makes it even more nifty is that zfsonlinux.org provides one that has ZFS support built in. Download it from here and “burn” it to the temporary USB stick (I was using rufus). Plug it in your server and boot from it.

zfs mount​

Proxmox always names it’s (first) zfs pool rpool so let us import that:

1zpool import rpool

go to /mnt:

1cd /mnt

make a new directory to mount your old system to, in this case proxmox:

1mkdir proxmox

set the mount point to the path we just created above:

1zfs set mountpoint=/mnt/proxmox rpool/ROOT/pve-1

mount it:

1zfs mount rpool/ROOT/pve-1

we also need to mount couple of other things:

1
2
3
mount -t proc /proc /mnt/proxmox/proc
mount --rbind /dev /mnt/proxmox/dev
mount --rbind /sys /mnt/proxmox/sys

chroot into proxmox​


1
2
chroot /mnt/proxmox /bin/bash
source /etc/profile

make new partition​

find out what block device you wanna sacrifice:

1fdisk -l

double check if its the right one (in my case it was sdh):

1fdisk -l /dev/sdh

Create a partition on it:

1fdisk /dev/sdh

while in fdisk use these commands to create a new primary partition:

1
2
3
4
5
6
7
o (MBR partition table)
n (new partition)
p (primary partition)
1 (partition number: 1)
just press enter (leave default for first cylinder)
just press enter (leave default for last cylinder)
w (write changes to disk)

Notes:​

  • GPT would also work, but im using a 8GB sd card here… mbr is old, but not dead
  • by default fdisk will always make a partition of type “Linux”, no need to play around with that
Format the newly created partition to ext4:

1mkfs.ext4 /dev/sdh1

we need to modify our /etc/fstab and add our not-yet-created /boot partition, to do that we gonna add it by it’s UUID run the following:

1blkid

and find your partitions (in my case sdh1) UUID. Once thats written down on paper open fstab for editing:

1nano /etc/fstab

Add a new TEMPORARY entry according to the UUID you got earlier, something similar to:

1UUID=afdc2cf9-c06e-452a-8e42-2b25ad9dac55 /media ext4 defaults 0 0

Test it out my trying to mount it:

mount /media

move /boot​

Copy your old boot to the newly mounted media and unmount it:

1
2
3
cp -Rpvf /boot/* /media/
sync
umount /media

edit your previously made temporary fstab entry so that it will be mount as /boot:

1UUID=afdc2cf9-c06e-452a-8e42-2b25ad9dac55 /boot ext4 defaults 0 0

mount it for real now:

1mount /boot

run the following (note it is sdh not shd1):

1
2
3
4
update-grub
grub-install --recheck /dev/sdh
sync
umount /boot

Now you can remove the old /boot:

1rm -rf /boot/*

and finally exit the chroot enviroment:

1exit

zfs umount​

umount proc:

1umount /mnt/proxmox/proc

umount sys:

1umount /mnt/proxmox/sys

If it gives you lip, you probably need to unmount something else first, find out what by running:

1mount | grep /mnt/proxmox/sys

umount dev (same procedure as with sys):

1umount /mnt/proxmox/dev

umount zfs:

1umount /mnt/proxmox

set the mount-point back to where it should be:

1zfs set mountpoint=/ rpool/ROOT/pve-1

Reboot, change the boot device in the bios, and if all goes well it should work!
 
  • Like
Reactions: boopzz

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!