Skip to content

Commit 12d5c4d

Browse files
authored
Merge pull request #239 from nix-community/zfs-fix
umount /mnt prior to exporting zpool
2 parents c1d2893 + 5f9948d commit 12d5c4d

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/nixos-anywhere.sh

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -476,7 +476,9 @@ if [[ ${copy_host_keys-n} == "y" ]]; then
476476
fi
477477
nixos-install --no-root-passwd --no-channel-copy --system "$nixos_system"
478478
if command -v zpool >/dev/null; then
479-
zpool export -a || : # we always want to export the zfs pools so people can boot from it without force import
479+
# we always want to export the zfs pools so people can boot from it without force import
480+
umount -Rv /mnt/
481+
zpool export -a || true
480482
fi
481483
# We will reboot in background so we can cleanly finish the script before the hosts go down.
482484
# This makes integration into scripts easier

0 commit comments

Comments
 (0)