双硬盘双系统引导问题基本解决(GRUB FOR DOS的功劳
前两天一好朋友送我一块10G的硬盘(后面叫它小大硬盘),我本计划用他来做备份盘,由于我以前80G的硬盘(后面叫它为大硬盘)分区表未能修复(强强制主分区的过错),正好使用这块小硬盘来玩lfs,于是在小硬盘上装了MAGIC LINUX 2.0正式版作为主系统,用于安装LFS,却未料到系统引导居然出现问题。装好硬盘后,BIOS中显示10G小硬盘为master主盘,80G硬盘为从盘,GRUB安装进小硬盘的MBR,在BIOS中设置主盘优先引导后正常进入linux系统,为了让GRUB也能引导大硬盘上的WINDOWS XP系统,我修改menu.lst的内容为:
# Note that you do not have to rerun grub after making changes to this file.
default=0
timeout=6
splashimage=(hd0,0)/boot/grub/splash.xpm.gz
title MagicLinux
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.3ro root=/dev/hda1 vga=791 splash=silent
initrd /boot/initrd-2.6.15.3.img
title MagicLinux (Graphics Mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.3 init 5 ro root=/dev/hda1 vga=791 splash=silent
initrd /boot/initrd-2.6.15.3.img
title MagicLinux (Console Mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.3 init 3 ro root=/dev/hda1 vga=791 splash=silent
initrd /boot/initrd-2.6.15.3.img
title MagicLinux (Single Mode)
root (hd0,0)
kernel /boot/vmlinuz-2.6.15.3 init 1 ro root=/dev/hda1 vga=791 splash=silent
initrd /boot/initrd-2.6.15.3.img
# --> Microsoft Windows XP <--
title Microsoft Windows XP
rootnoverify (hd1,0)
chainloader +1
结果是显示器一直显示出“
title Microsoft Windows XP
rootnoverify (hd1,0)
chainloader +1”
并保持不变,无错误提示
保持不变,无法正常进入WINDOWS XP系统,这样写应当是正确的啊............
不能从小硬盘引导大硬盘让我很郁闷,但总不能每次都修改CMOS进不同系统吧~~~~~~~~~我决定让尝试让大硬盘来引导小硬盘上的系统,使用GRUB FOR DOS 网上留传的GRUB FOR DOS功能简单,设置也怪麻烦,但现在的许多DOS工具箱都使用GRUB FOR DOS来进行对不同功能工具的引导,同时还多来不少系统维护的实用工具,所以我直接到WWW.51CT.CN下载了51lite DOS 工具箱,安装后windows系统c盘多了几个文件,其中有grldr,文件夹xc_dos等,boot.ini,boot.ini的内容为
timeout=10
default=multi(0)disk(0)rdisk(0)partition(1)\WINDOWS
multi(0)disk(0)rdisk(0)partition(1)\WINDOWS="Microsoft Windows XP Professional" /fastdetect /detecthal
C:\grldr="51lite DOS tools"
打开目录xc_dos里的文件xc_menu.lst(xunchi很牛,grub被修改得满彻底www.xunchi.com)进行修改,修改后内容如下:
#########
password
timeout 5
###########
default 0
fallback 1
fontfile (hd0,0)/xc_dos/fonts
###########
splashimage (hd0,0)/xc_dos/bj2008.xpm.gz
###########
************************************************************************************
title MagicLinux
root (hd1,0)
kernel /boot/vmlinuz-2.6.15.3ro root=/dev/hda1 vga=791 splash=silent
initrd /boot/initrd-2.6.15.3.img
title MagicLinux (Graphics Mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.15.3 init 5 ro root=/dev/hda1 vga=791 splash=silent
initrd /boot/initrd-2.6.15.3.img
title MagicLinux (Console Mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.15.3 init 3 ro root=/dev/hda1 vga=791 splash=silent
initrd /boot/initrd-2.6.15.3.img
title MagicLinux (Single Mode)
root (hd1,0)
kernel /boot/vmlinuz-2.6.15.3 init 1 ro root=/dev/hda1 vga=791 splash=silent
initrd /boot/initrd-2.6.15.3.img
**************************************************************************************
title 运行 Max DOS 工具盘 5.5
##
root (hd0,0)
kernel (hd0,0)/xc_dos/memdisk.gz c=60 h=4 s=36 floppy
###########
###########
initrd (hd0,0)/xc_dos/Max_dos.IMG c=60 h=4 s=36 floppy
#####
password
###
title 运行 矮人 GHOST 8.2 向导工具(矮人版,简单易用)
password
####root (hd0,0)
kernel (hd0,0)/xc_dos/memdisk.gz
###########
initrd (hd0,0)/xc_dos/ar_ghost.img
####
title 运行 GHOST 8.2 高级功能版(DOS之家版,功能强大)
password
####root (hd0,0)
kernel (hd0,0)/xc_dos/memdisk.gz
###########
initrd (hd0,0)/xc_dos/g82.IMA
#####
title 调用 从光盘启动系统
scdrom --bootcd
###########
title 返回 WINDOWS启动菜单
rootnoverify (hd0,0)
makeactive
chainloader+1
########################
自此实现了双系统的正常引导,只是有一点很奇怪,grub均把自己所在硬盘认成是hd0!!GRUB FOR DOS可以引导第二块硬盘上的操作系统,而magic linux装的GRUB却无法引导第二块硬盘上的WINDOWS XP系统,两者的版本相同,同为GRUBversion 0.95
疑惑中,不知到底是不是我写menu.lst造成的错误,烦劳知情者指点!!谢 可尝试:
1、将menu.lst文件中“# --> Microsoft Windows XP <--”这一行去掉;
2、加入:
map (hd0)(hd1)
map (hd1)(hd0).
3、也许还可以试下把rootnoverify改成root
我的menu。lst文件样例:
# grub.conf generated by MagicInstaller.
# Note that you do not have to rerun grub after making changes to this file.
default=0
timeout=3
splashimage=(hd0,1)/boot/grub/splash.xpm.gz
title MagicLinux
root (hd0,1)
kernel /boot/vmlinuz-2.6.15.3ro root=/dev/hda2 vga=791 splash=silent
initrd /boot/initrd-2.6.15.3.img
#title MagicLinux (Graphics Mode)
# root (hd0,1)
# kernel /boot/vmlinuz-2.6.15.3 init 5 ro root=/dev/hda2 vga=791 splash=silent
# initrd /boot/initrd-2.6.15.3.img
#title MagicLinux (Console Mode)
# root (hd0,1)
# kernel /boot/vmlinuz-2.6.15.3 init 3 ro root=/dev/hda1 vga=791 splash=silent
# initrd /boot/initrd-2.6.15.3.img
title MagicLinux (Single Mode)
root (hd0,1)
kernel /boot/vmlinuz-2.6.15.3 init 1 ro root=/dev/hda2 vga=791 splash=silent
initrd /boot/initrd-2.6.15.3.img
title MicroXPETool
map (hd0) (hd1)
map (hd1) (hd0)
root (hd1,0)
chainloader +1
title DOS Tool4
root (hd1,0)
kernel (hd1,0)/boot/grub/memdisk.gz
initrd (hd1,0)/boot/grub/ar4.img
title Geexbox
kernel (hd1,0)/boot/grub/memdisk.gz
initrd (hd1,0)/boot/grub/geexbox.ima 现在修改menu.lst内容如下,引导问题解决
# --> Microsoft Windows XP <--
title Microsoft Windows XP
root (hd1,0)
savedefault
makeactive
map (hd0) (hd1)
map (hd1) (hd0)
chainloader +1
查到资料,修改原因如下:
If you have installed DOS (or Windows) on a non-first hard disk, you have to use the disk swapping technique, because that OS cannot boot from any disks but the first one. The workaround used in GRUB is the command map (see map), like this:
grub> map (hd0) (hd1)
grub> map (hd1) (hd0)
就是hd0的分区变成了hd1的,而hd1的分区变成了hd0的,用map命令可以虚拟掉换两硬盘的id.
页:
[1]