Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Reduce size of initramfs #12

Open
osresearch opened this issue May 13, 2020 · 5 comments
Open

Reduce size of initramfs #12

osresearch opened this issue May 13, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@osresearch
Copy link
Owner

update-initramfs -u -v shows that literally the kitchen sink is included, with megabytes of firmware for obscure devices and drivers that are unneeded to boot the machine. Surely there is a way to reduce the amount that it includes.

@osresearch osresearch added the enhancement New feature or request label May 13, 2020
@osresearch
Copy link
Owner Author

Yow - I just built 5.6.13 with the config from Ubuntu and the initrd is 500 megs due to a bazllion modules.

@vamposdecampos
Copy link

The MODULES setting in initramfs.conf might help; the default of most adds... most modules.

@osresearch
Copy link
Owner Author

Setting MODULES=dep in /etc/initramfs/initramfs.conf and moving the unused firmware (amd, amdgpu, amd-ucode, nvidia, and radeon) out of /lib/firmware reduced the default ubuntu initrd from 84 MB to 28 MB. My X1 still boots fine.

This would be helpful to automate in the setup script, although it might be a "nice to have" rather than a "must have" since it doesn't change the security posture that much.

@osresearch
Copy link
Owner Author

osresearch commented Aug 21, 2020

Downside to MODULES=dep is that nls_iso8859-1.ko is not included, so the initramfs recovery shell is unable to mount /boot/efi. That is problematic for #56 since it needs access to the ESP for measurements and signing.

@osresearch
Copy link
Owner Author

nls kernel module is included in initrd build now: c08a4cb

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants