Home>Article>Operation and Maintenance> What should I do if I cannot boot Windows 7 after installing CentOS?

What should I do if I cannot boot Windows 7 after installing CentOS?

王林
王林 Original
2020-04-15 11:47:57 2904browse

What should I do if I cannot boot Windows 7 after installing CentOS?

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!

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn