How to change the grub. conf configuration file to guide another System

Source: Internet
Author: User


For centos, RedHat, and other Linux releases, the grub boot program is used to load the kernel into the memory. If multiple operating systems are installed on one of your disks, these operating systems must also load the kernel through the grub boot program. This is because a disk can only have one GRUB boot program, but can have multiple operating systems.

The grub Bootstrap program provides guidance for multiple systems by reading its own configuration file.

Grub configuration file:/boot/GRUB/grub. conf


Grub. conf:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M02/39/95/wKiom1O6kjfAWYBTAAT1Mtso-Fw756.jpg "Title =" screenshot1.png "alt =" wKiom1O6kjfAWYBTAAT1Mtso-Fw756.jpg "/>


Default = 0 defines the default Operating System loaded by the system.

Timeout = 5 defines the default wait time

The title defines the system name, which can be changed by yourself.

Root (hd0, 5) defines the storage location of the kernel files of the corresponding system; 0 indicates the first disk, and 5 indicates the fifth partition of the disk;

Kernel/vmlinuz the vlinuz file on the current disk, that is, the disk partition where the grub boot program is located is the current partition;

Initrd/initramfs is the initramfs file on the disk partition where grub is located;


Initramfs (init RAM File System) is a disk file system simulated in the memory space. Its main function is to connect the kernel to the rootfs File System on the disk. If no, the kernel cannot load the rootfs File System on the disk into the memory.


The above are the steps for the grub boot program to guide the Linux operating system and the detailed configuration;


If you want grub to guide your window operating system, the process is as follows:

650) This. width = 650; "src =" http://s3.51cto.com/wyfs02/M01/39/98/wKioL1O6lWzC3upMAAQyEv6C7WM199.jpg "Title =" Screenshot-1.png "alt =" wkiol1o6lwzc3upmaaqyev6c7wm199.jpg "/>

Add one to the original grub. conf configuration file:

Title Window XP and grub will display Window XP during boot.

Rootnoverify (hd0, 0) in grub, no matter what type of hard disk is identified as HD,

(Hd0, 0) indicates the first partition of the first hard disk, where the kernel file of the operating system is stored.

Chainloader + 1 (note: There are spaces in the middle) means: the first sector in the partition where the chain loading system is located;

Makeactive (hd0, 0) is the device that activates the operating system.

The last step of boot is to boot the kernel of the operating system.


After adding the preceding items to the configuration file of grub. conf, save and exit. Start the system again, and then you can guide another system.

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.