Arch Linux

Please read this before reporting a bug:
https://wiki.archlinux.org/title/Bug_reporting_guidelines

Do NOT report bugs when a package is just outdated, or it is in the AUR. Use the 'flag out of date' link on the package page, or the Mailing List.

REPEAT: Do NOT report bugs for outdated packages!
Tasklist

FS#53316 - [mkinitcpio] Exclude modprobe blacklisted modules to even further decrease init file size

Attached to Project: Arch Linux
Opened by Ceriel Jacobs (cj1) - Tuesday, 14 March 2017, 23:54 GMT
Last edited by Dave Reisner (falconindy) - Sunday, 01 October 2017, 18:07 GMT
Task Type Feature Request
Category Arch Projects
Status Closed
Assigned To Dave Reisner (falconindy)
Architecture x86_64
Severity Low
Priority Normal
Reported Version
Due in Version Undecided
Due Date Undecided
Percent Complete 100%
Votes 0
Private No

Details

Description: when having modules configured to be blacklisted in /etc/modprobe.d/modprobe.conf, that modprobe.conf is nicely copied in build hook: [/usr/lib/initcpio/install/modconf].

And in the next build hook the blacklisted (modules not wished to be loaded) are copied without any purpose:
...
adding module: sdhci-acpi
adding module: sdhci
adding module: mmc_core
adding module: sdhci-pci
adding module: mmc_block
...
and finally:
overwriting file: /etc/modprobe.d/modprobe.conf

Additional info:
* mkinitcpio 22
* /etc/modprobe.d/modprobe.conf:
---
blacklist tpm_tis
blacklist joydev
blacklist sdhci_pci
blacklist sdhci_acpi
blacklist sdhci
blacklist mmc_core
blacklist mmc_block
blacklist snd_hda_intel
blacklist snd_intel_sst_acpi
blacklist snd_soc_rt5640
blacklist snd_soc_rt5645
---

It would be nice when modprobe blacklist modules are not added to the initramfs file using mkinitcpio.
This task depends upon

Closed by  Dave Reisner (falconindy)
Sunday, 01 October 2017, 18:07 GMT
Reason for closing:  Won't fix
Additional comments about closing:  Blacklisting is an odd use case to begin with. If you want to slim down your initramfs, whitelist instead.
Comment by Dave Reisner (falconindy) - Wednesday, 15 March 2017, 12:11 GMT
I mean, sure, but then adding the blacklist file itself doesn't have much point as the modules won't be there to be blacklisted. I realize that's kind of your point, but it seems weird.

Also, if you know exactly what you need, then add exactly what you need? Is there really a need to complicate the code further just to save a few KiB of a cheap resource? Do you have measurable gains in boot time by excluding these modules? Is there opportunity cost from freeing up this disk space?
Comment by Ceriel Jacobs (cj1) - Thursday, 16 March 2017, 18:08 GMT
Sometimes you want certain hardware disabled, like when hardware is generating error messages (when running other commands). It is actually quite annoying when running a "parted ... print" command that all kind of error message are showing up because of an internal eMMC drive that is not even in use.

Disabling hardware in firmware doesn't help.

Excluding the blacklisted modules doesn't need to be automated, though preferred. Currently there is only a mechanism (that I am aware of) to **include** modules (MODULES=... in mkinitcpio.conf). I would love a configuration possibility to **exclude** modules.
Comment by Ceriel Jacobs (cj1) - Sunday, 19 March 2017, 00:23 GMT
re: Also, if you know exactly what you need, then add exactly what you need?

I didn't know how to add exactly what I need. Until I spotted https://wiki.archlinux.org/index.php/Minimal_initramfs, which is now also linked from https://wiki.archlinux.org/index.php/Mkinitcpio

Loading...