以前装双系统只要先装Windows7,然后再装Centos7的话,grub会自动添加原有的Windows7系统。不过在新的Centos7中需要手动修改、
步骤如下
$ sudo vi /etc/grub.d/40_custom #!/bin/sh
exec tail -n + $
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
menuentry 'Windows7'{
set root=(hd0,)
chainloader +
} $ grub2-mkconfig -o /boot/grub2/grub.cfg
$ reboot