LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Newbie (https://www.linuxquestions.org/questions/linux-newbie-8/)
-   -   Boot Process Explaination (https://www.linuxquestions.org/questions/linux-newbie-8/boot-process-explaination-4175424777/)

vnc 08-30-2012 09:22 AM

Boot Process Explaination
 
hi..all...

i need some logically explanation on boot process..i have studied n googled n what i know i m writing down please ADD U R logic answer ..where i have left space..please correct my order if m wrong ..

1. power on
2. CPU gets power? how CPU goes to bios..

3.Cmos load BIOS program

4.BIOS does POST it finds COLD n HOT devices...n finds Bootable device.? It uses some Interpret n Function 13

5. Bios gets loaded to memory i.e boot strapping.

6. BIOS goes to 1st or zero sector of HDD to find MBR. Once it finds MBR it checks Magic number if it is no (than what is the issue) if it is yes it checks active partion and then bootloader(if grub or ntldr..etc..? )


7. it finds GRUB n loads accordingly..? please explain grub(stage1, 1.5, 2) entry I have pasted below..? y it is in read only than it goes to read write mode..
#boot=/dev/hda
default=0
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.18-8.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-8.el5 ro root=LABEL=/ rhgb quiet
initrd /initrd-2.6.18-8.el5.img

other
rootnoverify (hd0,0)
chainloader +1



8. Init is first process it has process ID 1..

9. What happen after INIT is loaded.?

Currently practicing on CENT OS 5.5
Kernel 2.6.18-8.el5

Thank You..

zwitterion-241920 08-30-2012 12:42 PM

1: When the power button is pressed some mechanism automagically loads the BIOS code from the BIOS chip into memory
2: location of first BIOS code segment loaded into IP register -> CPU executes BIOS code
3: BIOS probes I/O ports, looking for devices. It puts the information about the devices in fixed memory locations.
4: BIOS reads CMOS to see which device it has to boot.
5: BIOS reads bytes 511 and 512 from the device. If they contain the binary number 0101010110101010, the device is bootable, proceed to step 6. Else, continue with step 5a.
5a: BIOS reads next boot device from CMOS. If there is another device, go to step 5. If not, continue with step 5b.
5b: BIOS prints error message "error: no bootable device" (or something like that) on screen and hangs.
6: BIOS loads the entire mbr into memory (at byte number 31744).
7: BIOS puts the location of the partition table (byte number 32184) into one of the cpu registers.
8: BIOS sets IP to 31744, thereby transferring control to the bootloader section of the mbr.
9: The GRUB is too large to fit in those 440 bytes, so it has been split into 2 stages; Stage 1 resides in the mbr, its only goal in life is to use stage 1.5 (which contains filesystem-specific code) to locate and load Stage 2, which resides on one of the partitions. In GRUB2 the location of Stage 2 is hardwired into Stage 1.
10: Stage 2 locates and reads the config file and puts a menu on your screen.
11: You select an OS.
12: Stage 2 loads the kernel and initrd and sets the root filesystem.
13: Stage 2 transfers control to the kernel.
14: Kernel starts init.
15: Init starts the system daemons, virtual terminals and the login manager.
16: You log in
17: The desktop environment is initialized.

You might also be interested in the links I posted in this thread.

And please do not use stuff like 'U' instead of 'you', 'R' instead of 'are' and 'n' instead of 'and'. It does not make you look smart.

chrism01 08-30-2012 06:13 PM

Quote:

And please do not use stuff like 'U' instead of 'you', 'R' instead of 'are' and 'n' instead of 'and'. It does not make you look smart.
This++

jefro 08-30-2012 07:02 PM

Actually power on and then a fast test. Then it goes to post then bios.


All times are GMT -5. The time now is 04:27 AM.