initramfs-tools and dracut install different sets of kernel modules

Bug #2031841 reported by Benjamin Drung
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
initramfs-tools (Ubuntu)
Fix Released
Low
Unassigned

Bug Description

initramfs-tools and dracut install different sets of kernel modules. Either these modules are not needed for booting or are missing in the other project.
dracut-install can filter modules by symbol (--mod-filter-symbol) to select modules more fine-grain. Harmonize the set of modules.

Adopt the install rules from dracut to get rid of modules that are shipped in initramfs-tools, but not in dracut. Following kernel modules will be kept since they are mentioned in the initramfs-tools code:

* via hidden_dep_add_modules: psmouse mlx5_ib mlx4_ib
* via framebuffer hook: =drivers/gpu vga16fb =drivers/char/agp
* explicit in auto_add_modules: extcon-usb-gpio extcon-usbc-cros-ec cros_ec_spi
* via hw_random in auto_add_modules: =drivers/char/hw_random
* via fb in auto_add_modules: pwm-cros-ec pwm_bl
* ignored difference for now: =drivers/mmc
* via virtual in auto_add_modules: hv_utils
* not analyzed yet: mhi_ep mhi mhi_pci_generic i2c-mux i2c-mux-gpio i2c-mux-ltc4306 i2c-mux-mlxcpld i2c-mux-pca9541 i2c-mux-pca954x i2c-mux-reg c67x00

Following modules will be removed from initramfs-tools with this change, but are in dracut (pulled in as dependency): intel_pmc_bxt kempld-core rave-sp retu-mfd nandcore bch

If that change removed too much, we need to add it back and also report that to dracut to add it there as well.

Test setup: mantic schroot with linux 6.3.0-7-generic and following packages: linux-image-generic,zstd,busybox-initramfs,cryptsetup-initramfs,isc-dhcp-client,kbd,lvm2,mdadm,ntfs-3g,plymouth,plymouth-theme-spinner,initramfs-tools,dracut-core,dracut-config-generic,dcracut-network

initramfs generation with dracut: dracut --regenerate-all --force -q --add-drivers "=drivers/char/agp hv_utils =drivers/mmc pwm-cros-ec pwm_bl mlx4_ib extcon-usb-gpio extcon-usbc-cros-ec cros_ec_spi =drivers/gpu vga16fb psmouse mlx5_ib =drivers/char/hw_random"

Benjamin Drung (bdrung)
Changed in initramfs-tools (Ubuntu):
importance: Undecided → Low
Benjamin Drung (bdrung)
Changed in initramfs-tools (Ubuntu):
status: New → Fix Committed
Benjamin Drung (bdrung)
description: updated
description: updated
description: updated
Revision history for this message
Launchpad Janitor (janitor) wrote :

This bug was fixed in the package initramfs-tools - 0.142ubuntu12

---------------
initramfs-tools (0.142ubuntu12) mantic; urgency=medium

  * Change dracut-core dependency to newly created dracut-install package
    (LP: #2031304)
  * autopkgtest:
    - Explicitly specify supported architectures
    - Enable KVM if available (not available on Ubuntu runners)
    - log qemu parameters

initramfs-tools (0.142ubuntu11) mantic; urgency=medium

  * Use dracut-install in manual_add_modules to speed up mkinitramfs
    significantly (LP: #2031185)
  * Install tty/serial kernel modules. Dracut is doing the same. (LP: #2019435)
  * Harmonize kernel module installation with dracut's behavior (LP: #2031841):
    - Use the symbol regex from dracut-install to reduce the unnessary block
      and net kernel modules.
    - Install all usb/typec kernel modules instead of cherry-picking some.
    - Do not install ARM/RISCV specific modules on other architectures.

 -- Benjamin Drung <email address hidden> Wed, 23 Aug 2023 10:58:40 +0200

Changed in initramfs-tools (Ubuntu):
status: Fix Committed → Fix Released
Revision history for this message
Benjamin Drung (bdrung) wrote :

Regression: bug #2042710

Revision history for this message
Benjamin Drung (bdrung) wrote :
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.