a , boot BIOS (basic input/output system, integrated on motherboard) power-on self-test
1, check the system hardware connection. such as video card, memory, etc. to provide the device information to the operating system
2. Look for the startup disk. Boot from hard disk or boot from CD (first boot level)
3, look for the first boot sector on the hard disk (master boot record MBR)
mbr= Boot Program (446) + partition table (64) + Check code (2) = 512 bytes
2 , read MBR (bootloader in MBR)
Read MBR[[email protected] ~] #dd if=/dev/sda of=/mbr bs=1 count=512
View MBR [[email protected] ~] #hexdump-C/MBR
3 , load bootloader (a small program that the bootloader does not fit in memory), (that is, Linux grub, corresponding configuration file/etc/grub.conf)
4 , kernel initialization (loading hardware drivers, etc.)
5 , executes the first process init (/sbin/init, corresponding configuration file/etc/inittab)
6 , init execute script file:
/etc/rc.d/sysinit & Nbsp; Activate swap partitions, check disks, load hardware modules, and other tasks that require priority execution
/etc/rc.d/rcn.d //n represents a different run level
/etc/rc.d/rc.local // user-defined script files
7 , execute/bin/login program, enter login status
4 Files Loaded/ETC/BASHRC
/etc/profile (global file with the first 2 ordinary users logged in)
/root/.bash_profile
/ROOT/.BASHRC (back 2 files user loads home directory file below file)
[[email protected] ~] #cp-P/etc/skel/.bashrc*/home/user
This article is from the "Linux" blog, so be sure to keep this source http://1038457789.blog.51cto.com/10025869/1631326
Linux boot process