home: hub: mkinitfs

Download patch

ref: 873bda089bd05adbe74ad17cae063ee4bcbe25de
parent: c848871d7432c5ad834f6bb5b60f4e6133ae73fd
author: Jakub Jirutka <jakub@jirutka.cz>
date: Thu Sep 21 19:41:47 CDT 2017

fix booting from btrfs on multiple devices

https://btrfs.wiki.kernel.org/index.php/Using_Btrfs_with_Multiple_Devices:
> btrfs device scan is used to scan all of the block devices under /dev
> and probe for Btrfs volumes. This is required after loading the btrfs
> module if you're running with more than one device in a filesystem.

See http://bugs.alpinelinux.org/issues/6903

--- /dev/null
+++ b/features.d/btrfs.files
@@ -1,0 +1,1 @@
+/sbin/btrfs
--- a/initramfs-init.in
+++ b/initramfs-init.in
@@ -388,6 +388,10 @@
 	nlplug-findfs $cryptopts -p /sbin/mdev ${KOPT_debug_init:+-d} \
 		$KOPT_root
 
+	if echo "$KOPT_modules $KOPT_rootfstype" | grep -qw btrfs; then
+		/sbin/btrfs device scan || echo "Failed to scan devices for btrfs filesystem."
+	fi
+
 	if [ -n "$KOPT_resume" ]; then
 		echo "Resume from disk"
 		if [ -e /sys/power/resume ]; then