[lenco@caribsurf.com: O.S.]

Jonathan Gilbert logic@phayze.com
Tue, 18 Sep 2001 19:09:38 -0500


At 01:23 AM 9/18/2001 -0700, you wrote:
>hey there, could u please describe the process of booting clearly indicating
>where the operating system fits into the entire process. Thanks in advance
>for your help - even if you can't help me...the thought counts...thanks.

I'm sure this is different for every architecture :-) Though I've never
actually coded it, here is my understanding of the process of booting an
x86 (what most people have -- runs Windows) box:

- Power is turned on.
- Processor begins executing BIOS from ROM/flash chip on motherboard
(segmented address FFFF:0000).
- BIOS queries each expansion slot and allows cards to execute a loader if
desired (I don't know this for certain, but it's the simplest explanation I
could find for the fact that several of my expansion cards present a splash
screen during the initial boot process).
- BIOS performs POST -- Power-On Self Test -- which typically consists of
touching every byte of RAM to make sure it's there and resetting every
drive controller to verify that they're all functioning (that's why your
disk drives whir and your hard drive chirps during startup). The POST also
often tests the PC speaker, which is why most systems beep during startup.
- BIOS loads the first 512 bytes, called the _boot_ sector, off of the hard
drive, and then executes it (jumps to it). This contains the 'bootstrap',
which is specific to the operating system. When an operating system is
originally installed, it typically needs to overwrite the boot sector with
its bootstrap. Some do this automatically (e.g., DOS & Windows), others
provide you with the option to do so at a later date (e.g. Linux). If you
forget to do this, you may not be able to boot the newly installed
operating system :-)
- Bootstrap loads a section of code designed to load/startup the operating
system and executes it.

>From that point on, it's specific to each operating system how it will go
about setting up the machine states as desired, load & start the kernel and
start the program(s) and/or script(s) which take the machine from a state
where there are 0 processes to a state where you can begin to interact with
it.

To the others on this group: I may have some points wrong. If I do, I want
you to let me know :-)

Thanks,

-logic