[SOLVED] Can't boot after debian 12.5 update

biotim

Active Member
Aug 13, 2018
22
0
41
Hi all, I am looking for some help restoring grub in legacy BIOS after upgrading my system from 6 to 7 and now to 8. System uses root on ZFS

Code:
$ lsblk -o +FSTYPE
NAME   MAJ:MIN RM   SIZE RO TYPE MOUNTPOINTS
                                        FSTYPE
sda      8:16   0 931,5G  0 disk     
├─sda1   8:17   0  1007K  0 part     
├─sda2   8:18   0 931,5G  0 part        zfs_member
└─sda9   8:25   0     8M  0 part

The most promising approach in my eyes has been the following:
1. Boot using a Ubuntu live cd
2. Import the zfs pool
3. Mount proc, dev, sys and chroot into the pool
4. Run apt dist-upgrade
5. update-initramfs && update-grub
6. grub-install to all disks
7. exit chroot and export the zfs pool
8. reboot

So something like:

Code:
zpool import -f -R /mnt rpool
mount -o rbind /proc /mnt/proc
mount -o rbind /sys /mnt/sys
mount -o rbind /dev /mnt/dev
mount -o rbind /run /mnt/run
grub-install /dev/sda
Installing for x86_64-efi platform.
grub-install.real: error: cannot find EFI directory
update-grub2
update-initramfs -u
reboot

After reboot the system will boot into bios. Sorry if this info is all posted elsewhere, any pointers would be greatly appreciated!
 
thx, how can I create an EFi partition 512M?
You have no space available on your drive (and you cannot shrink a ZFS vdev), so I would suggest you do that on an additional drive. If your motherboard BIOS supports it, you could even use an external drive (if you have no other internal drives). You can create partitions with GParted Live or gdisk or anything you prefer. It's not specific to Proxmox so any Linux guide might work.
 
  • Like
Reactions: biotim
formatted to gpt 512M flags boot, esp

Code:
zpool import -f -R /mnt rpool
mount -o rbind /proc /mnt/proc
mount -o rbind /sys /mnt/sys
mount -o rbind /dev /mnt/dev
mount -o rbind /run /mnt/run
chroot /mnt /bin/bash
apt install systemd-boot
proxmox-boot-tool init /dev/sdb1
proxmox-boot-tool refresh
proxmox-boot-tool status

Success! boots into initramfs

The USB stick boots for me. But the boot process gets stuck at initramfs. I can run zpool import -f rpool. But the next time i start the error occurs again.

haven't progressed further yet, any pointers would be greatly appreciated!
 
Last edited:
I'm guessing the boot command line is copied from the proxmox emergency boot when setting up the boot usb drive so I need to change it to match the existing proxmox zfs root and how do I do that?
 
  • Like
Reactions: biotim
Edited the kernel command line for future downloads.
Code:
echo "root=ZFS=rpool/ROOT/pve-1 boot=zfs" > /etc/kernel/cmdline
proxmox-boot-tool refresh

The system now boot normally (yay!)

leesteken
I want to express a BIG THANK YOU for your support.
 

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!