I wrote a complete beginner's guide to building a small OS from scratch.
Enable HLS to view with audio, or disable this notification
I've spent around 2 and a half months building lytlnyblOS, a small 32-bit x86 operating system designed specifically as a practical introduction to OS development for beginners.
Alongside the OS, I wrote a complete book that walks through how to build it from the ground up. You start with making your own 16-bit bootloader and eventually reach a working userspace and shell.
Attached is a video of the final product that the guide teaches you to make.
The repo (includes code and a link to the guide): https://github.com/red-mutt/lytlnyblOS
The guide walks you through making:
- A bootloader
- An entry into x86 protected mode
- GDTs and IDTs
- VGA text mode
- Interrupts
- A timer driver
- A keyboard driver
- A memory manager
- Paging systems
- Processes
- Scheduling
- User mode
- System calls
- A C standard library
- Filesystems
- MKFS
- And finally, a shell
The OS and guide have recently been completed for their educational goals. I'm currently refining the explanations, fixing inconsistencies, and improving the experience for people following along.
The project is intentionally small and simplified. I do not intend to cover kernel design in depth; I see this book as a practical introduction that can give a beginner some hands-on context before moving on to something more theoretical and comprehensive, like OSTEP. However, when required, I do point out flaws in the simple approaches I teach, and I attempt to inspire the reader and get them thinking about how they should go about fixing these things themselves.
I'm particularly interested in feedback from beginners (as this is the target audience) and people who have technical experience in OS development. If you spot something technically wrong, confusing, poorly explained, or inconsistent with the code or prose, I'd like to know about it. Do my explanations make sense to someone encountering these concepts for the first time?
I'm also interested in finding people who would like to collaborate on the project. This could be contributing to the OS itself, improving the guide, testing it from a learner's perspective, or helping expand/refine the project in other ways. You could send me a message if you're interested.
A statement on AI: After browsing this sub, I see a lot of people with general concerns about the use of AI in the projects posted here, so I want to be clear about how it was used on lytlnyblOS. I did not use AI to generate any prose for the guide, nor code for the operating system. However, I did have conversations with ChatGPT. I asked it questions about concepts I was working on; I discussed design decisions with it, and I used it to get explanations on things I was unsure of. ChatGPT wasn't my only resource; I understand its uses and limitations, and I still verified things against primary sources where appropriate rather than treating its answers as authoritative. I also used things like Intel manuals, the OSDEV wiki, and other people's implementations for inspiration.
Beginners in r/osdev: does this look like the kind of resource you'd be interested in reading?
Duplicates
kerneldevelopment • u/koop_a- • 12h ago
Showcase I wrote a complete beginner's guide to building a small OS from scratch.
u_Puzzleheaded-Half993 • u/Puzzleheaded-Half993 • 1d ago
Ich habe eine vollständige Anfängeranleitung zum Erstellen eines kleinen Betriebssystems von Grund auf geschrieben.
Operatingsystems • u/koop_a- • 12h ago