Package: dracut-core
Version: 106-6
Severity: normal

Hi,
I have modprobe configuration files installed in /usr/local/lib/modprobe.d/ and 
this is a standard search location per 
https://manpages.debian.org/stable/modprobe.d.5
In particular I have a snippet, named ata.conf, installed there intended to 
enable the ATA Forced Unit Access feature, which is disabled by default for 
historical reasons for some buggy drives but which I really want for my use 
case:
options libata fua=1

While being nosy and checking on other things I noticed that 
/sys/module/libata/parameters/fua has this parameter as '0'. It seems the 
option is never being applied and I've not noticed until now. It is imperative 
that libata be in the initrd, and likewise its configuration parameters need to 
live there too. As detective work I did

# lsinitrd /boot/initrd.img-6.12.74+deb13+1-amd64 | grep -iF modprobe.d
drwxr-xr-x   2 root     root            0 Mar 13 22:46 usr/lib/modprobe.d
-rw-r--r--   1 root     root          326 Apr 25  2025 
usr/lib/modprobe.d/aliases.conf
-rw-r--r--   1 root     root          390 Jul 16  2025 
usr/lib/modprobe.d/fbdev-blacklist.conf
-rw-r--r--   1 root     root          821 Sep  3  2025 
usr/lib/modprobe.d/systemd.conf

From skimming the parts of the dracut source I could comprehend quickly, it 
seems like it doesn't check the assortment of allowed paths. Those three files 
are indeed installed in /usr/lib/modprobe.d/ on my system, but dracut isn't 
using the /usr/local/ equivalents, or even (apparently) the /etc/modprobe.d/ 
versions. Presumably dracut trying to duplicate the logic that kmod would use 
to find modprobe.d files, but falling short. This seems like a mistake and 
there's not really any justification for treating /usr/lib/modprobe.d/ 
different from the /usr/local/lib/modprobe.d/ directory.

I am using Debian Trixie with dracut and systemd-boot together. The suggested 
workaround at https://bugs.debian.org/1095646#28 has been applied to prevent 
the initrd getting generated twice with different parameters, but the setup is 
otherwise plain. I've looked for upstream issues on GitHub and couldn't find 
conversations about discrepancies in /usr/local/ handling or modprobe.d file 
handling. I acknowledge any fix will not be appropriate for Trixie's life 
cycle, and I haven't tested testing or unstable package versions yet, but I 
probably could make a virtual machine to test or try out prospective patches.
As a workaround, I'm probably going to configure dracut to explicitly copy the 
/usr/local/lib/modprobe.d/ directory always. If I do that tomorrow or so, I'll 
try to report back if that solved the problem.

-- System Information:
Debian Release: 13.4
  APT prefers stable-updates
  APT policy: (500, 'stable-updates'), (500, 'stable-security'), (500, 
'proposed-updates'), (500, 'stable')
Architecture: amd64 (x86_64)

Kernel: Linux 6.12.74+deb13+1-amd64 (SMP w/2 CPU threads; PREEMPT)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8), LANGUAGE not set
Shell: /bin/sh linked to /usr/bin/dash
Init: systemd (via /run/systemd/system)
LSM: AppArmor: enabled

Attachment: signature.asc
Description: This is a digitally signed message part

Reply via email to