+ -
当前位置:首页 → 问答吧 → Grub引导双硬盘的XP(搞定)

Grub引导双硬盘的XP(搞定)

时间:2006-12-22

来源:互联网

昨天加了一块硬盘,现在是两块希捷的酷鱼250G的硬盘了.
新盘做的主盘...因为数据线不够长..不然就得拆硬盘换位置.....
新盘加了以后用spfdisk引导不起来了,没办法只好改用grub,但是还是只能引导Gentoo.....XP总是引导不起来,一选就跳到了grub的命令行界面.
两块硬盘四个主分区,两块硬盘上都有windows..
要修改那些地方才能正常启动啊?我试着修改过boot.ini,好像不管用

作者: txl263   发布时间: 2006-12-22

grub.conf?
你的windows在哪个分区?
这种信息还需要人提醒才提供么?

作者: zhllg   发布时间: 2006-12-22

呃 两个sata的硬盘 两个windows都在第一个分区.......

作者: txl263   发布时间: 2006-12-22

grub.conf

作者: zhllg   发布时间: 2006-12-22

grub.conf关于windows的部分没有修改,就是默认的...

作者: txl263   发布时间: 2006-12-22

title=windowsXP
rootnoverify (hd0,0)
makeactive
chainloader +1

作者: txl263   发布时间: 2006-12-22

你没试过改成
rootnoverify (hd1,0)?

作者: zhllg   发布时间: 2006-12-22

因为有两个windows要引导 所以我又添加了一个条目 就是rootnoverify (hd1,0) 但是两个都起不来...

作者: txl263   发布时间: 2006-12-22

还有那个boot.ini要不要改呢?
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /noexecute=optin /fastdetect
我用ghost做的,是不是需要把rdisk(0)改成1?

作者: txl263   发布时间: 2006-12-22

在网上找到些资料
您可以用grub的map来指令来操作把两块硬盘的序列对调,这样就不用在BIOS中设置了;在menu.lst中加如下的内容,比如下面的;


title WinXp
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd0,0)
chainloader +1
makeactive

貌似这样就不用改 rootnoverify (hd0,0) 和boot.ini了吧.....需要回家试验一下

还有
如果有多个Windows 系统,怎么才能引导出来呢?应该用hide 和unhide指令操作;比如我们安装了两个Windows ,一个是位于(hd0,0)的windows 98 ,另一个是安装的是位于(hd0,1)的WindowsXP;这时我们就要用到hide指令了;


title Win98
unhide (hd0,0)
hide (hd0,1)
rootnoverify (hd0,0)
chainloader +1
makeactive
title WinXP
unhide (hd0,1)
hide (hd0,0)
rootnoverify (hd0,1)
chainloader +1
makeactive

作者: txl263   发布时间: 2006-12-22

搞定了,按照上面的方法:2cool

作者: txl263   发布时间: 2006-12-24

info grub boot os dos
info里就有,敲上面的命令

作者: zhllg   发布时间: 2006-12-24

昨天晚上发疯。。把病毒感染的XP卸载重装(因为vista的looder在xp上所以vista也准备重装),结果搞丢了两个分区不说(上百G的文件啊,我哭。。)现在windows都装不上了,准备一块硬盘装windows和gentoo一块儿装vista和其他的linux。结果两块硬盘同时挂着的时候安装windows都会出错,单独挂一块硬盘分别装上windows以后,结果不能同时挂两块硬盘,不然只有一个windows能起来,看来上面的方法还是有问题啊。。。。摸索中。。。。大家有没有什么经验啊。。。用那个map的方法不行。。。

作者: txl263   发布时间: 2007-01-21

系统引导管理器GRUB学习笔记中
http://www.linuxsir.org/main/?q=node/130
是这么写的
代码:
default=0
timeout=3
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title Red Hat Linux (2.4.18-14)
root (hd0,0)
kernel /boot/vmlinuz-2.4.18-14 ro root=LABEL=/
initrd /boot/initrd-2.4.18-14.img
title Microsoft Windows XP
map (hd0) (hd1)
map (hd1) (hd0)
root (hd1,0)
chainloader (hd1,0)+1
makeactive
boot
红色的root (hd1,0)是我的所没有的。。不知道是不是这里的问题,试一下再回来。。

作者: txl263   发布时间: 2007-01-21

我的grub
代码:
default 0
timeout 30
splashimage=(hd1,1)/boot/grub/splash.xpm.gz


# For booting GNU/Linux map
title GentooLinux-2.6.19-gentoo-r1
root (hd1,1)
kernel /boot/vmlinuz-2.6.19-gentoo-r1 root=/dev/sdb2 real_root=/dev/sdb2 vga=791 s
plash=silent CONSOLE=/dev/tty1
#initrd /initrd.img
#initrd /boot/splash-livecd-2005.1-1024x768

# For booting Windows NT or Windows95
title Windows XP
map (hd0) (hd1)
map (hd1) (hd0)
rootnoverify (hd1,0)
makeactive
chainloader +1
# For loading DOS if Windows NT is installed

title Windows VISTA
rootnoverify (hd0,0)
makeactive
chainloader +1
# For loading DOS if Windows NT is installed
终于都能正常启动了。。。。这次算是真正搞定了。。。一夜没睡了。。。睡觉去

作者: txl263   发布时间: 2007-01-21