CentOS 7 restores Windows startup Item, centoswindows

Source: Internet
Author: User

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 ###

 

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.