Page 1 of 1

Minimal OS with BusyBox and custom init.

Posted: Mon Nov 03, 2025 8:39 pm
by Jonthon
I’ve been experimenting with Linux internals and wanted to understand how the kernel boots and hands control to user space.
As a small test project, I built a minimal Linux-based OS that only includes:

A Linux kernel (version 6.0.1)
BusyBox (statically linked)
My own init program written in Bashscript

It successfully boots in QEMU and drops into a BusyBox shell.

Build Details

Kernel:Linux 6.0.1 (built with `make defconfig` and minor customizations)
Initramfs: manually created using `cpio`
BusyBox: compiled statically (`make defconfig && make busybox`)
Init:a small C program that prints a message and launches `/bin/sh`

---

Boot Method

Booted with QEMU using the following command:

qemu-system-x86_64 -kernel bzImage -initrd initramfs.cpio.gz -append "console=ttyS0"


---

Boot Output

Image

Next step

This was my first time building a Linux-based OS from scratch.
Next, I plan to:

* Replace BusyBox with my own basic shell
* Add a simple filesystem layout
* Experiment with more complex init logic

Any suggestions or feedback are very welcome!