Re: Ramdisk images are too large.
Posted: Tue Jul 18, 2023 6:26 am
A follow up post to this. So after some research I found it is plymouth that is bloating it out. Plymouth is used for the startup screen. But if it's inactive it's redundant and wasting space. I don't recall ever seeing a startup screen when a Linux kernel boots.
On my older Ubuntu it attempts to use plymouth when building ramdisk but fails. So the size is cut down. On my Fienix it includes plymouth which causes the bloat. By removing it the size can be brought from 11MB to a more manageable 4MB. Still more than 2MB but bootable.
It's hard to fix as mkinitramfs gives little control over the process. It allows you to change config but it uses hooks to include all the binaries that cannot be disabled or diverted. However it allows custom hooks to be added so a hook can be added to remove what isn't wanted. Not as clean as stopping what isn't wanted. But it can work.
I am also getting constant errors now when booting a systemd system from init ramdisk. One cause is building ramdisk from a 5.x kernel fails to boot a kernel 6.x system. I don't know to build a systemd friendly ramdisk from init system. Suppose installing systemd would help. But matching kernel releases does help.
My manager will include an update so ramdisks can be built again and also updated if desired.
On my older Ubuntu it attempts to use plymouth when building ramdisk but fails. So the size is cut down. On my Fienix it includes plymouth which causes the bloat. By removing it the size can be brought from 11MB to a more manageable 4MB. Still more than 2MB but bootable.
It's hard to fix as mkinitramfs gives little control over the process. It allows you to change config but it uses hooks to include all the binaries that cannot be disabled or diverted. However it allows custom hooks to be added so a hook can be added to remove what isn't wanted. Not as clean as stopping what isn't wanted. But it can work.
I am also getting constant errors now when booting a systemd system from init ramdisk. One cause is building ramdisk from a 5.x kernel fails to boot a kernel 6.x system. I don't know to build a systemd friendly ramdisk from init system. Suppose installing systemd would help. But matching kernel releases does help.
My manager will include an update so ramdisks can be built again and also updated if desired.