CentOS 7 restores Windows startup Item, centoswindows
During Linux installation, the system will automatically identify windows and add boot items. By default, CentOS does not support NTFS partitioning. CentOS7 uses Grub2, which is different from CentOS6. Manual guide windows partition modification configuration is slightly different.
1. automatically search for partitions
Many online use commands: grub2-mkconfig-o/boot/grub2/grub. cfg
But try to find no effect, because CentOS does not support NTFS partition by default, You need to first install the ntfs-3g, and then execute the above command line under the root.
However, this method is not recommended, which is a little troublesome. For details, refer:
Http://blog.csdn.net/nmgrd/article/details/51754704
Http://blog.csdn.net/txl199106/article/details/41344399/
Ii. Modify the grub. cfg file
Command Line: vim/boot/grub2/grub. cfg
Find ### BEGIN/etc/grub. d/30_os-prober ### Add a windows Startup item later:
Menuentry "Windows 7 "{
Insmod part_msdos
Insmod ntfs
Set root = 'hd0, msdos1'
Chainloader + 1
}
### END/etc/grub. d/30_os-prober ###
PS: note that there is a space in the middle of chainloader and + 1. set root = 'hd0, msdos1 'is modified according to the partition in which win7 is located. fill in the details.
Add the following content after ### END/etc/grub. d/00_header ### on the Internet:
### BEGIN /etc/grub.d/30_os-prober ###menuentry 'Windows 7 (loader) (on /dev/sda1)' --class windows --class os $menuentry_id_option 'osprober-chain-XXX' {insmod part_msdosinsmod ntfsset root='hd0,msdos1'chainloader +1}### END /etc/grub.d/30_os-prober ###