I'm in the process of setting up a fairly new rig (Built Aug. '12). I want to have a dual-boot setup with Windows 7 & Funtoo, both x64, using UEFI with GPT partition table. I don't HAVE to have it setup on GPT, as the drive the OSs will be booting from is only a 128GB SSD. However, given the number of partitions I need and the fact I want to disable the Compatibility Support Module in motherboard, I'd really prefer to go this route. I've had Windows 7 UEFI running fine, after some initial hiccups, for the past few months so I know how to get things setup in that department. However, I've only installed dual-boot like this in the past on MBR. So I have a few questions I hope the community can help me out with.
1) Should I just follow the GUID Booting Guide (http://www.funtoo.org/wiki/GUID_Booting_Guide) and modify the partition table and insert a 30GB partition for Win7? Or does Windows require an additional EFI partition as well (for the Windows Bootloader)? If Windows does require an EFI partition, can Windows & *nix share the same EFI partition? I know when Windows goes through it's installation process during an UEFI setup it handles booting differently, as I have to make "Windows Bootloader" or whatever it's called the first boot device in the BIOS(UEFI now?). So essentially my first question is, what's the proper way to partition the drive when dual-booting Win7 & Funtoo with UEFI+GPT?
2) Do I even need to install a bootloader like GRUB2 at all? I've read some places, but can't find a lot of info on it, that with more recent kernels you can enable "EFI Support", which in utterly nontechnical terms makes the kernel self-bootable, or adds an EFI.img to the EFI partition so the kernel can be loaded? Or is it just a safer bet to stick with GRUB2?
I had some more questions but I can't think of them right now. I'm going to go get some coffee and start fiddling around with this rig and I'm sure they'll come to me again. But any help qould be greatly appreciated in getting this puppy up and running.
1. Do not use the GUID Booting Guide. That guide was intended mainly to get Funtoo booting on a GPT partition table using a non-(U)EFI firmware (which is why it calls for a BIOS boot partition). The documentation for (U)EFI + GPT is still largely in tickets where it's being worked on but I'd be happy to help you out with it. I may write formal documentation soon but I've been really busy with work. Regarding the EFI system partition, while you can technically create many partitions with the EFI system partition type code (EF00?), there is only one in use at any one time and generally you're better off just creating one EFI system partition at the beginning of the disk and everything will use that. If you were to be booting Linux on a Mac, for example, both Mac OS X and Linux would all be using the same EFI system partition. I believe GRUB2 and Mac OS X each have different criteria as to which partition they recognize as the active EFI system partition when they're searching for it, but at the end of the day, it's the one you notify the firmware about that matters (everyone else please correct me if I'm wrong on this one).
2. You heard correctly. Somewhere in the the 3.x line of kernels (3.3 or something...?), EFI stub support was built into the Linux kernel. What this means for you is that a Linux kernel compiled with EFI stub support can be booted from directly as an EFI executable. The process of installing such a kernel involves A.) Copy it to the EFI system partition. B.) Notify the EFI firmware of the proper EFI system partition and executable you wish to run at boot using bless (in Mac OS X) or efibootmgr (in Linux). Be aware that booting directly from a Linux kernel with EFI stub support means that you can't specify kernel flags unless you configure them within the kernel ("Processor type and features" -> "Built-in kernel command line").
That said, your options for booting on (U)EFI + GPT are actually quite numerous. You can boot directly from the kernel image, or you can boot from GRUB2, or a more (U)EFI specific bootloader like rEFInd. The latter two allow you to specify kernel options with ease and rEFInd is especially easy to use even though it's not the official solution.
Last edited by kaorihinata (2013-02-27 21:42:38)