Closed Trumeet closed 5 months ago
It seems like mkosi is trying to do another brand-new Debian installation for initrd. Are there any ways to use mkinitcpio or another distribution (like Alpine to say?) that offers a smaller image?
Grep for settings with KernelModules in them in the docs.
I'm trying to build a Debian image for an embedded system, and the generated initrd seems to be about 150MiB. It takes too long for the embedded system to copy the whole initrd (inside UKI) from SD card to memory at boot.
Are there any ways to shrink the initrd, or use mkinitcpio?
The only thing (in my scenario) initrd has to do is to mount root in the same disk, and I am seeking ways to shrink the initrd as much as possible. Thanks.
Configuration file:
With
--debug-workspace
, theimage-initrd.cpio.zst
is 36MiB, which extracts to a 134MiB CPIO. The merged UKI EFI is about 137MiB, andukify inspect
shows that the initrd is 105MiB.