The officially official Devuan Forum!

You are not logged in.

#1 2022-10-08 04:28:56

amc252
Member
From: Italy/México
Registered: 2021-01-16
Posts: 51  

[SOLVED] optimized initramfs howto

Today I installed Debian Bookworm on a spare partition using the expert mode.
At some point, the installer offered the option to create an optimized initramfs containing only the needed module for the system. I accepted and the resulting initrd.img is 7.8 M as opposite of 27.5 M on Chimaera.
I googled around but couldn't find instructions as to how do that on my installed Chiamera.
Could anyone point me to an howto?

Offline

#2 2022-10-08 06:59:14

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] optimized initramfs howto

Read the MODULES section in

man initramfs.conf

Once the changes have been made regenerate the initramfs:

# update-initramfs -u -k all

EDIT: or try

dpkg-reconfigure initramfs-tools

But that's just a guess. I've never tried it and I'm not in De{vu,bi}an atm.

Last edited by Head_on_a_Stick (2022-10-08 07:01:09)


Brianna Ghey — Rest In Power

Offline

#3 2022-10-08 08:03:06

amc252
Member
From: Italy/México
Registered: 2021-01-16
Posts: 51  

Re: [SOLVED] optimized initramfs howto

It seems to have worked.
I changed the value in /etc/initramfs-tools/conf.d/driver-policy to MODULES=dep and ran update-initramfs -u -k all.
The resulting initrd.img is 6.6 M instead of 27.5 M.
I rebooted and everything seems fine so far.
Thanks for the suggestion.

Offline

#4 2022-10-08 11:17:14

Altoid
Member
Registered: 2017-05-07
Posts: 1,581  

Re: [SOLVED] optimized initramfs howto

Hello:

amc252 wrote:

... anyone point me to an howto?

Besides following HoaS' instructions, to may find this link (or parts of it) useful.

If you need udev, your minimization efforts will most likely be in vain.

Best,

A.

Last edited by Altoid (2022-10-08 11:19:36)

Offline

#5 2022-10-08 15:49:08

amc252
Member
From: Italy/México
Registered: 2021-01-16
Posts: 51  

Re: [SOLVED] optimized initramfs howto

Thanks.
Well, as far as I can tell, my system uses eudev and I can't see no problem so far. Everything works normally and the boot time was shorter.

Last edited by amc252 (2022-10-08 16:09:27)

Offline

#6 2022-10-09 13:04:25

Head_on_a_Stick
Member
From: London
Registered: 2019-03-24
Posts: 3,125  
Website

Re: [SOLVED] optimized initramfs howto

Altoid wrote:

If you need udev, your minimization efforts will most likely be in vain.

That statement refers to Arch's udev hook. Debian does not use the same methods as Arch so the statement is irrelevant.

For the record I'm using a "minified" initramfs in my Arch box and even with zstd compression[0] it's still double the size of the OP's in this thread — klibc ftw!

[0] I prefer no compression with my images 'cos I have a hellafast hard drive.


Brianna Ghey — Rest In Power

Offline

#7 2022-10-09 13:39:24

Altoid
Member
Registered: 2017-05-07
Posts: 1,581  

Re: [SOLVED] optimized initramfs howto

Hello:

Head_on_a_Stick wrote:

... refers to Arch's udev hook.
Debian does not use the same methods as Arch ...

Indeed ...
I noted that after posting but forgot all about it.
Sorry about that.

Head_on_a_Stick wrote:

... so the statement is irrelevant.

Quite so.

But I'm sure it had not escaped you that the OP had already answered my post.
And in doing so, gracefully pointed out the difference between Debian and Arch to me.

Nevertheless, thanks for your input.   8^D

Best,

A.

Offline

Board footer