Linux grub is a management tool for multiple operating system startup items in Linux. After the computer is started, grub will read... 5: If setup (hd0) is written to grub, if the system displays "successful", the Linux Grub has been repaired.
Linux Grub repair system partition/installation environment
(In GRUB format ):
60G: Microsoft Windows XP
- (Hd0, 1)-> ntfs c:
- (Hd0, 2)-> ntfs d:
- (Hd0, 3)-> ntfs e:
- (Hd0, 4)-> ntfs f:
- 20G: Fedora Core 6 (FC6)
- (Hd1, 0)->/boot
- (Hd1, 1)->
- (Hd1, 2)->/
Linux Grub repair process:
1: Set boot to CD boot
2: insert the linux installation CD/Repair Disk, press F4/FC6 to F5, and enter linux rescue-> press ENTER
3: grub-> Press enter. After you press the Enter key, grub> appears, and the fix is displayed.
4: (here I will simply talk about my operation process. Because many places do not even understand .)
Grub> rootnoverify (hd1, 0)-> press ENTER
Grub> setup (hd0)-> press ENTER
Checking if "/boot/grub/stage1" exists... no
Checking if "/grub/stage1" exists... yes
Checking if "/grub/stage2" exists... yes
Checking if "grub/e2fs_stage1_5" exists... yes
Runing "embed/grub/e2fs_stage1_5 (hd0)"... sectors are embedded.
Succeeded
Runing "install/grub/stage1 d (hd0) (hd0) 1 + 15 p (hd1, 0)/grub/stage2/grub. conf"... succeeded
Done.
Grub> install/grub/stage1 d (hd0) (hd0) 1 + 15 p (hd1, 0)/grub/stage2/grub. conf-> press ENTER
5: start the computer. OK!
Attach the code of my grub. conf
# Grub. conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE: You have a/boot partition. This means that
# All kernel and initrd paths are relative to/boot/, eg.
# Root (hd1, 0)
# Kernel/vmlinuz-version ro root =/dev/hdb3
# Initrd-version.img/initrd
# Boot =/dev/hda
Default = 1
Timeout = 5
Splashimage = (hd1, 0)/grub/splash.xpm.gz
Hiddenmenu
Title FC System (2.6.18-1.2798.fc6)
Root (hd1, 0)
Kernel/vmlinuz-2.6.18-1.2798.fc6 ro root = LABEL =/rhgb quiet
Initrd/initrd-2.6.18-1.2798.fc6.img
Title MS System
Rootnoverify (hd0, 0)
Chainloader + 1