Hacker News new | ask | show | jobs
by origini 20 days ago
Like it :)

What i don't get is why booting still takes seconds. When power is on, the hardware is on.

You can initalize most hardware in parallel, reading the amount of operation system into ram is fast.

1 comments

You can `systemd-analyze` to check what's holding you back (specifically: `sudo systemd-analyze critical-chain` for the slowest part, `sudo systemd-analyze plot > /tmp/analyze.svg` to get detailed graphs which help you skip over parallel boot).

For me, it's decrypting the FDE partition (Grub has a slower encryption routine than cryptsetup, which determines round number on "how many rounds can we do in X seconds"), followed by Linux decrypting the swap partition (takes 2 whole seconds) followed by NetworkManager waiting several seconds to discover networks before resuming boot services.

With the right setup, you can boot Linux in (dozens of) milliseconds. You'll have to throw out all subsystems you don't need, compile and configure all drivers you do need, and preferably skip the initramfs step. Doable, but not very practical, because you'll need to recompile the kernel for every update or boot reconfiguration.