Windows7+CentOS7 启动项丢失问题解决

# PROBLEM

# 安装Win7后,再安装CentOS7,结果Win7的启动项丢失


# SOLUTION

# 编辑grub.cfg,在BEGIN /etc/grub.d/30_os-prober段加入Win7的menuentry

vi /boot/grub2/grub.cfg
\### BEGIN /etc/grub.d/30_os-prober ###
menuentry ‘Windows 7 (loader) (on /dev/sda1)’ —class windows —class os $menuentry_id_{
    insmod part_msdos
    insmod ntfs
    set root=‘hd0,msdos1’
    chainloader +1
}
\### END /etc/grub.d/30_os-prober ###

你可能感兴趣的:(centos)