Take the 2-minute tour ×
Super User is a question and answer site for computer enthusiasts and power users. It's 100% free, no registration required.

I'm trying to understand what happens when a computer is turned on. How the computer works on startup, various initializations that take place, etc. For example, is the bootstrap loader the first step? When are device drivers loaded?

share|improve this question

migrated from stackoverflow.com Apr 14 '10 at 2:33

This question came from our site for professional and enthusiast programmers.

2  
Watch a few different linux distros boot up such as Debian - that may give you some idea of what's going on. –  Danten Apr 14 '10 at 2:01
2  
Are you interested from a "poweruser" perspective or a "if I was going to write my own OS, what would I need to handle" perspective? As it stands, I think the question is too broad to get a good answer. –  SqlRyan Apr 14 '10 at 2:03
3  
The magic smoke goes to all the right places and powers things up. ;) –  vivin Apr 14 '10 at 2:09
    
I'm going to guess from an "i want to know as much as is possible" perspective. –  RCIX Apr 14 '10 at 6:08
    
@RCIX: That is right :) .. A common sequence across all the O.S would also be great –  darkie15 Apr 14 '10 at 17:10
show 5 more comments

4 Answers

up vote 6 down vote accepted

The startup/boot sequence varies somewhat between different operating systems (although the early steps are generally common).

Also providing any sufficiently detailled description of the boot sequence is well beyond the scope of an SO answer. I'd rather refer you to the following links

share|improve this answer
    
For Windows, "Windows Internals" by Russinovich et al provides a very detailed walkthrough of the Windows boot sequence (and lots of other stuff, of course). –  itowlson Apr 14 '10 at 2:15
    
Thanks everyone .. It was very helpful. –  darkie15 Apr 14 '10 at 16:53
1  
Regarding the POST in the BIOS: I wonder if the handbook of the first IBM PC is still around. It included the source of the BIOS in 8086 assembler, after reading you could understand why the boot process was so slow. –  ott-- Sep 2 '13 at 11:24
    
@ott-- I'm sure there are still copies around. Lots of folks are "into" those old PCs and have stuff like that. (Though I tossed mine out at least a week ago.) –  Daniel R Hicks Sep 5 '13 at 20:15
add comment

First, the hardware in your motherboard does a basic check to make sure the minumum number of components is present such as RAM, video out, hard drive, keyboard, mouse etc.

This is why your keyboard flashes when you boot your computer. Then, the program embedded in the motherboard finds the boot sector of your hard drive, and looks for an operating system there.

If it finds it, then it passes control to the operating system, which then begins to load itself into memory, and do things like load device drivers and such.

If you are interested in the steps the operating system is taking, you can press F8(assuming Windows here) while your computer is booting, and that will give you some options for booting. I believe one of the options will let you see what the OS is doing step by step in its load.

Windows comes with a utility called msconfig which allows you to see all of the things that the OS loads.

share|improve this answer
add comment

Google's Chromium OS Fast Boot goes over boot sequence from a traditional operating system. Though if you want specifics we'd have to know the operating system.

share|improve this answer
    
Thanks you.. I just wanted to understand the common boot sequence across all the O.S .. –  darkie15 Apr 14 '10 at 16:54
add comment

In summary following things happen

  1. Turn on the Power button
  2. CPU pins are reset and registers are set to specific value.
  3. CPU jump to address of BIOS (0xFFFF0).
  4. BIOS run POST (Power-On Self Test) and other necessary checks.
  5. BIOS jumps to MBR(Master Boot Record).
  6. Primary Bootloader runs from MBR and jumps to Secondary Bootloader.
  7. Secondary Bootloaders loads Operating System.
share|improve this answer
    
Qualification: On a standard PC. "Real" computers generally use a different sequence, often involving having a "service processor" do the POST and initial load. –  Daniel R Hicks Sep 5 '13 at 11:33
    
Real computers, at least from the advent of the 80386 onwards, don't start as given in step #3, either. –  JdeBP Jan 1 at 16:20
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.