8

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?

10
  • 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, 2010 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, 2010 at 2:03
  • 3
    The magic smoke goes to all the right places and powers things up. ;)
    – vivin
    Apr 14, 2010 at 2:09
  • I'm going to guess from an "i want to know as much as is possible" perspective.
    – RCIX
    Apr 14, 2010 at 6:08
  • @RCIX: That is right :) .. A common sequence across all the O.S would also be great Apr 14, 2010 at 17:10

4 Answers 4

6

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

3
  • 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, 2010 at 2:15
  • 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, 2013 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.) Sep 5, 2013 at 20:15
4

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.

1

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.

1
  • Thanks you.. I just wanted to understand the common boot sequence across all the O.S .. Apr 14, 2010 at 16:54
1

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.
2
  • Qualification: On a standard PC. "Real" computers generally use a different sequence, often involving having a "service processor" do the POST and initial load. Sep 5, 2013 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, 2014 at 16:20

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .