admin管理员组

文章数量:1531722

单位几年前购买的一批Dell T7500工作站装有Win7/RHEL5.5双系统,最近相继出现Win7系统盘坏掉的现象,于是更换新盘,先用Win7 Ghost U盘启动重装系统,装完后恢复Linux启动菜单,具体操作如下:

1、将Linux系统盘放入光驱;

2、重启系统并按F12选从光驱启动;

3、在BOOT下:输入  linux rescue  回车;

4、在sh#下,输入 fdisk -l|less  回车,查看Win7/Linux系统所在分区的顺序号(即对应Device的Boot标记有*号处)。机器原来安装的Win7有一个隐藏的Dell Utility分区,占据/dev/sda1,系统安装在/dev/sda2分区上(从Linux的grub.conf上看,对应Win7的rootnoverify (hd0, 1)),而我新换的盘装的Win7分了两个区,系统安装在/dev/sda1上(对应grub.conf上的rootnoverify (hd0, 0)),而/dev/sda2作为数据分区。原装Win7没有安全模式选项,我用Ghost安装系统后可以调出安全模式。

5、在 sh# 下输入  grub  回车;

6、在 grub> 下输入  root (hd1,0)  回车;(注:因Linux系统安装在第二块盘(sdb1)上,对应的是 (hd1, 0) )

7、在 grub> 下输入  setup (hd0)  回车。 (这里的hd0是引导分区(即MBR)所在的盘,若引导在第二块硬盘的话,这里就是hd1);

8、若一切顺利的话,会在最后两行出现以下信息,这表示启动菜单恢复成功了!

......

grub/menu.lst"... succeeded

Done.

9、grub> quit

10、在 sh# 下输入 reboot 回车;

11、让系统进入到Linux,切换到root用户,vi /etc/grub.conf,将title Other中的 rootnoverify (hd0, 1) 改成 rootnoverify (hd0, 0) ,保存后退出;

12、重启系统到启动菜单,这时选Other(即Win7)就能正常进入到Win7系统了。

=======================

安装grub时的提示信息:

livecd conf.d # grub

Probing devices to guess BIOS drives. This may take a long time.

grub> root (hd1,0)

Filesystem type is ext2fs, partition type 0xfd

grub> setup (hd0)

Checking if "/boot/grub/stage1" exists... yes

Checking if "/boot/grub/stage2" exists... yes

Checking if "/boot/grub/e2fs_stage1_5" exists... yes

Running "embed /boot/grub/e2fs_stage1_5 (hd0)"...  16 sectors are embedded.

succeeded

Running "install /boot/grub/stage1 (hd0) (hd0)1+16 p (hd0,0)/boot/grub/stage2 /boot/

grub/menu.lst"... succeeded

Done.

grub> quit

sh# reboot

注:机箱内灰尘会产生静电,灰尘过多往往会导致系统或硬件故障,所以保持机房整洁、及时对机箱除尘是必要的。

本文标签: 工作站系统安装双系统启动菜单Linux