So, I've successfully dual-booted my Windows 8 machine with Ubuntu 12.04 . However, I still don't have a convenient method of choosing what OS to load at boot time.

After installing Ubuntu, my computer still loads Windows 8 directly. I then added grubx64.efi to the white list of my boot loader. But after that, my machine loads Ubuntu directly without even a shadow of GRUB showing up!

I used boot-repair and I got this paste.ubuntu URL: paste.ubuntu.com/1326074. After running boot-repair (and re-white listing the grubx64.efi file), GRUB now shows up but without any Windows 8 option!

I'm guessing my problem has something to do with the warning from fdisk above but I don't know what to do with it. How do I proceed now?

Edit

My etc/default/grub is as follows:

# If you change this file, run 'update-grub' afterwards to update
# /boot/grub/grub.cfg.
# For full documentation of the options in this file, see:
# info -f grub -n 'Simple configuration'
GRUB_DEFAULT=0
#GRUB_HIDDEN_TIMEOUT=0
GRUB_HIDDEN_TIMEOUT_QUIET=true
GRUB_TIMEOUT=10
GRUB_DISTRIBUTOR=`lsb_release -i -s 2> /dev/null || echo Debian`
GRUB_CMDLINE_LINUX_DEFAULT="quiet splash"
GRUB_CMDLINE_LINUX=""
# Uncomment to enable BadRAM filtering, modify to suit your needs
# This works with Linux (no patch required) and with any kernel that obtains
# the memory map information from GRUB (GNU Mach, kernel of FreeBSD ...)
#GRUB_BADRAM="0x01234567,0xfefefefe,0x89abcdef,0xefefefef"
# Uncomment to disable graphical terminal (grub-pc only)
#GRUB_TERMINAL=console
# The resolution used on graphical terminal
# note that you can use only modes which your graphic card supports via VBE
# you can see them in real GRUB with the command `vbeinfo'
#GRUB_GFXMODE=640x480
# Uncomment if you don't want GRUB to pass "root=UUID=xxx" parameter to Linux
#GRUB_DISABLE_LINUX_UUID=true
# Uncomment to disable generation of recovery mode menu entries
#GRUB_DISABLE_RECOVERY="true"
# Uncomment to get a beep at grub start
#GRUB_INIT_TUNE="480 440 1"

Also, just for the record, this is what I followed in installing my dual-boot. The tutorial (which uses, 11.10, I must note), doesn't mention anything about this problem. Is there anything there I shouldn't have done?

7 Answers
7

First, your fdisk -l output is not a problem; that simply identifies your disk as using the GUID Partition Table (GPT) partitioning system. To view your partitions, you must instead use a GPT-enabled tool, such as gdisk or parted, rather than fdisk, which doesn't understand GPT.

Second, you may be able to get GRUB to chainload Windows by adding a suitable entry to /etc/grub.d/40_custom and then doing a sudo update-grub. An entry might look something like this:

Third, if you consider rEFInd to be ugly, you can always try another rEFInd theme or create your own, as described in the rEFInd documentation. Alternatively, if you prefer a text-mode boot loader, you can set the textonly option in refind.conf. You can achieve a similar end by switching to gummiboot.

Fourth, if rEFInd is periodically reporting errors, please write those down or take a picture of the screen with a digital camera and report them to me. (I'm rEFInd's maintainer.) Bugs can't get fixed if nobody reports them; or if they aren't bugs in rEFInd, the messages may provide clues about how to resolve the problem.

Finally, it's possible to boot Linux via rEFInd (or gummiboot) without using GRUB; you just need a different EFI boot loader. My personal preference is the Linux kernel's EFI stub loader. This is available only in 3.3.0 and later kernels, though. Since Ubuntu 12.04 ships with a 3.2.0 kernel, you'll need to either find a pre-built 3.3.0 for Ubuntu 12.04 (I've heard of such things, but I don't have any links handy) or build your own from source code. (You could also install Ubuntu 12.10, which ships with a suitable kernel, but presumably you want an LTS release, so this may not be optimal.) See the rEFInd documentation's page on booting Linux for additional details on how to set this up. You could also use ELILO or GRUB Legacy. If you simply object to the delay, you could reduce the GRUB 2 timeout value and set it to not display the menu by default.

First, wow, I didn't realize that you are the maintainer of rEFInd. Next, regarding the GRUB menuentry...I've tried that but it doesn't work. Among other shots-in-the-dark I've tried setting my ESP partition but to no avail. Even tried using one of those graphical GRUB editors (forgot the name). Lastly, regarding rEFInd, the errors it is reporting isn't critical (will edit my post to note that)---at start-up it just tells me that it can't find certain .efi's. I've no idea where they came from.
–
skytreaderNov 3 '12 at 2:29

Check for the presence of the specified file on the ESP. Also be sure that the case of the filename is correct. (It shouldn't matter, but I know of one buggy EFI where it does!) If that doesn't help, what error message (if any) does GRUB return when you try launching Windows via this entry?
–
Rod SmithNov 3 '12 at 3:14

My Ultimate Workaround

I'm accepting my own answer until someone points out a possible flaw and a fix to it or addresses my issues (which, unfortunately, just asks the question "How do I put Windows 8 in GRUB easily?").

Far from a perfect solution, using rEFInd seems like a very hack job. For one, it looks ugly (sorry rEFInd) and tells me access was denied on certain .efi's ({ext2_x64, hfs_x64, iso9660_x64, reiserfs_x64}.efi) at start-up---nothing critical though, and goes away with a button press*. And, lastly, choosing the Ubuntu efi still loads GRUB which is an entirely unnecessary step, at least since I won't bother keeping multiple kernel versions around.

In summary...

Pros: my system now more-or-less works like my pre-UEFI dual-boots. Cons: it looks ugly plus a longer boot time.

*I must note that this rEFInd was installed via install.sh at my Ubuntu partition. Previous experiences with rEFInd (set-up through Windows) didn't have this problem.

If a previous rEFInd installation via Windows doesn't yield errors about files that couldn't be found but your current installation from Linux does, then my hunch is that one of two things is going on: 1) You've got a motherboard with a case-sensitivity bug, in which case mucking with the case of files or directories may improve matters; or 2) There's something odd about your ESP (FAT16 vs. FAT32 or some minor filesystem damage, for instance). Some EFIs seem to be very fussy about the filesystems on their ESPs. Exact filenames may be helpful in narrowing down the issue.
–
Rod SmithNov 3 '12 at 3:11

Ok. My bad. It wasn't saying it can't find certain efis, just that it's access was denied on certain efis (so I take it the said efis are there, just unaccessible?). I've noted these files now though I've still no idea where they came from.
–
skytreaderNov 3 '12 at 14:20

"Access denied" is an unusual error on EFI, in my experience. AFAIK, EFI doesn't support ownership or permissions like Linux does, so it doesn't really make sense unless there were a disk read error. I have seen weird disk write errors under EFI that evaporated on the next reboot. If this problem persists, you might consider running a SMART test on your disk in case there's a hardware fault, and backup and re-write the ESP in case there's some weird filesystem damage that dosfsck can't fix. Other than that, reporting which files are giving problems might be useful.
–
Rod SmithNov 3 '12 at 18:40

1

The "access denied" message almost certainly relates to Secure Boot. Such a message occurs if rEFInd tries to load an unsigned EFI binary while in Secure Boot mode. What's puzzling about this is that you're able to launch rEFInd at all, since it's not signed itself. My hunch is you've got some sort of weird buggy half-activated Secure Boot setting in your firmware. The easiest solution at the moment is to completely disable Secure Boot, but there are others. See my Web page at rodsbooks.com/efi-bootloaders/secureboot.html for more information.
–
Rod SmithNov 12 '12 at 0:07

On my hp laptop I have to press f9 and then grub boots up, otherwise windows loads. Also there is an option to boot Windows from grub as well although I never use it. If I'm boring into Windows I just turn it on and wait for Windows. If I plan to boot ubuntu, I just press f9 as soon as I turn on.
–
geoffmccDec 31 '14 at 5:54

Both answers with /EFI/Microsoft/Boot/bootmgfw.efi would do. However I hacked like hell to get the right settings for set root='(hd0,gpt1)'. If you know it's very simple

When GRUB starts: press c
give the command ls on the prompt.
You get a list of partitions on harddisks like (hd0,gpt1) etc.
Type ls (hd0,gpt1) and try the others.
Look at the label and if it states EFI you know you've got a hit.

Warning: there could be more partitions labelled with EFI, depending how you installed Ubuntu. Try all of them.