Skip to content

Commit

Permalink
Speedup/safety mods
Browse files Browse the repository at this point in the history
Import any pools readonly, to help protect against data loss.

No longer export the pool on reboot - since we're mounted readonly we
can get away with skipping this step.

Set the fast reboot flag for kexec, so we don't do any memory integrity
checks.
  • Loading branch information
zdykstra committed Dec 9, 2019
1 parent b7b9119 commit af408a9
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 4 deletions.
3 changes: 1 addition & 2 deletions 90zfsbootmenu/zfsbootmenu-lib.sh
Original file line number Diff line number Diff line change
Expand Up @@ -150,12 +150,11 @@ kexec_kernel() {

umount_zfs ${fs}

zpool export -a
if ! [ $? -eq 0 ]; then
emergency_shell "unable to export pools"
fi

kexec -e
kexec -e -i
}

# arg1: snapshot name
Expand Down
4 changes: 2 additions & 2 deletions 90zfsbootmenu/zfsbootmenu-parse-commandline.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,9 +21,9 @@ fi
# Force import pools only when explicitly told to do so
if getargbool 0 force_import ; then
info "ZFSBootMenu: Enabling force import of ZFS pools"
import_args="-f -N"
import_args="-o readonly=on -f -N"
else
import_args="-N"
import_args="-o readonly=on -N"
fi

wait_for_zfs=0
Expand Down

0 comments on commit af408a9

Please sign in to comment.