Proxmox grub zfs 啟動失敗救援

開機進入救援模式:

zfs set mountpoint=/mnt rpool/ROOT/pve-1
rm -rf /mnt/*
zfs mount rpool/ROOT/pve-1
mount -t proc /proc /mnt/proc
mount --rbind /dev /mnt/dev
mount --rbind /sys /mnt/sys
 
#Enter the chroot
chroot /mnt /bin/bash
source /etc/profile

進入chroot後

dpkg --configure -a
apt-get update && apt-get dist-upgrade -y
apt-get install --reinstall grub-pc
apt-get install --reinstall zfs-initramfs 
apt-get install --reinstall pve-kernel-4.13 linux-image-amd64
 
#install and configure
grub-install /dev/disk/by-id/<YOUR_DISK_1_ID_HERE>
update-grub2
for x in $(cat /proc/cmdline); do case $x in root=ZFS=*)  BOOT=zfs;esac; done
grub-probe / 
update-initramfs -u -k all
 
zfs set mountpoint=/ rpool/ROOT/pve-1
 
#exit the chroot
exit

退出之後重設mountpoint

umount /mnt
umount rpool/ROOT/pve-1
zfs set mountpoint=/ rpool/ROOT/pve-1
阅读剩余
THE END