Configuring Grub 2 on CentOS 7 to Dual Boot with Windows 7:
Once you install CentOS 7 alongside your Windows OS, you may find that you cannot boot into Windows. The Grub bootloader may only show your Linux OS as your only options to boot from.
To fix this and have the Grub bootloader list your Windows OS, you need to edit the Grub bootloader files.
If you have used CentOS is the past (with 6 or earlier), you may find that editing Grub is different. Previously, you would edit /boot/grub/grub.conf.
This is no longer the case, as the grub2.cfg file is generated dynamically, based on dependency files. Here’s what you need to edit to configure your bootloader.
Boot into CentOS 7.
Determine what partition your Windows OS resides on by running sudo fdisk -l in Terminal.
In this example, /dev/sda1 is the recovery partition, and /dev/sda2 is the Windows OS partition. Since partition indexes start at zero, the Windows OS partition will be `hd0,1` (a = 0, 2 = 1; or first disk, second partition) when we edit the Grub file. Make note of this.
Wikitechy Founder, Author, International Speaker, and Job Consultant. My role as the CEO of Wikitechy, I help businesses build their next generation digital platforms and help with their product innovation and growth strategy. I'm a frequent speaker at tech conferences and events.