下载vfloppy,grub
for dos
1.使用vfloppy制作虚拟软盘,c:根目录下会自动创建一个boot文件夹
2.将grub拷到c:根目录,把grub下boot文件夹中grub文件夹拷到c:/boot下
3.修改c:/boot/grub中的menu.lst
# This is a sample menu.lst file. You should make some changes to it.
# Added items for installing GRUB [ which is on your DOS drive C: ] to MBR
color black/cyan yellow/cyan
timeout 60
default 0
title FC4
root (hd0,x)
kernel /boot/vmlinuz-2.6.12-1.1398_FC4 root=/dev/hdaz
initrd (hd0,x)/boot/initrd-2.6.12-1.1398_FC4.img
(hd0,x)是linux所在的分区,hdaz:z=x+1.
vmlinuz-2.6.12-1.1398_FC4,initrd-2.6.12-1.1398_FC4.img是linux 中./boot的文件,如果是fc其他版本,可以用explore2fs看看文件的名字
4.重起电脑,用虚拟软盘进入dos。在C:/grub下运行grub。OK
5.在linux下运行grub, root(hd0,x)
setup(hd0)
注意这里setup (hd0), 千万setup (hd0,0),不然就没办法引导windows了
如果运行完grub,出现不能进入windows, 修改/etc/grub.conf
title others
root (hd0,0) /假设你的windows装在第一个驱动器的c:
chainloader +1
