Reference: http://blog.voodoo.com.cn /? P = 14
1. Place the centos installation disk into the optical drive and boot from the optical drive;
2. on the installation page, select rescue mode (F5: Linux rescue): F5 enter Linux rescue, and enter shell according to the Wizard. "Sh-***** #" is displayed -*****#", * ** is the version.
3. Enter: grub to go to grub mode. The prompt is: grub>. Then, enter: Root (, press the tab key and fill it with: Root (hd0, and then press the tab key, in that table, there are words similar to ext2fs, which may be the same. Enter numbers and ")", for example, root (hd0, 6 ).
4. Enter setup (hd0). Run the following command to install GRUB: Write the information to the MBR of hd0, enter quit, exit grub, enter reboot, and restart the computer.
5. Add by Tom-20111120 ):
5.1: both root and setup are commands, so there must be spaces between them and the following parameters;
5.2: some grub versions can be automatically completed by pressing tab, and some cannot, rhel6 won't;
5.3: in root (hd0, 6), hd0 refers to the first 1st hard disks, counted from 0, that is, hd0;
5.3:Root (hd0, 6)6 indicates the number of the partition where/boot is located. The number 6 is the number of the current drive letter minus 1. The current Boot partition is inThe third Logical Disk, that is, sda7, 7-1 = 6;
5.4: Continue to 5.3. The hard disk has four primary partitions: sda1, sda2, sda3, and sda4. If the boot is mounted to the primary partition, the numbers are 0, 1, 2, and 3 respectively. If the number is installed on the Logical Disk, the first logical disk is sda5, therefore, numbers correspond to 4, 5, 6, and 7 respectively (the first logical disk is always sda5 ).