You are not logged in.

#1 2022-09-18 22:49:22

robotoid
Member
Registered: 2019-07-18
Posts: 15

[Solved] Advantage of autodetect hook

Hi

On a simple system, an initramfs fallback is about double the size of a shrunk one, but both are quite small (under 40M). On my slow computer both complete early userspace very swiftly.

So what is the advantage of shrinking the image? Are the some cases where the difference can be significant?

Thanks

Last edited by robotoid (2022-09-26 08:44:24)

Offline

#2 2022-09-19 01:00:16

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 240

Re: [Solved] Advantage of autodetect hook

robotoid wrote:

So what is the advantage of shrinking the image? Are the some cases where the difference can be significant?

I think the main goal of separate normal and fallback initramfs is not a shrinking but possibility to customize normal boot on one hand and possibility to boot safe if something went wrong on other hand. Smaller normal initramfs size is just a side effect.

Offline

#3 2022-09-19 01:47:16

Trilby
Inspector Parrot
Registered: 2011-11-29
Posts: 29,520
Website

Re: [Solved] Advantage of autodetect hook

dimich wrote:

I think the main goal of separate normal and fallback initramfs is not a shrinking but possibility to customize normal boot...

The autodetect hook doesn't "customize" it in any way at all other than leaving out modules that do not appear to be needed resulting in a smaller size.


"UNIX is simple and coherent..." - Dennis Ritchie, "GNU's Not UNIX" -  Richard Stallman

Offline

#4 2022-09-19 11:29:57

dimich
Member
From: Kharkiv, Ukraine
Registered: 2009-11-03
Posts: 240

Re: [Solved] Advantage of autodetect hook

Trilby wrote:

The autodetect hook doesn't "customize" it in any way at all other than leaving out modules that do not appear to be needed resulting in a smaller size.

Indeed, the question is specifically about autodetect hook. But mkinitcpio allows different configs for different images in a single preset, it confused me. Sorry for noise.

Offline

#5 2022-09-19 19:14:52

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [Solved] Advantage of autodetect hook

robotoid wrote:

Hi

On a simple system, an initramfs fallback is about double the size of a shrunk one, but both are quite small (under 40M). On my slow computer both complete early userspace very swiftly.

So what is the advantage of shrinking the image? Are the some cases where the difference can be significant?

Thanks

As said, autodetect removes clutter that your system doesn't need, but if something changes in your system and it suddenly needs some of that removed clutter, BANG.

The fallback has all the bloat, and it will/should work regardless of what nonsense is done with the system, within reason.

If wanted, one could just yeet it all on the same initramfs full of bloat by changing the presets a bit, and done.


My reposSome snippets

Heisenberg might have been here.

Offline

#6 2022-09-19 21:13:03

cloverskull
Member
Registered: 2018-09-30
Posts: 172

Re: [Solved] Advantage of autodetect hook

If wanted, one could just yeet it all on the same initramfs full of bloat by changing the presets a bit, and done.

I've done this and haven't run into any issues, that said it does feel like I've removed a worthwhile safeguard but I like to live dangerously.

Offline

#7 2022-09-19 21:50:29

GaKu999
Member
From: US/Eastern
Registered: 2020-06-21
Posts: 696

Re: [Solved] Advantage of autodetect hook

cloverskull wrote:

If wanted, one could just yeet it all on the same initramfs full of bloat by changing the presets a bit, and done.

I've done this and haven't run into any issues, that said it does feel like I've removed a worthwhile safeguard but I like to live dangerously.

If you only have a single initramfs without autodetect, you technically don't have to worry about nothing, it will only be a liiiiiil bit slower than usual.

At the moment I have a regular initramfs for linux-zen and a fallback initramfs (no autodetect) for linux-lts, and I really can't notice time differences because of unlocking the luks2.


My reposSome snippets

Heisenberg might have been here.

Offline

#8 2022-09-20 22:25:30

robotoid
Member
Registered: 2019-07-18
Posts: 15

Re: [Solved] Advantage of autodetect hook

So it boils down to removing the bloat just because we can, but just in case the things that worked yesterday don't today...

Well sounds very obvious when I put it like that.

Offline

Board footer

Powered by FluxBB