initramfs: fix import of additional zpools on boot
Currently all zpools defined in ZFS_INITRD_ADDITIONAL_DATASETS aren't imported correctly if they are on an other zpool than the root-pool. The mount fails hence the zpool is not known. Initramfs asks know for the second decryption-key on boot for second zpool. Signed-off-by: theQuestionmark <17354322+theQuestionmark@users.noreply.github.com>
This commit is contained in:
parent
f371cc18f8
commit
9c52dadbdd
|
@ -897,6 +897,15 @@ mountroot()
|
|||
ZFS_RPOOL="${pool}"
|
||||
fi
|
||||
|
||||
# We need to import additional zpools which aren't under root zpool, before mount_fs()
|
||||
for add_zpool in $ZFS_INITRD_ADDITIONAL_DATASETS; do
|
||||
add_zpool_base="${add_zpool%%/*}"
|
||||
|
||||
if [ "$add_zpool_base" != "$ZFS_RPOOL" ]
|
||||
then
|
||||
import_pool "${add_zpool_base}"
|
||||
fi
|
||||
done
|
||||
|
||||
# ----------------------------------------------------------------
|
||||
# P R E P A R E R O O T F I L E S Y S T E M
|
||||
|
|
Loading…
Reference in New Issue