This will mount all pools and file systems under /mnt
directory.
-
Boot the Ubuntu Live CD:
- Select option Try Ubuntu.
- Open a terminal within the Live CD environment - press Ctrl Alt-T.
-
Become Root
sudo -i
-
Install packages to support chroot environment
apt-get install mdadm
-
Export all pools (incase anything was automatically imported)
zpool export -a
-
Import ZFS pool(s), load encryption keys and mount to
/mnt
directoryzpool import -f -N -R /mnt {root_pool_name} zfs load-key -a zfs mount {root_pool_name}/ROOT/ubuntu zfs mount {root_pool_name}/ROOT/home/root zfs mount -a
- The
{root_pool_name}
is unique to your system. By default, this Ansible process names the pool after the hostname. This is the equivalent ofrpool
in previous ZFS on Root methods.
- The
-
Create mdadm array of boot partitions and mount to
/mnt/boot/efi
directorymdadm --assemble /dev/md127 /dev/sda1 /dev/nvme0n1p1 mount /dev/md127 /mnt/boot/efi
- Above assumes just 2 devices. Each device uses partition
1
on that device (standard partition for booting). - You need to adjust the number of devices and device names such as
/dev/sda1
(SATA SSD) and/dev/nvme0n1p1
(NVMe SSD) to match the names of whatever your system uses.
- Above assumes just 2 devices. Each device uses partition
-
Mount Live CD paths to Build chroot Environment
mount -t proc /proc /mnt/proc mount -t sysfs sys /mnt/sys mount -B /dev /mnt/dev mount -t devpts pts /mnt/dev/pts
-
Enter the chroot environment
chroot /mnt bash
-
You are now within the chroot environment and can issue commands as if you have booted from it. You can troubleshoot, view, logs, apply patches, work on ZFS items, whatever is needed to get your system bootable again.
-
If you needed to regenerate your boot initramfs:
dracut -v -f --regenerate-all generate-zbm
-
-
Exit chroot when ready (return to Live CD environment)
exit
-
Unmount everything and export all ZFS pools
umount /mnt/boot/efi umount -n /mnt/{dev/pts,dev,sys,proc} zfs unmount -a zpool export -a
It is now safe to exit Ubuntu Live CD and reboot system, hopefully you fixed your issues and can boot. If not repeat the steps above and keep on Googling that problem. :)