FS#55926 - [systemd] only first element of the array MODULES is used
Attached to Project:
Arch Linux
Opened by Vladimir (_v_l) - Monday, 09 October 2017, 05:16 GMT
Last edited by Eli Schwartz (eschwartz) - Tuesday, 17 October 2017, 17:27 GMT
Opened by Vladimir (_v_l) - Monday, 09 October 2017, 05:16 GMT
Last edited by Eli Schwartz (eschwartz) - Tuesday, 17 October 2017, 17:27 GMT
|
Details
Description: mkinitcpio 24 uses only the first element of
MODULES from /etc/mkinitcpio.conf if it is the array.
Additional info: * testing repo; mkinitcpio 24-2 Steps to reproduce: 1. change MODULES in /etc/mkinitcpio.conf like that: MODULES=(i915 r8169 netconsole) 2. run # mkinitcpio -p linux 3. take a look on /boot/initramfs-linux.img:/etc/modules-load.d/MODULES.conf, only first element (i915) is in. 4. change MODULES in /etc/mkinitcpio.conf to that: MODULES="i915 r8169 netconsole" 5. repeat steps 2-3 and find that now MODULES.conf contains all three modules. |
This task depends upon
Closed by Eli Schwartz (eschwartz)
Tuesday, 17 October 2017, 17:27 GMT
Reason for closing: Fixed
Additional comments about closing: systemd 235.8-1
Tuesday, 17 October 2017, 17:27 GMT
Reason for closing: Fixed
Additional comments about closing: systemd 235.8-1
The first way worked well before 24 (before mkinitcpio switched to use arrays in /etc/mkinitcpio.conf), but now, according to mkinitcpio.conf comments the proper way is to set MODULES as an array. This is excerpt from /etc/mkinitcpio.conf:
# MODULES
# The following modules are loaded before any boot hooks are
# run. Advanced users may wish to specify all system modules
# in this array. For instance:
# MODULES=(piix ide_disk reiserfs)
Or you mean "don't use this feature"? I thought this is the only way to put some modules in initramfs and make them available at earlier stage of kernel booting.
if use systemd as hook instead udev, the vfio modules in modules array (MODULES=(vfio vfio_iommu_type1 vfio_pci vfio_virqfd)) not load at boot, lead vfio_pci can't passtrought selected devices, or vfio_foo options defined into /etc/modprobe.d/vfio.config
└───╼ cat /etc/modprobe.d/vfio.conf
options vfio_pci ids=10de:17c2,10de:0fb0
options vfio_iommu_type1 allow_unsafe_interrupts=1
greetings
You misunderstand the scope of this bug. Inclusion of modules still works through the MODULES array in /etc/mkinitcpio.conf. What currently doesn't work is forcible loading of those modules in early userspace (something which isn't often needed).
When systemd hook is used in mkinitcpio.conf and modules section uses old syntax: MODULES="module1 module2", We have:
lsinitcpio -x initramfs-linux.img
cat etc/modules-load.d/MODULES.conf
module1
module2
When news syntax is used: MODULES=(module1 module2), we have:
lsinitcpio -x initramfs-linux.img
cat etc/modules-load.d/MODULES.conf
module1
Sure it does. I contend that many uses of MODULES in order to *forcibly* load modules in early userspace are misplaced (potentially based on cargo-cult/bad guidance from the wiki). You could just as effectively load them later. Hence my mention of /etc/modules-load.d.