Commit 717b48b5 authored by Natanael Copa's avatar Natanael Copa

Merge branch 'zfs' into 'master'

initramfs-init: fix importing the root pool

See merge request !63
parents 0e07943c 4fd412c9
......@@ -285,11 +285,15 @@ prepare_zfs_root() {
local _root_vol=${KOPT_root#ZFS=}
local _root_pool=${_root_vol%%/*}
# Force import if this has been imported on a different system previously
# Force import if this has been imported on a different system previously.
# Import normally otherwise
if [ "$KOPT_zfs_force" = 1 ]; then
zpool import -N -f $_root_vol
zpool import -N -d /dev -f $_root_pool
else
zpool import -N -d /dev $_root_pool
fi
# Ask for encryption password
if [ $(zpool list -H -o feature@encryption $_root_pool) = "active" ]; then
local _encryption_root=$(zfs get -H -o value encryptionroot $_root_vol)
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment