Q: How to reduce Linux kernel boot time from seconds to milliseconds?
Answer
Standard Linux boot on embedded systems takes 3-30 seconds. Optimizations: (1) Remove unnecessary kernel drivers. (2) Use U-Boot Falcon Mode to boot directly to the application without a full kernel. (3) Enable kernel initramfs with only required modules – avoids mounting a full rootfs. (4) Use static instead of dynamic device nodes (devtmpfs). (5) Disable unused kernel subsystems. (6) Boot directly to userspace using a minimal initramfs that launches the application skipping systemd entirely. (7) Use kexec for fast switching between two kernels. Typical results: with Falcon Mode + initramfs boot to application can reach <500 ms. Profile boot time with bootchart or bootgraph kernel command-line options.
Filed under: FAQ
