In the boot, due to the 80x86 features CS (Code Segment) This register is placed in 1, and IP (instruction Pointer) This register is all put 0, in other words, cs=ffff and ip=0000. At this point, the CPU is based on the value of CS and IP, to ffff0h to execute the instructions placed in that place. At this time, because the ffff0h has reached the top of the high position, so, ffff0h this place always put a jmp instruction, jump to the lower position. Then, the ROM BIOS will do some checking, like memory, keyboards and so on, and in our commonly known umb (Upper memory Block) scan, to see if there is a legitimate ROM existence (such as the ROM on the SCSI card). If you have to go inside to carry out some things, after the execution of the trip to continue just now. At the end, read the first sector on the hard disk. Here, let's say you're booting from a hard drive. Therefore, in terms of the construction of a hard disk, its first sector is called the MBR (Master Boot Record). Because a sector is 512bytes, and MBR this 512bytes can be divided into two parts, the first part is Pre-Boot, accounting for 446bytes; the second part is partition Table, which accounts for 66bytes. One of the functions of Pre-Boot is to see which partition is labeled active and then read the partition boot area. In the Linux startup aspect, most people usually put Lilo or grub in the MBR or superblock, if you put Lilo or grub in the MBR, then your screen will appear the start item selection, and then the load kernel action. On the other hand, if you install Lilo or grub in Superblock, you usually have a program that manages the boot, either on the MBR or on a separate partition. Then the management Boot program read LILO or GRUB, and then do the load kernel action. So far, kernel was load to memory, followed by a series of probe around the action, such as serial port, the same port, floppy disk, sound card, hard disk, optical drive, etc., and then mount Root Partition. After that kernel will start the init process. The PID of this process is 1, which is the ancestor of all process.
Linux boot process