mint@mint:~$ sudo su -
root@mint:~# zpool export -a
root@mint:~# zpool import -N -R /mnt rpool
root@mint:~# zpool import -N -R /mnt bpool
root@mint:~# cryptsetup open /dev/zvol/rpool/keystore zfskey
Enter passphrase for /dev/zvol/rpool/keystore:
root@mint:~# lsblk -e7 -o name,label,size,fstype
NAME LABEL SIZE FSTYPE
sda 465.8G
├─sda1 512M vfat
├─sda2 2G crypto_LUKS
├─sda3 bpool 2G zfs_member
└─sda4 rpool 461.3G zfs_member
sdb Linux Mint 21.2 Cinnamon 64-bit 28.9G iso9660
├─sdb1 Linux Mint 21.2 Cinnamon 64-bit 2.8G iso9660
├─sdb2 ESP 4.1M vfat
└─sdb3 writable 26.1G ext4
zd0 500M crypto_LUKS
└─zfskey keystore-rpool 484M ext4
root@mint:~# ls /dev/mapper
control zfskey
root@mint:~# mount /dev/mapper/zfskey /media
root@mint:~# ls /media
lost+found system.key
root@mint:~#
cat /media/system.key | zfs load-key -L prompt rpool
root@mint:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
bpool 134M 1.62G 96K /mnt/boot
bpool/BOOT 134M 1.62G 96K none
bpool/BOOT/ubuntu_eeb9r4 134M 1.62G 134M /mnt/boot
rpool 40.3G 405G 192K /mnt
rpool/ROOT 39.8G 405G 192K none
rpool/ROOT/ubuntu_eeb9r4 39.8G 405G 39.4G /mnt
rpool/ROOT/ubuntu_eeb9r4/srv 192K 405G 192K /mnt/srv
rpool/ROOT/ubuntu_eeb9r4/usr 632K 405G 192K /mnt/usr
rpool/ROOT/ubuntu_eeb9r4/usr/local 440K 405G 440K /mnt/usr/local
rpool/ROOT/ubuntu_eeb9r4/var 350M 405G 192K /mnt/var
rpool/ROOT/ubuntu_eeb9r4/var/games 192K 405G 192K /mnt/var/games
rpool/ROOT/ubuntu_eeb9r4/var/lib 347M 405G 99.9M /mnt/var/lib
rpool/ROOT/ubuntu_eeb9r4/var/lib/AccountsService 244K 405G 244K /mnt/var/lib/AccountsService
rpool/ROOT/ubuntu_eeb9r4/var/lib/NetworkManager 288K 405G 288K /mnt/var/lib/NetworkManager
rpool/ROOT/ubuntu_eeb9r4/var/lib/apt 170M 405G 170M /mnt/var/lib/apt
rpool/ROOT/ubuntu_eeb9r4/var/lib/dpkg 76.2M 405G 76.2M /mnt/var/lib/dpkg
rpool/ROOT/ubuntu_eeb9r4/var/log 1.83M 405G 1.83M /mnt/var/log
rpool/ROOT/ubuntu_eeb9r4/var/mail 192K 405G 192K /mnt/var/mail
rpool/ROOT/ubuntu_eeb9r4/var/snap 192K 405G 192K /mnt/var/snap
rpool/ROOT/ubuntu_eeb9r4/var/spool 276K 405G 276K /mnt/var/spool
rpool/ROOT/ubuntu_eeb9r4/var/www 192K 405G 192K /mnt/var/www
rpool/USERDATA 2.96M 405G 192K /mnt
rpool/USERDATA/root_267fvj 1.23M 405G 1.23M /mnt/root
rpool/USERDATA/stump_267fvj 1.54M 405G 1.54M /mnt/home/stump
rpool/keystore 518M 406G 63.4M -
root@mint:~# zfs mount $(zfs list | awk '/rpool\/ROOT\/ubuntu_eeb9r4 / {print $1}' )
root@mint:~# zfs mount $(zfs list | awk '/bpool\/BOOT\/ubuntu_eeb9r4 / {print $1}' )
root@mint:~# zfs mount -a
root@mint:~# zfs list
NAME USED AVAIL REFER MOUNTPOINT
bpool 134M 1.62G 96K /mnt/boot
bpool/BOOT 134M 1.62G 96K none
bpool/BOOT/ubuntu_eeb9r4 134M 1.62G 134M /mnt/boot
rpool 40.3G 405G 192K /mnt
rpool/ROOT 39.8G 405G 192K none
rpool/ROOT/ubuntu_eeb9r4 39.8G 405G 39.4G /mnt
rpool/ROOT/ubuntu_eeb9r4/srv 192K 405G 192K /mnt/srv
rpool/ROOT/ubuntu_eeb9r4/usr 632K 405G 192K /mnt/usr
rpool/ROOT/ubuntu_eeb9r4/usr/local 440K 405G 440K /mnt/usr/local
rpool/ROOT/ubuntu_eeb9r4/var 350M 405G 192K /mnt/var
rpool/ROOT/ubuntu_eeb9r4/var/games 192K 405G 192K /mnt/var/games
rpool/ROOT/ubuntu_eeb9r4/var/lib 347M 405G 99.9M /mnt/var/lib
rpool/ROOT/ubuntu_eeb9r4/var/lib/AccountsService 244K 405G 244K /mnt/var/lib/AccountsService
rpool/ROOT/ubuntu_eeb9r4/var/lib/NetworkManager 288K 405G 288K /mnt/var/lib/NetworkManager
rpool/ROOT/ubuntu_eeb9r4/var/lib/apt 170M 405G 170M /mnt/var/lib/apt
rpool/ROOT/ubuntu_eeb9r4/var/lib/dpkg 76.2M 405G 76.2M /mnt/var/lib/dpkg
rpool/ROOT/ubuntu_eeb9r4/var/log 1.83M 405G 1.83M /mnt/var/log
rpool/ROOT/ubuntu_eeb9r4/var/mail 192K 405G 192K /mnt/var/mail
rpool/ROOT/ubuntu_eeb9r4/var/snap 192K 405G 192K /mnt/var/snap
rpool/ROOT/ubuntu_eeb9r4/var/spool 276K 405G 276K /mnt/var/spool
rpool/ROOT/ubuntu_eeb9r4/var/www 192K 405G 192K /mnt/var/www
rpool/USERDATA 2.96M 405G 192K /mnt
rpool/USERDATA/root_267fvj 1.23M 405G 1.23M /mnt/root
rpool/USERDATA/stump_267fvj 1.54M 405G 1.54M /mnt/home/stump
rpool/keystore 518M 406G 63.4M -
root@mint:~# mount --make-private --rbind /dev /mnt/dev
root@mint:~# mount --make-private --rbind /proc /mnt/proc
root@mint:~# mount --make-private --rbind /sys /mnt/sys
root@mint:~# mount --make-private --rbind /run /mnt/run
root@mint:~# cd /mnt
root@mint:/mnt# chroot /mnt /bin/bash --login
root@mint:/# mount -a
Bookmarks