Foreword:
Install the centOS7 system in the original Window7 system to run dual systems on the notebook. After transferring the files on the system D drive, delete the volume label, make the USB drive a CentOS7 boot disk, and perform normal installation.
Problem:
After installing CentOS7, I found that the original Windos7 system could not be entered.
Solution:
Mount the Windows 7 system disk in CentOS7 and automatically generate the system boot file through grub2.
1. Make sure CentOS7 has grub2 installed
/sbin/grub2-install /dev/sda
Restart the system.
2. Mount the Windows 7 system disk in CentOS7
Mainly install ntfs-3g, the method is:
at www.tuxera.com/community/open-source -ntfs-3g/Download the latest ntfs-3g installation package source file, unzip it and enter the folder, type ./configure, make, makeinstall commands to install ntfs-3g.
Check the disk partition and find the windows7 system disk: fdisk -l. It can be seen that sda1 is the windows7 system disk (the format is NTFS)
Mount the windows7 system disk sda1:
mount -t ntfs-3g /dev/sda1 mnt/windows/c
3. Execute
grub2 -mkconfig -o /boot/grub2/grub.cfg
under the root user. The system will automatically search for the windows7 system and automatically set the searched system to the grub.cfg file.
Related tutorial recommendations: centos tutorial
The above is the detailed content of Unable to boot the original system after installing centos7 under windows. For more information, please follow other related articles on the PHP Chinese website!