just a summary of how linux boots up from the ground:
5 steps
1. PC loads BIOS from flash memory. BIOS sets up hardware configuration, and read from special registry to use a device as the booting device, usually the hard disk. if it is hard disk, it loads the first sector of 512 bytes into memory.
2. the 512 bytes contains executable code for boot loader, the first ~400 bytes are executable code, then follows with 64 bytes of 4 primary partition information, including starting sector, ending sector, size etc, and then a 2 byte magic code 0xAA55 as boot sector validity checker. It loads the chosen booting partition (and mark other partitions not booted) and loads the second part of the boot loader.
3. the second part of the boot loader reads the partition loads the file system of the volumn, and reads the bootloader entirely and prompt the user to load the kernel. it put kernel into memory and transfers control to the kernel
4. the kernel executes and creates the real root system, loads up modules to control the hardware etc, and starts the init process which is for user processies
5. the init initializes the user processies, this is where the terminal starts up, or the log screen starts up
4. the rest of the bootloader locates the
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment