aboutsummaryrefslogtreecommitdiffstats
path: root/main/alpine-conf/0001-setup-disk-fix-btrfs-root.patch
blob: 7e54e7e820594de1a10c0a932390f2166f9d120a (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
From dffde463b05beb124816357fd6ff24423b0e79f0 Mon Sep 17 00:00:00 2001
From: Natanael Copa <ncopa@alpinelinux.org>
Date: Tue, 14 Jul 2015 07:21:07 +0000
Subject: [PATCH] setup-disk: fix btrfs root

fix typo in btrfs-progs. add kernel module eary so /dev/btrfs-control is
created.

ref #4445
---
 setup-disk.in | 4 +++-
 1 file changed, 3 insertions(+), 1 deletion(-)

diff --git a/setup-disk.in b/setup-disk.in
index e2798f9..55b6dcb 100644
--- a/setup-disk.in
+++ b/setup-disk.in
@@ -441,7 +441,9 @@ init_progs() {
 	case $ROOTFS in
 	ext*) fstools=e2fsprogs; mkfs_args="-q";;
 	xfs) fstools=xfsprogs; mkfs_args="-q";;
-	btrfs) fstools=btrs-progs; mkfs_args="";;
+	# we need load btrfs module early to avoid the error message:
+	# 'failed to open /dev/btrfs-control'
+	btrfs) fstools=btrfs-progs; mkfs_args=""; modprobe btrfs;;
 	esac
 	apk add --quiet sfdisk e2fsprogs lvm2 $raidpkg syslinux $fstools $@
 }
-- 
2.4.5