Thursday, July 27, 2017

Centos 7 trouble with Grub and dual booting Windows 7

Just installed Centos 7 and realized Windows is not in the boot menu. Searching turns up a lot of advice saying to edit this file
/etc/grub.d/40_custom
and to add some code, and then run this
grub2-mkconfig --output=/boot/grub2/grub.cfg
In my case this does not help. The Windows installation is still not detected even though I can see it on fdisk -l and have triple checked all of the commands and partition numbers. But the utility Grub Customizer is able to see the Windows partition!

 When trying to make the list I got an error about no such file, to fix this I clicked

File > Change Environment

and then changed the references to fedora to centos (confirmed via console).

 In summary :

 - for some reason sometimes grub2-mkconfig can't see Windows

 - but if you install Grub Customizer it can

 - if it gives you an error make sure the paths are right in File > Change Environment

NOTE : if you get the error and have to fix the file paths be sure to click check box Save Configuration, restart Grub Customizer, then try again
//]]>