First, install the NTFS-3G plug-in
When CentOS7 is installed on a Windows system, it is found that the boot entry does not have the WINDOWS7 option, because Linux does not recognize NTFS-formatted partitions by default, and the NTFS-3G plugin is installed.
The installation method is as follows:
# yum Install ntfs-3g
Second, add the Windows boot entry
1. Type the command: (log in as root)
# Grub2-mkconfig-o/boot/grub2/grub.cfg
2. Open the View Grub2 profile to view:
# vi/boot/grub2/grub.cfg
3. Find the # # #BEGIN/etc/grub.d/30_os-prober # # #, see if there are windows7 menuentry, if not, add later:
Menuentry ' Windows 7 ' {
Insmod NTFS
Set root= (hd0,2)
Chainloader+1
}
Note: hd0 means hard disk, 2 means sda2 (C drive), my win7 is mounted on C drive.
4. Save restart
Third, modify the boot sequence
1. Set the default startup item (here, Windows 7 will match the name of the Menuentry set in the previous step)
# grub2-set-default ' Windows 7 '
2. Verify Default Items
# grub2-editenv List
Output at this time:
Saved_entry=windows 7
[Linux Small white] dual system add Windows boot and modify boot order