dracutdevs / dracut

dracut the event driven initramfs infrastructure
https://github.com/dracutdevs/dracut/wiki
GNU General Public License v2.0
598 stars 397 forks source link

Huge initramfs due to installing all nss libraries #1549

Open puleglot opened 3 years ago

puleglot commented 3 years ago

Describe the bug After commit b3bbf5fb6a95cfb69272da0711b5c5e0c6621de9 all nss libraries are included into initramfs. This causes a huge initramfs size increase in some cases. For example, if you have samba installed, then libnss_wins and libnss_winbind will pull in samba libraries, libicu and more. On my system this results in initramfs size increase from ~18Mb to ~30Mb (zstd compressed).

Distribution used Gentoo

Dracut version 055

Init system systemd

To Reproduce Install samba, regenerate initramfs, see the initramfs size change.

puleglot commented 3 years ago

... libnss_wins and libnss_winbind ...

These are provided by samba-winbind-modules package on RHEL/Fedora distros AFAIK

tpgxyz commented 3 years ago

Duplicate of #1422

johannbg commented 3 years ago

And the resolution is the same either write a custom module to include the nss libraries that you yourself want included and or convince the downstream package maintainer to split the libraries you dont use into sub packages then libraries you dont wont get included since they are not installed on your system

tpgxyz commented 3 years ago

I'd say dracut approach is not best one to include libnss_*. Can we just explicitly pull only needed libnss for systemd ?

LaszloGombos commented 1 year ago

This is not specific to the systemd module. nfs, cifs, ssh-client modules have similar logic.