Closed stapelberg closed 4 years ago
This is obsolete with minitrd: https://michael.stapelberg.ch/posts/2020-01-21-initramfs-from-scratch-golang/
minimalistic initram would be beneficial for the community and people who does not plan to use distri
os. Are there any plans to release minitrd
as a standalone project that can be used with other distros?
With #1 fixed, we have a lot more Linux kernel modules. The images we produce cannot use dracut’s hostonly mode (individual users can, though). It would be nice to exclude e.g. SCSI modules (largest in terms of file size) from the generic dracut initrd, as it is very unlikely that someone needs to boot the distri live image from a SCSI storage system (they can still install onto it).
Here are a couple of avenues to investigate:
--omit-drivers ".*/scsi/.*"
, even though that should work.--no-compress
removes 30s from 90s dracut time, so perhaps there is a more CPU-efficient compression scheme.--nostrip
. In my evaluation, the size of the initrd was unchanged, but not stripping files removes 20s from 60s dracut time.cp(1)
for each file (!) it copies, which can be quite a number when copying kernel modules. Runningcp(1)
is especially expensive on distri thanks to hermetic packages, where the correct binary needs to be located (iterating through$PATH
), and running the binary means resolving the shared libraries, which is also pretty expensive.