1 |
As an old fart with MBR hardwired into my brain, I'm not sure I |
2 |
understand how booting from a GPT partitioned disk works now. |
3 |
|
4 |
So, I had to (note: "had to", not "wanted to") install Windows 8.1 on my |
5 |
machine. I had a dual boot Gentoo/Windows7 before that. So I did a |
6 |
backup, wiped the Windows7 partition, and then ran the W8.1 install |
7 |
(from a USB flash drive.) |
8 |
|
9 |
Windows complained that it can't install into MBR partitioned disks on |
10 |
EFI systems. So I booted Gentoo again, and converted my disk to GPT |
11 |
(with sys-apps/gptfdisk.) I backed up my MBR partition table before of |
12 |
course (with dd). I wasn't sure whether I needed an EFI BIOS boot |
13 |
partition (ID ef02), so I created one just to be safe by shrinking my |
14 |
swap partition by 100MB and giving that space to a new ef02 partition. |
15 |
This new partition ended up as /dev/sda5 and I formatted it with a FAT32 |
16 |
filesystem. |
17 |
|
18 |
So far so good. Now what happens with grub-install? I wasn't sure |
19 |
whether I needed to do: |
20 |
|
21 |
grub-install /dev/sda5 |
22 |
|
23 |
or: |
24 |
|
25 |
grub-install /dev/sda |
26 |
|
27 |
So I did both. Note: I'm using grub-0.97-r13 and Gentoo ships it with |
28 |
GPT support. |
29 |
|
30 |
I tested it, and it booted OK. So far so good. |
31 |
|
32 |
Now I installed Windows 8.1. It took the free space of the Windows 7 |
33 |
partition I had wiped, and created a bunch of new ones, including an EFI |
34 |
boot partition (ID ef00). |
35 |
|
36 |
After that, grub didn't show up anymore. So I booted from a sysrescuecd |
37 |
USB stick into my Gentoo, and ran this again: |
38 |
|
39 |
grub-install /dev/sda5 |
40 |
grub-install /dev/sda |
41 |
|
42 |
Now the system boots into grub again, unless I press F11 at the POST |
43 |
screen and tell my EFI firmware to load the "Windows Boot Loader" instead. |
44 |
|
45 |
I'm very, very confused by all this. The EFI boot partition (ef00) |
46 |
created by Windows is not empty; it contains the Windows EFI boot |
47 |
loader. The EFI BIOS boot partition I created myself (ef02) is still |
48 |
empty; grub-install /dev/sda5 didn't seem to put anything in it. |
49 |
|
50 |
So what the hell does grub-install do? How is my system able to boot |
51 |
into grub at all? And, most importantly, how do I boot Windows 8 from |
52 |
grub now? |