RaghavOS

Bootloader written from scratch in C and x86 assembly. Boots from BIOS, transitions into a custom runtime, and serves as a forcing function for understanding what the OS layer actually does for you.

By Aditya Singh Khichi, Full Stack Engineer, New Delhi, India.

Tech stack: C, x86 Assembly, BIOS, QEMU.

MBR boot sector: 512 bytes

Problem

Modern engineers spend their careers above 5+ layers of abstraction (frameworks, runtimes, kernels, libc) and rarely see the moment where the BIOS hands the CPU to your code. That's the moment everything else is built on top of, and treating it as a black box leaves a gap in the mental model of what 'the computer is doing right now' actually means.

Approach

Hand-written x86 boot sector in assembly that BIOS loads at 0x7C00. Custom linker setup to compile and link C code in a no-libc, no-runtime environment — every malloc, every printf, every memcpy is something you provide or do without. Built and tested under QEMU first to keep the iteration loop tight, with the final image written to bootable media for hardware verification.

Outcome

A working boot path from BIOS to a usable environment. More importantly: a permanent shift in how I read application code. When I see a string concatenation or a syscall now, I'm aware of what it actually costs in a way that pure-application engineers usually aren't. That perspective shows up in how I think about latency, allocations, and the 'cost of an abstraction' debate.

Live link: https://github.com/Raghav-45/scratch-bootloader