Knowledge push: (for knowledge, refer to the private kitchen of laruence)
Let's review the role of MBR: the MBR contains the primary guide.ProgramAccording to the partition table, the kernel image of the operating system is loaded into the memory from the specified location of the hard disk. In summary, the main Boot Program provides the following functions:
(1) provide menus to provide users with different startup Projects
(2) load the core file, enter the specified program area according to the selected startup project, and start the Operating System
(3) transfer control to other loaders
========================================================== ========================================================== ==========================================================
New knowledge point: "No partition has its own Boot Sector", which is the basis of the "Multi-Boot" Function
Therefore, in addition to MBR, the boot program can also be written in the boot sector of each partition.
Example:
A hard disk is divided into four partitions. Windows and Linux are installed in the first and second partitions respectively. The following flowchart shows how to choose windows or Linux at startup.
1. the MBR boot program provides two menus. a) load the Windows kernel directly to start the system. B) give control to the pilot program in the second partition
2. When you select the second menu item, the boot program of partition 2 Starts (the Blue rectangle in the lower left corner of partition 2). This pilot program only provides one menu item, so boot the Linux kernel directly.
PS. If you want to install multiple boot times, it is best to install windows first
Cause:
(1) When Windows is installed, its boot program will directly overwrite the MBR and the startup sector of its own partition, So if you install linux first, then the Linux boot program will be overwritten.
(2) When installing Linux, it will first ask you if you want to install the boot program in MBR or the startup sector of individual partitions, in addition, the Linux boot program allows you to manually set the boot menu options, so that you can add Windows boot options in the boot menu.
PS. if I first install Linux and install its boot program in the startup sector of partition 2nd, and then install Windows, the Windows boot program will overwrite MBR, but we didn't write the Linux boot program into MBR at the beginning, so there is no restriction on Linux Startup? However, since only Windows is provided in MBR, does the system still fail to start Linux? Yes or not