Linux BASICS (III): Multi-boot

Source: Internet
Author: User

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

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.