Please see my comment to the question. Yes, you would do it on some existing OS. Just think about it: after all, the creation of a new OS is conceptually reduced to creation of some image on some storage media, such as CD, DVD or flash drive. The standards for those media devices and firmware on existing computers already allows the computers to boot from this media, if it is properly prepared. What is so wonderful that you can write all those physical "sectors" on the media the way it would be recognized as bootable and ultimately
bootstrap the whole OS? After all, you merely write bytes on the media.
Yes, there is a chicken and egg problem, but not these days, where everything is ready for new OS. Please read on this topic:
http://en.wikipedia.org/wiki/Bootstrapping#Computing[
^],
http://en.wikipedia.org/wiki/Bootstrapping_%28compilers%29[
^].
Unfortunately, the article references above discuss OS bootstrapping less and compilers more, but some ideas are similar. After all, to write programs, you need other programs. Where did they get the very first program to be used as a software development tool?
It brings us to your second, "chicken and egg" question. The old causality dilemma about
chicken and egg, is way too easy to answer, if we agree to understand the question rather formally and in the most narrow sense: of course, the egg came first, because, before the chicken get evolved from their predecessors, many other species of animals already had eggs. :-)
Funny or not, but this should be a key to your question about "first OS made". There was no such thing as "first OS". Instead, the concepts of software programs evolved gradually, and the concept of "OS" itself was eventually created when some existing pieces of software (and hardware!) already carried some rudimentary features which are now associated with OS. This evolution, being truly amazing, still presents no miracle or mystery. For detail, try to dig into computing history. Or just learn programming in-depth. :-)
The evolution of the concept of OS (not development of some models of OS, but evolution of the concept itself) continues to evolve. By the way, these days, people rarely develop new OS written on a bootable media. Most of such work is done based on
virtualization. Please see:
http://en.wikipedia.org/wiki/Platform_virtualization[
^],
http://en.wikipedia.org/wiki/Virtualization[
^].
This ways, the OS being developed and tested is run not on a "real" machine, but on a virtual hardware emulated on some existing system.
—SA