Skip to content
Tech News
← Back to articles

Boot Naked Linux

read original get Linux Boot Naked Kit → more articles
Why This Matters

Boot Naked Linux demonstrates how minimal modifications to the Linux kernel can enable ultra-fast startup times, emphasizing the importance of streamlined, lightweight systems for rapid deployment and resource efficiency. This approach challenges traditional boot processes, offering potential benefits for embedded systems, IoT devices, and scenarios where speed is critical.

Key Takeaways

Boot Naked Linux

Starting up a Linux kernel to host one single process rather than a full on operating system ... and doing it in less than a second!

When I was a kid, computers weren’t coddled and left running 24/7, when you were done with them you switched them off, and when you wanted them again you just switched them on and within a second or so they’d be loading whatever was in their disk drive.

There was a brief moment in the early 2000s where the newly introduced SSDs made booting quick but as always the tech industry has taken up the slack until even a 16 core monster with a fast SSD still takes a minute to get its feet under it.

So I wanted to try an alternative. Keep the Linux kernel but strip away everything else I could. Here goes … well not quite here goes nothing, but here goes a lot less.

UPDATE: As per long tradition, while trying to fix a couple of details I found “Building a tiny Linux from scratch” which does most of what I do here but in Rust and a year ago, so that’s worth a look too.

Hello, World!

The first thing a Linux system does is run an “init” program of one sort or another which loads all the other processes and configurations and stuff. There’s nothing too special about this program, it’s just a regular executable or script, and there have been a few different approaches taken over the years in any case.

So we can write a new one in C … here’s init.c :

#include <stdio.h> #include <stdlib.h> #include <sys/reboot.h> int main(int argc, char **argv) { fprintf(stderr, "Hello from init.c!"); reboot(RB_POWER_OFF); }

... continue reading