Your /etc/grub.d/custom_40 file for Windows maybe as simple as:desertcat wrote: ↑2018/07/12 00:06:32Very Good!!! "Found Windows Recovery Environment (loader) on /dev/sda1" . Windows is there. The trick is getting the Windows partition to be added to the grub2 menu. I suspect if you rebooted the machine now the Windows partition will show up and all you need to do is select it and be on your merry way. If NOT... There is a very good utility that everyone IMHO should download and install called Grub Customizer To install run: yum install grub-customizer. It helps you recover from a grub2 menu that has gone out in the weeds. You run Grub Customizer and you get a preview of the menu that will come up when you reboot the machine. You should get something like this:8675309-jim wrote: ↑2018/07/11 21:27:39[root@host1 ~]# grub2-mkconfig -o /boot/grub2/grub.cfg
Generating grub configuration file ...
Found linux image: /boot/vmlinuz-3.10.0-862.6.3.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-862.6.3.el7.x86_64.img
Found linux image: /boot/vmlinuz-3.10.0-862.el7.x86_64
Found initrd image: /boot/initramfs-3.10.0-862.el7.x86_64.img
Found linux image: /boot/vmlinuz-0-rescue-43234573075840038f8e1069cd864b44
Found initrd image: /boot/initramfs-0-rescue-43234573075840038f8e1069cd864b44.img
Found Windows Recovery Environment (loader) on /dev/sda1
done
CentOS Linux Kernel 1
CentOS Linux Kernel 2
CentOS Linux Kernel 3
CentOS Linux Rescue
Windows 7 (8, 10, etc.)
This will come up during the boot and you then select "Windows" to boot into Windows or any other OS. What happens if during the boot Windows is NOT found?? OK this is where it may get a bit hairy but it is not big thing:
Under /etc/grub.d you should find a file called 40_custom this is where you would create a custom menu entry such as this:
#!/bin/sh
exec tail -n +3 $0
# This file provides an easy way to add custom menu entries. Simply type the
# menu entries you want to add after this comment. Be careful not to change
# the 'exec tail' line above.
### BEGIN /etc/grub.d/40_custom ###
if [ -f ${config_directory}/custom.cfg ]; then
source ${config_directory}/custom.cfg
elif [ -z "${config_directory}" -a -f $prefix/custom.cfg ]; then
source $prefix/custom.cfg;
fi
menuentry "Fedora 20 (3.19.8-100.fc20.x86_64)(Heisenbug)"{
# --class fedora --class gnulinux --class gnu --class os --unrestricted $menuentry_id_option 'gnulinux-3.15.10-200.fc20.x86_64-advanced-6f9e3ccb-4afc-bb29-7fa6ba2d9dbd'
set gfxpayload=text
insmod gzio
insmod part_msdos
insmod ext2
set root='hd1,msdos2'
linux /vmlinuz-3.19.8-100.fc20.x86_64 root=UUID=6f9e3ccb-c6e9-4afc-bb29-7fa6ba2d9dbd ro vconsole.font=latarcyrheb-sun16 rhgb quiet nouveau.modset=0 rd.driver.blacklist=nouveau video=vesa:off LANG=en_US.UTF-8
initrd /initramfs-3.19.8-100.fc20.x86_64.img
# chainloader +1
}
EOF
You would substitute Windows 7,8,10 or whatever for "Fedora 20". You would then save the file. After you saved the file run Grub Customizer Windows 7,8,10 should show up in the menu. Reboot the machine and select Windows from the menu.
I hate Grub2. Grub Customizer is just one of those utilities that can save your bacon.
menuentry "Windows 7" {
set root='(hd1,1)'
chainloader +1