Created
March 8, 2022 11:08
-
-
Save i3abghany/2d9d485bfd07e47fc6edd264b50ee7ed to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
MNT_DIR="/mnt/zfs-$RANDOM" | |
sudo apt install kpartx | |
sudo losetup /dev/loop13 $1 | |
sudo kpartx -av /dev/loop13 | |
sudo mkdir $MNT_DIR | |
sudo zpool import -d /dev/mapper/ -R $MNT_DIR | |
sudo zpool import zroot -R $MNT_DIR -f | |
cd $MNT_DIR |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment