Can't boot Windows using grub2

Hi everyone!

I work on Suse 12.3 with KDE 4.10.3.

I have Suse and Windows (7) installed on two different (physical) hard disk, and I want to have double boot.
I tried to use grub2 in order to do so, and while I have no problem in accessing the grub menu at the beginning of each session, I can’t find a way to boot windows.
When I select the entry windows from the grub menu I receive an error message telling me that the “hd0,3” (or any other hd I tried to enter in the configuration file of grub2, is not existent.

Here is the configuration file that I saved in the /etc/grub.d directory, named 15_windows

#! /bin/sh -e
echo “Adding Windows” >&2
cat << EOF
menuentry “Windows” {
set root=(hd0,2)
chainloader (hd0,2) +1
}
EOF

And (I think may be of interest) the output of fdisk -l :

Disk /dev/sda: 250.1 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders, total 488397168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x0bc85b25

Device Boot Start End Blocks Id System
/dev/sda1 * 2048 1640447 819200 7 HPFS/NTFS/exFAT
/dev/sda2 1640448 219627519 108993536 7 HPFS/NTFS/exFAT
/dev/sda3 219627520 465387519 122880000 f W95 Ext’d (LBA)
/dev/sda4 465387520 488394751 11503616 7 HPFS/NTFS/exFAT
/dev/sda5 219629568 465387519 122878976 7 HPFS/NTFS/exFAT

WARNING: GPT (GUID Partition Table) detected on ‘/dev/sdb’! The util fdisk doesn’t support GPT. Use GNU Parted.

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders, total 1953525168 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

Device Boot Start End Blocks Id System
/dev/sdb1 1 1953525167 976762583+ ee GPT

Windows is installed on /dev/sda2.

Can anyone give me a tip ?

Thank you in advance

Alain

I have a grub 2 bash script that can help you can find here:

GNU Grub2 Command Listing Helper with --help & Input - Blogs - openSUSE Forums

When a Windows menu does not or is not created, my bash script will do it for you. Make sure to read all of the blog as I have a Copy of the YaST / System / Boot Loader screen. There is a check block for “Probe Foreign OS” must be checked or Windows will not get added for you.

Thank You,

I’ll give it a try!
Thank you for the fast reponse. I’ll keep you upadate if this fix my problem.
Alain

Please do not hesitate to ask for more help if it is needed.

Thank You,

Hi jdmcdaniel3!

You’re script look great, and indeed it eased my many tests, but actually did not work for me.

The option named “Create Custom Windows Boot Menu (Not for GPT/EFI)” give me a message which says “BIOS Mode Windows Booting is not supported in GRUB2-EFI!”, so I suppose I have grub2-efi and the script is not able to automatically scan the disk and generate a boot.
Nonetheless I used your script to change the entry in the “set root=()” part of my custom script for windows booting.
I think I can’t really find out how to “call” the hard disk or the partition where my windows is installed, I tried with various notations as “set root=(hd x,y)” with x and y varying, but every time, when I perform the upadate of the grub.cfg, when it comes to the windows file, I see the message
“Generating grub.cfg …
Found linux image: /boot/vmlinuz-3.7.10-1.16-desktop
Found initrd image: /boot/initrd-3.7.10-1.16-desktop
Found linux image: /boot/vmlinuz-3.7.10-1.1-desktop
Found initrd image: /boot/initrd-3.7.10-1.1-desktop
Adding Windows
No volume groups found
done”
That suggests me that grub2 can’t find the disk (or better that I’m not able to point out to grub 2 the correct disk).

Any other suggestion ?

Thank again for your time

Alain

In such a case were Windows is an efi boot, you must select Windows to boot from your PC UEFI boot and unable to make it work from grub2. I am not am expert on efi booting. I have my laptop setup as MBR dual booting with Windows. Unless the hard drive is larger than 2.2 TB, there is no reason to use a GPT formatted disk unless the disk is large, but conversion is a pain as you must reload Windows. That means you need an external Windows boot disk. In my case I called Dell and they sent a Bootable Windows 8 Thumb Drive that used the number on the bottom of the machine like a champ and was upgradable to version 8.1. My laptop came with a 128 GB SSD and it was GPT formatted and in secure boot. I reloaded to a new 480 GB SSD I purchased in MBR mode and not secure boot. It now dual boots from Windows 8.1 and openSUSE 12.3 for now. Anyway, just something to consider.

Thank You,