General Summary:
1) boot BIOS self-test
2) MBR boot
3) Grub Boot Menu
4) Load Kernel kernel
5) Start the INIT process
6) Read Inittab file, execute Rc.sysinit RC and other scripts
7) Start Mingetty, enter the system login screen
1> Boot BIOS Self test
(excerpt) A person with a slight computer base should have heard of the BIOS (basic input/output system), also known as the basic input and output system, which can be regarded as a software that is permanently recorded in ROM and is part of the operating system input and output management systems. The early BIOS chip is really "read-only", the content is written with a burner, once written can not be changed, unless the chip is replaced. Now the motherboard uses a chip called Flash EPROM to store the system BIOS, the contents of which can be re-written by using the erase program provided by the board manufacturer, so that the user upgrade BIOS provides a great convenience.
The function of the BIOS consists of two parts, the post code and the runtime service respectively. After the post phase is complete it will be purged from memory, and the runtime service will be retained for the target operating system startup. The detailed work done in the BIOS two phases is as follows:
Step 1: power-on self-test post (power-on), mainly responsible for detecting the system peripheral critical equipment (such as: CPU, memory, graphics card, I/O, keyboard mouse, etc.) is normal. For example, the most common is the memory loose situation, the BIOS self-test stage will be error, the system can not start up;
Step 2: after step 1 succeeds, a small program is executed to enumerate the local device and initialize it. This step is primarily based on the system boot order that we set up in the BIOS to search for the drives that are used to boot the system, such as hard disks, CDs, USB drives, floppy disks, and networks. We take the hard drive as an example, the BIOS now reads the first sector of the hard drive (mbr,512 bytes) and executes the code inside. In fact, the BIOS here does not care what is in the first sector of the boot device, it is simply responsible for reading the sector content and executing it.
At this point, the BIOS task is completed, and then the system-initiated control is transferred to the MBR section of the code.
PS: In a PC, Linux starts from the 0XFFFF0 address.
2>MBR Boot
(from the encyclopedia) MBR (Master boot record) edits the MBR, which is the master boot record, which is the boot sector at the very front of the drive when the hard disk or removable disk partition is on the IBM compatible machine. The MBR concept was only available after the 1983 PC DOS 2.0 support HDD. [1] The MBR describes the logical partitioning information, including the file system and how it is organized. In addition, the MBR also contains executable code for the computer to load the operating system in the second phase of startup or a boot record (VBR) that connects each partition. This MBR code is often referred to as the bootloader. Because the MBR partition table has a maximum addressable storage space of only 2Tb (232x512 bytes). Therefore, in the case of large hard disks, the MBR partitioning method is gradually replaced by the GUID partition table. MBR cannot exist in non-partitioned media such as floppy disk etc.
3>grub boot Menu
GNU Grub (GRand Unified bootloader "Grub") is a multi-OS launcher from the GNU project. Grub is the implementation of a multi-boot specification that allows users to have multiple operating systems at the same time on the computer and select the operating system that they want to run when the computer starts. Grub can be used to select different cores on the operating system partition or to pass startup parameters to those cores.
4> Loading Kernel kernel
5> starting the Init process
6> 6 levels of boot:/etc/inittab
# 0-halt (do not set Initdefault to this) (off)
# 1-single User mode (single mode)
# 2-multiuser, without NFS (the same as 3, if you don't have networking) (multi-user, no NFS (this level is the same as 3 if you are not configuring the network))
# 3-full Multiuser mode (full multi-user)
# 4-unused (not used)
# 5-x11 (Graphical interface X11)
# 6-reboot (do not set Initdefault to this) (restart)
Temporary settings
Init level 0-6
Permanent configuration
Vi/etc/inittab
Modify the last line, change to the desired mode, restart the system will be restarted in this mode, determined not to use 1 and 6, one is an infinite shutdown, an infinite restart.
7> start Mingetty, enter the system login screen
Enter the shell interface, enter the account password to start the operating system, TTY Terminal Common Tty1-tty6,tty7 is a graphical interface. (The system does not install the graphical interface)
TTY is switched with Alt+f (1-6).
Linux boot-up process