home: hub: mkinitfs

Download patch

ref: 717b48b583a0af8cabd84dbece856be21bbe5f90
parent: 0e07943c9e6724528959e353a16e23f96f03f484
parent: 4fd412c9e89d7347f907713b32813099f98ca551
author: Natanael Copa <ncopa@alpinelinux.org>
date: Tue Dec 22 05:36:36 CST 2020

Merge branch 'zfs' into 'master'

initramfs-init: fix importing the root pool

See merge request alpine/mkinitfs!63

--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -285,10 +285,14 @@
 	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