aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
-rw-r--r--README.md12
-rw-r--r--rescue/chroot_zfs.sh27
2 files changed, 39 insertions, 0 deletions
diff --git a/README.md b/README.md
index e3fcb0d..cc68a8f 100644
--- a/README.md
+++ b/README.md
@@ -52,6 +52,18 @@ cd ..
You can find convenient removal and install scripts within `scripts` folder.
+### Manual ZFS Rescue
+
+Documented shell script `rescue/chroot_zfs.sh` shows how-to
+- auto import local zfs pools
+- chroot into the imported root filesystem
+ - bind special devices and pipes to zfs realm
+ - chroot into the zfs system
+- shows three typical recovery tasks
+ - update-initramfs -u -k all
+ - update-grub
+ - grub-install /dev/disk/by-id/your_boot_root_device
+
## ZFS Compatibility Settings
Following compatibility feature sets have been tested
diff --git a/rescue/chroot_zfs.sh b/rescue/chroot_zfs.sh
new file mode 100644
index 0000000..1a3b417
--- /dev/null
+++ b/rescue/chroot_zfs.sh
@@ -0,0 +1,27 @@
+#! /bin/sh
+#
+
+#
+# Perform zfs auto import w/ temp root on /mnt
+#
+# - without force: zfs import -a -R /mnt
+# - with force: zfs import -a -f -R /mnt
+#
+
+# bind the special devices and pipes to zfs realm
+#
+mount --bind /dev/ /mnt/dev/
+mount --bind /sys/ /mnt/sys/
+mount --bind /proc/ /mnt/proc/
+
+# chroot into it
+#
+# chroot /mnt
+#
+
+# Potentially you might need to
+#
+# - update-initramfs -u -k all
+# - update-grub
+# - grub-install /dev/disk/by-id/your_boot_root_device
+#