home: hub: mkinitfs

Download patch

ref: 4fd412c9e89d7347f907713b32813099f98ca551
parent: 59204d36985de5ba2444d5f3e0d50a119287ec51
author: Rasmus Thomsen <oss@cogitri.dev>
date: Sun Feb 23 05:39:16 CST 2020

initramfs-init: fix importing the root pool

We accidentally used $_root_vol instead of $_root_pol for force importing.
Also import (but without -f) if we don't force import as this is required
on some setups. Add -d /dev as this is required for zpool to find the
pool if you have defined some subvolume as partition (e.g. for VMs)

--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -284,10 +284,14 @@
 	local _root_vol=${KOPT_root#ZFS=}
 	local _root_pool=${_rool_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