Problem description:
When installing Centos7 on a computer Windows 7 system, the Windows 7 boot menu cannot be found after installation.
Cause analysis:
Because CentOS 7 has adopted the new grub2 system, you need to enter the /boot/grub2 directory and use vi to edit the grub.cfg file.
Solution:
Modify the Grub2 boot of Centos 7 and add the Windows startup item.
1. Open the configuration file
sudo vi /boot/grub2/grub.cfg
2. Add configuration
Find BEGIN /etc/grub.d/30_os-prober and add the following configuration
menuentry "Windows 7 (loader) (on /dev/sda1)" { insmod ntfs set root=(hd0,1) #由于我的windows安装在硬盘的C盘,故(hd0,1) chainloader +1 }
Recommended tutorial: centos tutorial
The above is the detailed content of What should I do if I cannot boot Windows 7 after installing CentOS?. For more information, please follow other related articles on the PHP Chinese website!