¿Qué sucede cuando se inicia una computadora?

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?

name_masked
fuente
2
Observe el inicio de algunas distribuciones de Linux diferentes, como Debian, que pueden darle una idea de lo que está sucediendo.
2
¿Está interesado desde una perspectiva de "usuario avanzado" o una perspectiva de "si iba a escribir mi propio sistema operativo, qué necesitaría manejar"? Tal como está, creo que la pregunta es demasiado amplia para obtener una buena respuesta.
SqlRyan
3
El humo mágico va a todos los lugares correctos y enciende las cosas. ;)
vivin
I'm going to guess from an "i want to know as much as is possible" perspective.
RCIX
@RCIX: That is right :) .. A common sequence across all the O.S would also be great
name_masked

Respuestas:

7

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

mjv
fuente
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).
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--
@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
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.


fuente
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.

Corey
fuente
Thanks you.. I just wanted to understand the common boot sequence across all the O.S ..
name_masked
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.
Aniket Thakur
fuente
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
Real computers, at least from the advent of the 80386 onwards, don't start as given in step #3, either.
JdeBP