如何引导多系统(windows+其他)

由于之前经常在安装双系统时出现引导区覆盖而无法启动系统的问题,终于成功安装一次,笔记如下。

在这只记录先安装的是windows情况。后面安装的系统可以是其他系统,此处以CentOS为例。

1、先在裸机上安装一个windows系统(XP 或Win7);

2、在windows系统上安装EasyBCD,点击添加新条目->NeoGrub->添加

此时,在系统盘中会有NST\menu.lst文件,假如重启,在电脑启动界面中会出现可以选择的Grub选项。

3、安装CentOS到其他盘(最好此盘为逻辑分区),注意别把boot装错了,在最后一步选择安装到根目录\下;

4、把CentOS中/boot/grub/menu.lst拷贝出来,粘贴到Windows下的\NST\menu.lst的后面;

由于在安装Windows后再安装的CentOS,CentOS的引导安装在其他盘,此时无法直接启动CentOS,可以利用一下方法启动:

重启---------选择Grub,

在grub下输入指令

grub> root (hd1,5)     

用来指定/boot所在的分区,(hd1,5)为你CentOS安装的盘在Windows系统下的编号,假如不知道可以一个个试。(比如CentOS下会提示FileSystem type is ext2fs, partition type 0x83)

grub> kernel (hd1,5)/boot/vmlinuz-2.6.32-431.el6.i686 ro root=/dev/sda6 quiet

用来指定linux的内核及根目录"/"所在的分区此处的sda6为CentOS安装的盘在CentOS系统下的编号,也就是在安装CentOS时给硬盘分区时的编号。

grub> initrd (hd1,5)/boot/initramfs-2.6.32-431.el6.i686.img
用来指定initrd文件。

grub> boot

用来引导系统。

进入CentOS以后,把/boot/grub/grub.conf(或者/etc/grub.conf)拷贝出来;再次进入windows系统,在EasyBCD中,点击添加新条目---NeoGrub---配置,粘贴从linux下拷贝的menu.lst内容。

5、重启系统即可。


备注:

CentOS下的menu.lst文件的原始内容为:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You do not have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /, eg.
#          root (hd2,5)
#          kernel /boot/vmlinuz-version ro root=/dev/sda6
#          initrd /boot/initrd-[generic-]version.img
#boot=/dev/sda6
default=0
timeout=5
splashimage=(hd2,5)/boot/grub/splash.xpm.gz
hiddenmenu
title CentOS (2.6.32-431.el6.i686)
	root (hd2,5)
	kernel /boot/vmlinuz-2.6.32-431.el6.i686 ro root=UUID=7482efc1-7e35-4a09-a3b7-64256ce7aee2 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
	initrd /boot/initramfs-2.6.32-431.el6.i686.img
title Other
	rootnoverify (hd2,0)
	chainloader +1
(hd2,5)为安装盘在Centos下的表示。

把在CentOS下的盘符修改成在Windows下的盘符后menu.lst为:

title CentOS (2.6.32-431.el6.i686)
root (hd1,5)
kernel (hd1,5)/boot/vmlinuz-2.6.32-431.el6.i686 ro root=UUID=7482efc1-7e35-4a09-a3b7-64256ce7aee2 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd (hd1,5)/boot/initramfs-2.6.32-431.el6.i686.img

为简单起见,修改后的menu.lst也可为:
title CentOS 
root (hd1,5)
kernel (hd1,5)/boot/vmlinuz-2.6.32-431.el6.i686 ro root=/dev/sda6 quite
initrd (hd1,5)/boot/initramfs-2.6.32-431.el6.i686.img

最终在Windows下的的menu.lst为:
# NeoSmart NeoGrub Bootloader Configuration File
#
# This is the NeoGrub configuration file, and should be located at C:\NST\menu.lst
# Please see the EasyBCD Documentation for information on how to create/modify entries:
# http://neosmart.net/wiki/display/EBCD/

title CentOS (2.6.32-431.el6.i686)
root (hd1,5)
kernel (hd1,5)/boot/vmlinuz-2.6.32-431.el6.i686 ro root=UUID=7482efc1-7e35-4a09-a3b7-64256ce7aee2 rd_NO_LUKS rd_NO_LVM LANG=en_US.UTF-8 rd_NO_MD SYSFONT=latarcyrheb-sun16 crashkernel=auto  KEYBOARDTYPE=pc KEYTABLE=us rd_NO_DM rhgb quiet
initrd (hd1,5)/boot/initramfs-2.6.32-431.el6.i686.img

title CentOS 
root (hd1,5)
kernel (hd1,5)/boot/vmlinuz-2.6.32-431.el6.i686 ro root=/dev/sda6 quite
initrd (hd1,5)/boot/initramfs-2.6.32-431.el6.i686.img


详细介绍参考:http://www.iteedu.com/os/grub/grubdiary/10.php

  • 1
    点赞
  • 2
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值