r/osdev • u/koop_a- • Sep 13 '26
I wrote a complete beginner's guide to building a small OS from scratch.
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?
17
u/Sakul_the_one Sep 13 '26
As a beginner of atleast 3 years (I follow one Toutorial, get stuck, come back after learning a new thing and starting all over again and repeat), I’m gonna try to follow this guide.
But this is really cool, thanks
3
u/wacky_weasel Sep 13 '26
This is a really interesting project. I always enjoy seeing people experimenting with operating systems and low-level computing rather than simply building another application on top of the existing stack.
Even if this never becomes a practical daily-driver OS, projects like this are valuable because they provide an opportunity to explore how the different pieces of a computer actually fit together.
Keep going! I'm looking forward to seeing where you take it.
2
u/munozcircus Sep 13 '26
great job. Love it
1
u/CommunityJazzlike274 Sep 13 '26
Cool! This is like craftinginterpreters.com but for osdev
1
u/ViXOS-052 Sep 13 '26
Wow, that’s really well done—especially the red terminal :)
1
u/Tiredly_Ambitious Sep 13 '26
Great job man, i will definitely try it and get back to you with feedbacks
1
u/WarriorSupp Sep 13 '26
i just lurk on this sub and this got me curious... i might watch this actually
1
u/batum_t Sep 13 '26
Thats awesome I love it !
1
u/rodri042 Sep 14 '26
Looks good! Just started reading it.
> If we were to use 32 bit the architectural complexity would just increase without the main OS features changing.
I think you meant 64 here, right?
1
u/michbxl Sep 14 '26
I will give it a try. What is your motivation behind such a big project?
1
u/MeringueOdd4662 Sep 14 '26 edited Sep 14 '26
Nice ! I will study it !! . I download the repo and it do not compile . Errors in interrupts.c . Can you check ? I downloaded the main branch. Wich version of compiler are you using?
1
u/unavailable_000 Sep 14 '26
Wow, I was actually planning to build my own OS to understand the core concepts of how operating systems work at a deeper level. I wasn’t really sure where to start, so I hope this guide helps me. Right now, I’m working on two of my projects, but I’ll definitely start this soon!
1
u/BornRoom257 TurtleOS Sep 16 '26
Amazing!
1
u/theMuslimDev Sep 16 '26
as a beginner in this. i think this looks very useful. i’ll try to make some time to follow it and give my feedback. this is something i always wanted to learn and i think this might be it. thanks for building something like this.
1
u/Whole-Chest90 Sep 16 '26
Saving this, as id like to fiddle with it when I have some time. Thanks for putting this out.
1
u/Mission-Maximum8024 Sep 18 '26
As a heavily frowned upon vibe coder, has anyone seen how far LLM’s are able to get with this.
I can imagine going from what is in the video to a more functional GUI would be massively sped up with the help of AI.
Can anyone think of any reasons it wouldn’t work?
1
u/hypersonicwilliam569 Sep 25 '26
this will be very useful for me, the memory management in particular…
1
u/Puzzleheaded-Half993 Sep 13 '26
Toll Wie kann ich dein Buch beziehen?
1
u/laser__beans OH-WES | github.com/whampson/ohwes Sep 13 '26
Cool idea but bro you gotta get rid of that flashing cursor in the middle of the screen, make it follow the text input or hide it entirely.
1
u/TIRALMA Sep 30 '26
Умничка
0
u/Conscious_Monk_787 Sep 16 '26
Scusate sono nuovo. Ma a cosa può servire costruire un sistema operativo?
0
u/Unique_Economics4015 Sep 17 '26
Thank you for your hard work and contribution to knowledge and humanity.
0
u/[deleted] Sep 13 '26
[deleted] — view deleted comment
1
u/[deleted] Sep 18 '26
[removed] — view removed comment
1
u/[deleted] Sep 19 '26
[removed] — view removed comment
1
u/[deleted] Sep 26 '26
[removed] — view removed comment