GRUB Installation, Configuration, and Use (1) Installing the GRUB when installing Linux. When installing the redhat Linux, you will be prompted to install the boot program. If you select GRUB as a boot program, it is recommended to put the GRUB to the hard disk Mbr.grub can also guide other operations. System, such as FreeBSD, NetBSD, OpenBSD, GNU Hurd, and DOS, and Windows 95, 98, NT, 2000, XP. (2) Once the GRUB is selected, it has chosen the GRUB as the boot program. Let's take a look at its configuration ./boot/grub/Menu.list is GRUB to generate a boot selection menu and set some options. Below is my menu.list : # Grub.conf generated by Anaconda ## Note That You Do Not Have To Run Grub After Making Changes To This File # NOTCI: You Do Not Have A / Boot Partition. This Means That # all kernel and initrd paths are Relative to / , eg. # root (hd0, 8) # kernel / boot / vmlinuz-version ro root = / dev / hda9 # initrd /boot/initrd-version.img#boot=/dev/hdadefault=1timeout=-1ssplashImage=(HD0 , 8) /boot/grub/splash.xpm.gzhidden Manutitle Red Hat Enterprise Linux AS (2.6.9-5.el) root (HD0, 8) kernel /boot/vmlinuz-2.6.9-5.el Root = label = / 1 rhgb quiet initrd /boot/initrd-2.6.9-5.el.imgtitle Windows XP rootnoverify (hd0, 0) ChainLoader 1 Configuration Options Explanation: Take a note in "#". I have two here. The operating system, which is Red Hat Enterprise Linux 4 and Microsoft Windows XP. Where the timeout identifies the default time, if it is "timeout = 10", the default system is guided by the no instruction within 10 seconds; if set to "timeout = -1" GRUB will always wait until the user chooses a system that the default operating system is controlled by the default, and the number after Default indicates that the first aiented is the default, here 0 Represents the first, 1 to represent the second. So if you want to modify the default operating system, modify the number of DEFAULT .Title one is the name of the settings the operating system, the grub does not support Chinese (a little regret) .splashImage Item Designing a background image of the GRUB interface, interested friends can modify the background of GRUB! Root (HD0, 8) indicates from the first hard disk, the nine partition to start the search boot core. (3) Recovering is destroyed by Windows Grub If you use GRUB to boot Linux and Windows, when Windows is reinstalled (actually not because of reinstalling Windows, this method is also suitable for grub, it will destroy the GRUB in MBR, at this time The GRUB is needed to restore. (As an example of Red Hat Enterprise Linux 4) 1. Put the first place of the Linux installation disc in the optical drive, wait for the installation interface, press the [F5] button, which is Linux Rescue mode.
(Before this, you want to select the system to boot in Bois) 2. Then select the language and keyboard format 3. and select whether to configure the network, you can choose to skip the network configuration, of course, if you need it, you can choose Yes, specifically The setting process is the same as installation. 4. Select whether to let the system look up the RHEL system on the hard disk and select Continue. 5. Press Tips Chroot / Mnt/SysImage6.grub-install / dev / hda Note: You can do this in step 5. , Enter: GRUB> Root (HDX, Y) GRUB> Setup (HD0) If there will be a successful ... here X, if it is a disk, it is 0, if you installed Linux root partition On the second hard disk, that x is 1; Y, is the root partition where the Linux system is located. Setup (HD0) is to write GRUB to the MBR of the hard disk.
Sometimes you need to change /boot/grub/Menu.list file, please refer to (2) GRUB configuration (because it is possible to find Linux hard drive)