From 7ed765dd23e4c5616c82d1cbf8b4dbceaafc7647 Mon Sep 17 00:00:00 2001 From: =?utf8?q?Michal=20Koutn=C3=BD?= Date: Mon, 19 Jun 2023 16:40:49 +0200 Subject: [PATCH] fix(btrfs): do not require module via cmdline when --no-kernel initrd built without modules would fail when it attempts to load a kernel module. (Use case scenario: kernel with built-in module.) synthesize an the cmdline only when modules are truly installed. --- modules.d/90btrfs/module-setup.sh | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/modules.d/90btrfs/module-setup.sh b/modules.d/90btrfs/module-setup.sh index 3a047053e..5d8813320 100755 --- a/modules.d/90btrfs/module-setup.sh +++ b/modules.d/90btrfs/module-setup.sh @@ -32,6 +32,7 @@ cmdline() { # called by dracut installkernel() { instmods btrfs + printf "%s\n" "$(cmdline)" > "${initdir}/etc/cmdline.d/00-btrfs.conf" } # called by dracut @@ -56,6 +57,4 @@ install() { inst_multiple -o btrfsck btrfs-zero-log inst "$(command -v btrfs)" /sbin/btrfs - - printf "%s\n" "$(cmdline)" > "${initdir}/etc/cmdline.d/00-btrfs.conf" } -- 2.47.2