免费注册 查看新帖 |

Chinaunix

  平台 论坛 博客 文库
最近访问板块 发新帖
查看: 2266 | 回复: 9
打印 上一主题 下一主题

双硬盘双系统启动问题 [复制链接]

论坛徽章:
0
跳转到指定楼层
1 [收藏(0)] [报告]
发表于 2009-07-17 00:12 |只看该作者 |倒序浏览
大家好!
   我有两个硬盘,一个是IDE,另一个是SATA的,我在IDE硬盘上装了RHEL5,串口的硬盘装了windows xp,在bios下设置IDE或串口为第1启动盘时,两个系统都可以启动。但是这样太麻烦了,是否可以不用在bios里设置启动盘,用grub来引导(装在IDE硬盘的第一个分区上),让我选择启动任意的一个系统呢?下面是我修改过的grub.conf,但在选择xp启动里出错,恳请知道的各位网友帮忙看一下哪出错了。

......
//下面是我自己加的
title windows xp
       root(hd1,0)
       makeactive
       chainloader +1
......

论坛徽章:
0
2 [报告]
发表于 2009-07-17 09:45 |只看该作者

串口硬盘

串口硬盘应该是SD

论坛徽章:
0
3 [报告]
发表于 2009-07-17 09:59 |只看该作者
title windows xp

  rootnoverify (sd0,0)

  chainloader +1

论坛徽章:
0
4 [报告]
发表于 2009-07-17 10:48 |只看该作者
好像执行grub-setup还是grub-install,grub会自动识别安装到的系统的,规则不用自己写

论坛徽章:
0
5 [报告]
发表于 2009-07-17 13:39 |只看该作者
好的,谢谢大家!我试一下。

论坛徽章:
0
6 [报告]
发表于 2009-07-17 16:24 |只看该作者
就知道胡说八道的
map (hd0) (hd1)
map (hd1) (hd0)
去试试吧

论坛徽章:
0
7 [报告]
发表于 2009-07-17 19:13 |只看该作者
行了,在http://ubuntuguide.org/wiki/Ubun ... d1.2C_hd2.2C_etc.29上有解决的办法,在“1.17 Boot Menu 下的 How to boot into Windows installed on a seperate SATA drive”小节下,不过都是英文,下面是英文原文:
How to boot into Windows installed on a seperate SATA drive
Read #General Notes
Read #How to identify the name of the boot drive (hd0, hd1, hd2, etc)
This configuration applies to people who have Linux installed on a IDE drive, and Windows installed on a seperate SATA. The IDE drive boots first, so we need to add an entry to the boot menu on the Linux disk. Here we assume the name of your Windows drive is hd1. If you are not sure, click the link above to find out.

sudo cp /boot/grub/menu.lst /boot/grub/menu.lst_backup
gksudo gedit /boot/grub/menu.lst
Append the following lines at the end of file.
title           Windows XP on SATA drive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader (hd1,0)+1
Save the edited file
Finally, do
sudo update-grub
This will update the grub bootloader and finalize any changes you made

这个是ubuntu下的解决方法,不过在RHEL5下也能用。,下面说一下注意事项:
map (hd0) (hd1)  --在map、(hd0) 、(hd1)三个之间有空格,(hd0)中,“hd0”与“(”,“)”之间 不能有空格,否则会出错。
map (hd1) (hd0) --与上面的一样
chainloader (hd1,0)+1 --“+1”直接在“(hd1,0)”后面,它们之间没有空格。

在我的电脑里,hd0为IDE的硬盘,hd1为SATA的硬盘,在linux系统启动到选择菜单后按下“c”,可以进入grub,然后输入“root   (hd0,0)”,会显示出该盘的格式为ext2,说明是IDE盘(我装linux在IDE上),输入“root   (hd1,0)”,会显示出“unknow”之类的,记不清了,说明是SATA盘。

在grub下,串口硬盘与并口硬盘用统一的命名方法,即都以hd开头。在进入linux系统以后,可以用“fdisk -l”命令查看可以作为启动盘的硬盘,在“1.17 Boot Menu ”里都说得很清楚了,自己看了,呵呵。

在grub.conf下只要加入这段就可以选择从SATA盘启动了:
title           Windows XP on SATA drive
map  (hd0)  (hd1)
map (hd1)   (hd0)
chainloader   (hd1,0)+1

论坛徽章:
1
天秤座
日期:2013-10-23 13:20:42
8 [报告]
发表于 2009-07-17 20:34 |只看该作者
我就奇怪了,grub是指认到 hd(*,*)无论你是sada,pata,scsi那!
尽管linux中ide(pata)是hd,sata是sd
看来map,不错!

论坛徽章:
0
9 [报告]
发表于 2009-07-18 19:51 |只看该作者
路过,学习

论坛徽章:
0
10 [报告]
发表于 2009-07-29 11:35 |只看该作者

回复 #1 luoqindong 的帖子

方式1
在linux中重新安装grub
方式2
使用windows中的grub for dos 调用linux的grub的引导的参数
您需要登录后才可以回帖 登录 | 注册

本版积分规则 发表回复

  

北京盛拓优讯信息技术有限公司. 版权所有 京ICP备16024965号-6 北京市公安局海淀分局网监中心备案编号:11010802020122 niuxiaotong@pcpop.com 17352615567
未成年举报专区
中国互联网协会会员  联系我们:huangweiwei@itpub.net
感谢所有关心和支持过ChinaUnix的朋友们 转载本站内容请注明原作者名及出处

清除 Cookies - ChinaUnix - Archiver - WAP - TOP