Hacker News new | ask | show | jobs
by viraj_shah 530 days ago
Hi OP, this looks super cool. I remember hearing about this (https://www.linuxfromscratch.org/) many years ago but have never done it.

Curious, what are the prerequisites for this? Do I have to know about how kernels work? How memory management, protection rings or processes are queued? Some I'd like to definitely learn about.

2 comments

LFS is about building a Linux distribution from scratch (i.e. using the Linux kernel.)

The book in question is about how to build your own operating system (i.e. a non-Linux) kernel from scratch.

> We'll implement basic context switching, paging, user mode, a command-line shell, a disk device driver, and file read/write operations in C. Sounds like a lot, however, it's only 1,000 lines of code!

Thank you! If you've written some programs (ideally in C), you're good to go. You might stuck on some concepts, but you can learn one by one. IMO, implementing it makes you to understand the concepts more deeply, and learn more that you won't notice when you just read textbooks.

Also, because the implementation in this book is very naive, it would stimulate your curiosity.