Windows 8 on first disk (MBR), opensuse on second disk (UEFI): how to manage

Sorry to disturb with my question, but I do not succeed anyhow I move my newbie knowledges. My opensuse 12.3 is installed in /dev/sdb in UEFI mode; Windows 8 is installed in /dev/sda in BIOS mode. In opensuse grub2 list I can see and boot every Linux OS installed in /dev/sda (Ubuntu 13.04, opensuse 13.1, LinuxMint 15, PinguyOS 13.04), but not Windows 8. What should I add in /etc/grub.d/40_custom to obtain a valid /boot/grub2/grub.cfg ? Thanks for the help.

Giorgio Cittadini

On 2013-07-09 10:16, giocitta wrote:
>
> Sorry to disturb with my question, but I do not succeed anyhow I move my
> newbie knowledges. My opensuse 12.3 is installed in /dev/sdb in UEFI
> mode; Windows 8 is installed in /dev/sda in BIOS mode. In opensuse grub2
> list I can see and boot every Linux OS installed in /dev/sda (Ubuntu
> 13.04, opensuse 13.1, LinuxMint 15, PinguyOS 13.04), but not Windows 8.
> What should I add in /etc/grub.d/40_custom to obtain a valid
> /boot/grub2/grub.cfg ? Thanks for the help.

The first question is if disk sdb is the boot disk. Ie, if grub has control.


Cheers / Saludos,

Carlos E. R.
(from 12.3 x86_64 “Dartmouth” at Telcontar)

Yes, robin_listas, thanks: sdb is the boot disk and grub has full control.

UEFI booting doesn’t work the same way, so your question is probably not relevant.

I am not sure whether this is even possible. If it is possible, it will depend on your BIOS providing legacy MBR support.

Here’s the Windows 7 entry from my MBR based system:


menuentry 'Windows 7 (loader) (on /dev/sda3)' --class windows --class os $menuentry_id_option 'osprober-chain-AC7C4EC27C4E86D4' {
        insmod part_msdos
        insmod ntfs
        set root='hd0,msdos3'
        if  x$feature_platform_search_hint = xy ]; then
          search --no-floppy --fs-uuid --set=root --hint-bios=hd0,msdos3 --hint-efi=hd0,msdos3 --hint-baremetal=ahci0,msdos3 --hint='hd0,msdos3'  AC7C4EC27C4E86D4
        else
          search --no-floppy --fs-uuid --set=root AC7C4EC27C4E86D4
        fi
        chainloader +1
}

Note that “AC7C4EC27C4E86D4” is the UUID of the Windows partition (“/dev/sda3”). And that “3” in “msdos3” might also be a reference to the partition number. You can find the UUID for your system with the command “blkid”. I suggest you omit the “os-prober” info in the menuentry line, since you won’t be getting this from os-prober.

Windows is finicky, and might not work when started from a UEFI environment. And I’m not sure whether grub2-efi will support the older non-UEFI chainloader commands. But you can experiment and see if it works.

My advice would be to experiment by directly editing into “/boot/grub2/grub.cfg”. If you come up with some lines that work, then copy those into “/etc/grub.d/40_custom”. When experimenting to see what works, it is a lot less tedious to directly edit the grub.cfg.

If you get it working, report back. This could be useful information for others. Hmm, if you can’t get it working, report that back here too.

Hi nrickert,
I repeatedly carefully (device, UUID, etc.) tried to apply your suggestions: no result as regards Windows 8, full result (in my second computer) as regards Windows 7. I agree that something strange underlies Windows 8. Anyhow, many thanks for ypur suggestions.

giocitta

Thanks for the feedback. It will help if this problem comes up again.