出于熟悉服务器系统,最近装了个centos7.2,但是装完,发现它会覆盖ubuntu的启动引导,变成centos的启动引导了,而且由于win7系统安装的磁盘格式为NTFS,centos系统本身无法识别NTFS的系统的,所以重启打开的centos引导界面就只有Ubuntu+centos两个系统。
这里通过修改centos的grub配置文件,添加win7启动项,下面是步骤:
1。sudo vi /etc/grub.d/40_custom (用vim打开这个文件,进行修改)
修改后为:
# This file provides an easy way to add custom menu entries. ......(自带的解析性语句)
# menu entries you want to add after this comment. .....(同上)
# the 'exec tail' line above
menuentry 'Windows7'{
set root=(hd0,1)
chainloader +1
}
2。grub2-mkconfig -o /boot/grub2/grub.cfg (修改后运行命令,重置grub2)
3。reboot (重启)
好了,重启后就可以看到有一个windows7 的启动项了,选择就可以进入到win7系统。
这样就实现了 WIN7+Ubuntu+Centos三系统的随意使用。
这里通过修改centos的grub配置文件,添加win7启动项,下面是步骤:
1。sudo vi /etc/grub.d/40_custom (用vim打开这个文件,进行修改)
修改后为:
# This file provides an easy way to add custom menu entries. ......(自带的解析性语句)
# menu entries you want to add after this comment. .....(同上)
# the 'exec tail' line above
menuentry 'Windows7'{
set root=(hd0,1)
chainloader +1
}
2。grub2-mkconfig -o /boot/grub2/grub.cfg (修改后运行命令,重置grub2)
3。reboot (重启)
好了,重启后就可以看到有一个windows7 的启动项了,选择就可以进入到win7系统。
这样就实现了 WIN7+Ubuntu+Centos三系统的随意使用。