in centos

How to Dual Boot CentOS 7 and Windows

1 Star2 Stars3 Stars4 Stars5 Stars (7 votes, average: 4.14 out of 5)

After centos installation you will NOT see Windows 7 in the GRUB2 menu the first time you reboot CentOS 7. The reason why it has not been added yet is because CentOS does not have the drivers needed to detect NTFS partitions and thus add them to the GRUB2 menu list during the OS probe step. We will manually rectify this, and it is indeed an important step in this dual-boot guide.


There are two ways you can resolve the issue. One, you can add a manual chainload entry to the 40_custom GRUB script under /etc/grub.d, and then update the GRUB2 menu using the following command:

nano /boot/grub2/grub.cfg

The content you actually need to add to the 40_custom script BEFORE you update the menu is as follows:

menuentry "Windows 7" {
set root='(hd0,1)'
chainloader +1

Do pay attention to the disk and partition number. And remember that GRUB2 enumerates disks starting with zero, but partitions starting with 1. Therefore, if you have Windows installed on the first partition of your first disk, you will use (hd0,1) and not (hd0,0) like you would back in the GRUB legacy days.

sudo fdisk -l

if windows is in /dev/sda2 so put (hd0,1)

Related Posts

Written By:

Blog for everything about hosting, website, server and technical support

Add a Comment

Your email address will not be published. Required fields are marked *

This site uses Akismet to reduce spam. Learn how your comment data is processed.