I've deleted the grub partition

et1000

New Member
Jan 11, 2024
4
0
1
France
Hello,

My PVE won't boot anymore.
Here's my disk layout:
- 250GB SATA M.2 for OS/rpool,
- 1TB NVMe M.2 RAID1 for VM storage.

Yesterday I was doing some cleanup on old disks I recently plugged in my server. I wanted to format them and use them for backuping.
One of them (/dev/sdb) was not an old disk, it was my rpool disk. I've formatted 2 partitions, the third one is the zfs one, which refused to format because used (hopefully).
So when I tried to reboot my server, it never came back as there is no bootable partition anymore.

I booted on a live GParted: it sees 3 partitions on the SATA M.2:
- /dev/sdb1 = filesystem unknown, 1007KiB, flag "bios_grub"
- /dev/sdb2 = filesystem unknown, 1GiB
- /dev/sdb3 = filesystem zfs, label rpool, 231.88GiB

What is the point of the 1GiB partition?
Another question, I had 2 volumes attached to this disk; local and local-zfs. Are they 2 separate partitions, or are they both in the /dev/sdb3 partition?

Here's what I'm planning to do:
- backup /dev/sdb3 to another disk: I tried with testdisk on a live GParted but I'm not sure I can read zfs.
- reinstall GRUB: how can I do that without breaking /dev/sdb3? If that's not possible, I'll install a fresh PVE and copy some configuration files from the backup I plan to do, but I'd prefer boot on the original.


Thanks for your help
Emile
 
Last edited:
What is the point of the 1GiB partition?
It is an ESP. Search for "Changing a failed bootable device" in the manual: https://pve.proxmox.com/pve-docs/pve-admin-guide.html#chapter_zfs
That section in the manual might also help you setup the ESP and GRUB again using proxmox-boot-tool. Assuming that you use a recent Proxmox version.
Another question, I had 2 volumes attached to this disk; local and local-zfs. Are they 2 separate partitions, or are they both in the /dev/sdb3 partition?
The 'local' storage is a directory on root filesystem, which is on the rpool (/dev/sdb3). The 'local-zfs' storage is rpool/data, which is also on the rpool (/dev/sdb3).
 
Hello,
Thanks, that helps. I finally managed to get my pve back!
I had to run the installer (debug mode), format the ESP partition, import the ZFS partition, chroot in the filesystem, and run proxmox-boot-tool (grub, otherwise I get a error message because of secure boot keys).

Here are the commands if someone's interested:
Bash:
zpool import -f rpool -R /mnt

mount --bind /dev /mnt/dev
mount -t proc /proc /mnt/proc
mount --bind /run /mnt/run
mount -t sysfs /sys /mnt/sys

chroot /mnt bash

proxmox-boot-tool format /dev/sda2
proxmox-boot-tool init /dev/sda2 grub

Then reboot and zpool import -f rpool again when Busybox asks.

I also backed up some important files on an other disk before the boot reinstall:
Bash:
mount /dev/sda /media/
cp -R /etc /media
cp -R /var /media

Emile
 
Last edited:

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!