LinuxSir.cn,穿越时空的Linuxsir!

 找回密码
 注册
搜索
热搜: shell linux mysql
12
返回列表 发新帖
楼主: orange

安装W2000时,把GRUB丢了,如何恢复GRUB?

[复制链接]
发表于 2003-6-8 11:11:54 | 显示全部楼层
boot with your rescue disk(fdd) or your installation cdrom and run grub-install to fix.
if you are unsure on grub's path, try this:
#find / -name grub*
发表于 2003-6-8 21:45:37 | 显示全部楼层
[root@localhost grub]# fdisk -l

Disk /dev/hda: 30.0 GB, 30005821440 bytes
255 heads, 63 sectors/track, 3648 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/hda1 * 1 966 7759363+ 7 HPFS/NTFS
/dev/hda2 967 2316 10843875 7 HPFS/NTFS
/dev/hda3 2317 3073 6080602+ 83 Linux
/dev/hda4 3074 3648 4618687+ f Win95 Ext'd (LBA)
/dev/hda5 3074 3608 4297356 b Win95 FAT32
/dev/hda6 3609 3648 321268+ 82 Linux swap
[root@localhost grub]#

只有一个硬盘,hd1,hd2,hd3都是主分区。hd1和hd2分别是2个不同版本的winxp. linux9装在hd3里面。

我今天把hd2里面的winxp重装了一遍以后,grub就没了。

而且,我没有给硬盘划分boot分区!!!
怎么办??
发表于 2003-6-8 22:49:15 | 显示全部楼层
#grub
grub>root (hd0,2)
grub>setup (hd0)
grub>quit
#reboot
!!ensure that your grub.conf is correctly configured!!
发表于 2003-6-8 23:17:45 | 显示全部楼层
发表于 2003-6-9 18:26:08 | 显示全部楼层
谢谢   tmcco兄及其他各位朋友,已经搞定了!

不过,我还是不太理解
grub>root (hd0,2)
grub>setup (hd0)

能不能具体讲讲那个2是怎么来的?
发表于 2003-6-9 19:36:09 | 显示全部楼层
in grub "hd0" means hda in linux, so "hd1" for hdb...
in grub "(hd0,0) means first partition of hd0 (linux:hda1)
so (hd0,1)->hda2, (hd0,2)->hda3.....
your linux root(/) partition is /dev/hda3, so that the /boot/grub is in /dev/hda3 too, the "root (hd0,2)" specifys that grub shall find in hda3, and "setup (hd0)" means install the grub loader to the hda's MBR.
you may read the grub manual for details.
发表于 2003-6-9 20:07:09 | 显示全部楼层
i see.
thank you for your answer.
发表于 2003-6-10 11:40:04 | 显示全部楼层
you are welcome.
您需要登录后才可以回帖 登录 | 注册

本版积分规则

快速回复 返回顶部 返回列表