Closed dvzrv closed 2 years ago
An indicator that somehow the hook drags in all sorts of modules are the following warnings triggered by it during mkinitcpio
:
==> WARNING: Possibly missing firmware for module: mt7603e
==> WARNING: Possibly missing firmware for module: wcn36xx
==> WARNING: Possibly missing firmware for module: orinoco_usb
==> WARNING: Possibly missing firmware for module: p54usb
==> WARNING: Possibly missing firmware for module: p54spi
==> WARNING: Possibly missing firmware for module: p54pci
==> WARNING: Possibly missing firmware for module: prism54
==> WARNING: Possibly missing firmware for module: b43legacy
==> WARNING: Possibly missing firmware for module: b43
==> WARNING: Possibly missing firmware for module: atmel
==> WARNING: Possibly missing firmware for module: at76c50x_usb
==> WARNING: Possibly missing firmware for module: rtl8723ae
==> WARNING: Possibly missing firmware for module: ipw2200
==> WARNING: Possibly missing firmware for module: ipw2100
==> WARNING: Possibly missing firmware for module: rsi_sdio
==> WARNING: Possibly missing firmware for module: rsi_usb
==> WARNING: Possibly missing firmware for module: zd1201
==> WARNING: Possibly missing firmware for module: zd1211rw
==> WARNING: Possibly missing firmware for module: lantiq_gswip
==> WARNING: Possibly missing firmware for module: softing_cs
you mean, you compare non-systemd
vs systemd
-based initramfs
image sizes?
well, systemd
+ dependencies itself is about 50MB
on the other hand, my local initramfs
are "moderately" small: 20 MB / 50 MB
19540 -rwxr-xr-x 1 root root 20005797 Jun 9 17:57 initramfs-linux.img
53320 -rwxr-xr-x 1 root root 54598199 Jun 9 17:57 initramfs-linux-fallback.img
the warnings triggered are due to adding "checked network modules" https://github.com/random-archer/mkinitcpio-systemd-tool/blob/master/src/initrd-network.service
# provision discovered network kernel modules
InitrdCall=add_checked_modules /drivers/net/
please look inside your initramfs
images to confirm if any extraneous items are present
lsinitcpio -x /boot/initramfs-linux.img
assume resolved
This is not really solved. I just don't have much time to work on this right now.
xz-compressed I'm still at 48-50Mb. Maybe something similar to the autodetect hook can help here somehow?
Here is the output of lsinitcpio -av
on the hardened kernel initramfs:
initramfs-linux-hardened.txt
And here the output of lsinitcpio -v
for the same image:
initramfs-linux-hardened-files.txt
@dvzrv make sure to put autodetect
before systemd systemd-tool
in the HOOKS
array in mkinitcpio.conf
. At least in my case this reduced the size of initrd from 97825323 to 32932110.
@makuhama :man_facepalming:
Thanks! That was it! :)
When using mkinitcpio-systemd-tool the initrd images are extremely large (~ 3x the size!) in comparison to when using mkinitcpio-netconf + mkinitcpio-dropbear.
When gzip compressing the images I still end up with 86Mb large initrds:
In comparison, the initrds created with mkinitcpio-netconf + mkinitcpio-dropbear are around 26Mb.
Are the mkinitcpio scripts somehow triggering a fallback style image being built?
This is way too big and really not ideal for systems where space matters and/or where the /boot partition size is constrained.