diff options
author | Jakub Jirutka <jakub@jirutka.cz> | 2017-09-22 11:57:25 +0200 |
---|---|---|
committer | Jakub Jirutka <jakub@jirutka.cz> | 2017-09-22 11:58:23 +0200 |
commit | 91e966971f2f1602d5aca1c96848d5da8945d0ab (patch) | |
tree | 4f193fa4245b65ce4cd5dcae658b99e95e577b15 | |
parent | e409139c5bdbbdc60eaf49c622ce2eb6f60e1975 (diff) | |
download | aports-91e966971f2f1602d5aca1c96848d5da8945d0ab.tar.bz2 aports-91e966971f2f1602d5aca1c96848d5da8945d0ab.tar.xz |
main/mkinitfs: fix booting from Btrfs RAID
See http://bugs.alpinelinux.org/issues/6903
-rw-r--r-- | main/mkinitfs/0002-fix-booting-from-btrfs-raid.patch | 42 | ||||
-rw-r--r-- | main/mkinitfs/APKBUILD | 6 |
2 files changed, 46 insertions, 2 deletions
diff --git a/main/mkinitfs/0002-fix-booting-from-btrfs-raid.patch b/main/mkinitfs/0002-fix-booting-from-btrfs-raid.patch new file mode 100644 index 0000000000..1d8b1401c0 --- /dev/null +++ b/main/mkinitfs/0002-fix-booting-from-btrfs-raid.patch @@ -0,0 +1,42 @@ +From 873bda089bd05adbe74ad17cae063ee4bcbe25de Mon Sep 17 00:00:00 2001 +From: Jakub Jirutka <jakub@jirutka.cz> +Date: Fri, 22 Sep 2017 00:41:47 +0200 +Subject: [PATCH] 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 +--- + features.d/btrfs.files | 1 + + initramfs-init.in | 4 ++++ + 2 files changed, 5 insertions(+) + create mode 100644 features.d/btrfs.files + +diff --git a/features.d/btrfs.files b/features.d/btrfs.files +new file mode 100644 +index 0000000..3729b89 +--- /dev/null ++++ b/features.d/btrfs.files +@@ -0,0 +1 @@ ++/sbin/btrfs +diff --git a/initramfs-init.in b/initramfs-init.in +index be7b1c3..f3a3ee5 100755 +--- a/initramfs-init.in ++++ b/initramfs-init.in +@@ -388,6 +388,10 @@ if [ -n "$KOPT_root" ]; then + 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 +-- +2.10.1 (Apple Git-78) + diff --git a/main/mkinitfs/APKBUILD b/main/mkinitfs/APKBUILD index 96ab3b89d9..f5f7bbaab0 100644 --- a/main/mkinitfs/APKBUILD +++ b/main/mkinitfs/APKBUILD @@ -2,7 +2,7 @@ pkgname=mkinitfs pkgver=3.1.0 _ver=${pkgver%_git*} -pkgrel=1 +pkgrel=2 pkgdesc="Tool to generate initramfs images for Alpine" url="http://git.alpinelinux.org/cgit/mkinitfs" makedepends_build="" @@ -13,6 +13,7 @@ install="$pkgname.pre-upgrade $pkgname.post-install $pkgname.post-upgrade" triggers="$pkgname.trigger=/usr/share/kernel/*" source="http://dev.alpinelinux.org/archive/$pkgname/$pkgname-$_ver.tar.xz 0001-features-ext4-needs-crc32.patch + 0002-fix-booting-from-btrfs-raid.patch " arch="all" license="GPL2" @@ -29,4 +30,5 @@ package() { } sha512sums="ec80702c6b41cb7898679377bef949cc1079b006c2dcc760c801f60a411eb1d3b3fd34ae2088b0bd3779202953466bce6efd62253d93dda32a8bca9bcd8942fc mkinitfs-3.1.0.tar.xz -e66961014d5d68c6e5a529f365f2d8d17fb0c10892b4a61d0c7838ae01ed11f1749912badd902af3a9b5452de72647dd007dda1653c4b0fcd9a6b95e7bf834b9 0001-features-ext4-needs-crc32.patch" +e66961014d5d68c6e5a529f365f2d8d17fb0c10892b4a61d0c7838ae01ed11f1749912badd902af3a9b5452de72647dd007dda1653c4b0fcd9a6b95e7bf834b9 0001-features-ext4-needs-crc32.patch +aeedb5596981226940156d44dd321ec4138bf2b2c60ccffda10d713f83f5e82bb4549830c94c823b159090a6956a4c6eb06a056b1cd12facc32a84629856c3ea 0002-fix-booting-from-btrfs-raid.patch" |