Boot process with primary boot partition (MBR)--Bird's home cuisine

Source: Internet
Author: User

In the previous essay, it has been mentioned that CMOS and Bios,cmos are recording hardware parameters (including system time, device I/O address, CPU voltage and frequency, etc.) and embedded in the memory of the motherboard, BIOS is a firmware written to the motherboard (firmware is written to the hardware of a software program).

  This BIOS is the first program that the computer system will actively execute at boot time .

Next, the BIOS will analyze what storage devices are in the computer, take the hard drive as an example, theBIOS will be based on the user's settings to obtain a bootable hard disk, and to the hard drive to read the first sector in the primary boot partition (master boot record,mbr) location. MBR this only 446bytes of hard disk capacity will be placed in the most basic boot loader (boot loader), at this time the BIOS is completed, the next is the MBR of the boot loader work.

The purpose of this bootloader is to load the kernel file, because the bootloader is provided by the operating system at the time of installation, so it will recognize the file system format on the hard disk, so it can read the kernel file , and then the kernel file works. Then there is the task of operating system we know.

Simply put, the entire boot process to the operating system before the action should be this:

1.BIOS: Boot active firmware, will recognize the first boot device

2.MBR: The primary boot partition block in the first sector of the first bootable device, which contains the boot loader.

3. Boot loader: A software that can read kernel files to execute.

4. kernel file: Start the function of the operating system.

Both the BIOS and MBR are features that the hardware itself will support, and the boot loader (boot loader) is a set of software installed on the MBR by the operating system. Since the MBR is only 466bytes, the bootloader is very small and perfect. The main tasks of this boot loader are as follows:

    • Menu: The user can choose different boot options, which is also an important function of multi-boot.
    • Load kernel file: Directly execute a bootable program section to start the operating system.
    • Transfer Other loader: Transfer the bootstrap function to other loader responsible.

  The first two of the three tasks above boot loader are well understood, but the third one is interesting. that means that your computer system may have more than two bootloader programs. It is worth noting that the boot loader (loader) can be installed in the boot sector of each partition in addition to the MBR. partitions also have individual boot sectors? This feature will create a "multi-boot" function.

Let's take an example to illustrate that if your PC has only one hard disk, and it's partitioned into four partitions, where Windows and Linux are installed in the first to second partition, how do you choose to boot with Windows or Linux on boot? Assuming that the MBR is installed with a boot loader that can identify the Windows/linux operating system at the same time, the whole process is as follows:

In, we found that the MBR boot loader provides two menus, menu one (M1) can directly load the Windows kernel file to boot, menu two (M2) is the boot load to the second partition of the boot sector. When the user selects the menu two o'clock on boot, the entire boot loader will be given the boot loader of the second partition. When the second boot loader starts, the boot loader (medium) has only one boot menu, so it can be powered on using Linux kernel files. This is the work of multi-booting. We will make a summary.

    • Each partition has its own boot sector.
    • The system partition in the figure is the first and second partitions.
    • The actual boot-up kernel files are placed in each partition.
    • Loader only knows the bootable kernel files within the system partition, as well as other loader.
    • Loader can direct or indirectly transfer management to another management process.
    • Each partition has its own boot sector, loader can be installed on the MBR or boot sector, and loader will only recognize the bootable kernel file within its own partition.

Boot process with primary boot partition (MBR)--Bird's home cuisine

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.