/etc/grub.d/40_customand to add some code, and then run this
grub2-mkconfig --output=/boot/grub2/grub.cfgIn 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