Skip to content

Commit

Permalink
fix(btrfs): do not require module via cmdline when --no-kernel
Browse files Browse the repository at this point in the history
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.
  • Loading branch information
Werkov authored and LaszloGombos committed Jun 20, 2023
1 parent 2b47a2e commit 7ed765d
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions modules.d/90btrfs/module-setup.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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"
}

0 comments on commit 7ed765d

Please sign in to comment.