On Tue, Apr 15, 2014 at 8:38 AM, Nikos Chantziaras <[email protected]> wrote:
> As an old fart with MBR hardwired into my brain, I'm not sure I understand
> how booting from a GPT partitioned disk works now.
>
> So, I had to (note: "had to", not "wanted to") install Windows 8.1 on my
> machine. I had a dual boot Gentoo/Windows7 before that. So I did a backup,
> wiped the Windows7 partition, and then ran the W8.1 install (from a USB
> flash drive.)
>
> Windows complained that it can't install into MBR partitioned disks on EFI
> systems. So I booted Gentoo again, and converted my disk to GPT (with
> sys-apps/gptfdisk.) I backed up my MBR partition table before of course
> (with dd). I wasn't sure whether I needed an EFI BIOS boot partition (ID
> ef02), so I created one just to be safe by shrinking my swap partition by
> 100MB and giving that space to a new ef02 partition. This new partition
> ended up as /dev/sda5 and I formatted it with a FAT32 filesystem.
>
> So far so good. Now what happens with grub-install? I wasn't sure whether I
> needed to do:
>
>   grub-install /dev/sda5
>
> or:
>
>   grub-install /dev/sda
>
> So I did both. Note: I'm using grub-0.97-r13 and Gentoo ships it with GPT
> support.
>
> I tested it, and it booted OK. So far so good.
>
> Now I installed Windows 8.1. It took the free space of the Windows 7
> partition I had wiped, and created a bunch of new ones, including an EFI
> boot partition (ID ef00).
>
> After that, grub didn't show up anymore. So I booted from a sysrescuecd USB
> stick into my Gentoo, and ran this again:
>
>   grub-install /dev/sda5
>   grub-install /dev/sda
>
> Now the system boots into grub again, unless I press F11 at the POST screen
> and tell my EFI firmware to load the "Windows Boot Loader" instead.
>
> I'm very, very confused by all this. The EFI boot partition (ef00) created
> by Windows is not empty; it contains the Windows EFI boot loader. The EFI
> BIOS boot partition I created myself (ef02) is still empty; grub-install
> /dev/sda5 didn't seem to put anything in it.
>
> So what the hell does grub-install do? How is my system able to boot into
> grub at all? And, most importantly, how do I boot Windows 8 from grub now?
>
>

So you have a few things going on here.

1. You are booting using EFI. grub-0.97 does not support EFI, so it
must have auto-switched to BIOS compatibility mode when you tried to
boot using GRUB.

2. It is probably not possible to load the Windows EFI loader from a
BIOS boot loader. You would need to chainload the Windows BIOS boot
sector, which probably does not exist on an EFI installation.

3. I am not sure if Gentoo's grub-0.97 actually knows about the BIOS
boot partition (ef02). I'm actually not sure where it copies the stage
1.5 loader on a GPT disk.

If you really want to use grub-0.97, I think you will need to force
BIOS compatibility mode on and install Windows in BIOS mode.

Alternatively, you could convert to GRUB 2, which supports EFI
natively and should be able to load the Windows boot loader. Note that
I have not personally set up a dual-boot system in a very long time,
and never with GRUB 2, so I cannot vouch for how this works in
practice.

Reply via email to