diff options
author | terminaldweller <thabogre@gmail.com> | 2022-03-20 07:29:18 +0000 |
---|---|---|
committer | terminaldweller <thabogre@gmail.com> | 2022-03-20 07:29:18 +0000 |
commit | f98346db8ddcc329301fd77dec1e392a9c2f2851 (patch) | |
tree | c0772f0b36a5c8a047eeb164251946b968cdeb91 /zfs | |
parent | mostly pretty git logs (diff) | |
download | scripts-f98346db8ddcc329301fd77dec1e392a9c2f2851.tar.gz scripts-f98346db8ddcc329301fd77dec1e392a9c2f2851.zip |
using autossh
Diffstat (limited to '')
-rwxr-xr-x | zfs/export.sh | 3 | ||||
-rwxr-xr-x | zfs/import.sh | 12 |
2 files changed, 15 insertions, 0 deletions
diff --git a/zfs/export.sh b/zfs/export.sh new file mode 100755 index 0000000..7110d69 --- /dev/null +++ b/zfs/export.sh @@ -0,0 +1,3 @@ +#/bin/sh +sudo umount -n /mnt/{dev/pts,dev,sys,proc} +sudo zpool export zroot diff --git a/zfs/import.sh b/zfs/import.sh new file mode 100755 index 0000000..4181aa9 --- /dev/null +++ b/zfs/import.sh @@ -0,0 +1,12 @@ +#/bin/sh + +sudo zpool import -N -R /mnt zroot +sudo zfs load-key -L prompt zroot +sudo zfs mount zroot/ROOT/void +sudo zfs mount zroot/home +mount | grep mnt +sudo mount -t proc proc /mnt/proc +sudo mount -t sysfs sys /mnt/sys +sudo mount -B /dev /mnt/dev +sudo mount -t devpts pts /mnt/dev/pts +sudo chroot /mnt /bin/bash |