I'm interested in how operating systems work. I've been reading some articles about Linux and seem to understand how it all generally comes together, but I feel like there's a chicken and egg dilemma when it comes to constructing an operating system.
Since Linux is written in C (and Assembly), which needs a compiler to be compiled, how does one actually compile an operating system for the first time? Do you first write a boot loader out of your existing OS? Or do you do something else? Do you have to dual-boot for the first time? Or you need two machines? What did Linus first end up with when he started his project? What did his very first result look like?
What's the very first thing you need to design and write when you're programming an Operating System?