Home>Article>Operation and Maintenance> Unable to boot windows7 after installing centos

Unable to boot windows7 after installing centos

王林
王林 Original
2020-03-18 14:26:50 2922browse

Unable to boot windows7 after installing centos

Problem:

When installing Centos7 on a computer Windows 7 system, the Windows 7 boot menu cannot be found after installation.

Reason:

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.

(Recommended tutorial:centos usage tutorial)

Solution 1:

Modify the Grub2 boot of Centos 7 and add the Windows startup item

1. sudo vi /boot/grub2/grub.cfg

2. Find

BEGIN /etc/grub.d/30_os-prober

at the back Added:

menuentry "Windows 7 (loader) (on /dev/sda1)" { insmod ntfs set root=(hd0,1) #由于我的windows安装在硬盘的C盘,故(hd0,1) chainloader +1 }

Solution 2:

The system automatically detects whether there are other systems

grub2-mkconfig -o /boot/grub2/grub.cfg

Linux can only recognize Ext3/4, fat32 format, if Windows is an NTFS format disk partition, Grub2 will not recognize it.Recommended related video tutorials:

linux video tutorial######

The above is the detailed content of Unable to boot windows7 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