Ubuntu: Grub does not show a Windows 8 option after dual boot



Question:

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!

Lastly, I ran sudo fdisk -l and it gave me this:

WARNING: GPT (GUID Partition Table) detected on '/dev/sda'! The util fdisk doesn't support GPT. Use GNU Parted.      Disk /dev/sda: 750.2 GB, 750156374016 bytes  255 heads, 63 sectors/track, 91201 cylinders, total 1465149168 sectors  Units = sectors of 1 * 512 = 512 bytes  Sector size (logical/physical): 512 bytes / 4096 bytes  I/O size (minimum/optimal): 4096 bytes / 4096 bytes  Disk identifier: 0x6396389f       Device Boot      Start         End      Blocks   Id  System  /dev/sda1               1  1465149167   732574583+  ee  GPT  Partition 1 does not start on physical sector boundary.  

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?


Solution:1

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:

menuentry "Windows 8" {      set root='(hd0,gpt1)'      chainloader /EFI/microsoft/BOOT/bootmgfw.efi  }  

The details might depend on your installation, though.

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.


Solution:2

Boot into Ubuntu using CD,
Choose "Try Ubuntu",
Connect to internet,
Open up a terminal window using Ctrl-Alt-t and then run: boot-repair

If boot-repair is not found, then install it :

sudo add-apt-repository ppa:yannubuntu/boot-repair &&  sudo apt-get update &&  sudo apt-get install -y boot-repair &&  boot-repair  

Click Recommended Repair. Write on a paper the new URL that will appear. Reboot the pc, you should get a GRUB menu with access to both Ubuntu and Windows. If any problem, indicate the new URL.


Solution:3

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.


Solution:4

Try running sudo update-grub. This should hopefully recognize Windows 8 automatically and add it to the GRUB and reconfigure the menu.

If that fails, please share your /etc/default/grub file here, we'll have a look.


Solution:5

Try making a file called /etc/grub.d/30_windows that contains this:

  #! /bin/bash  cat << EOF  menuentry "Windows 8" {      insmod part_gpt      insmod chain      set root='(hd0,gpt1)'      chainloader /EFI/Microsoft/Boot/bootmgfw.efi  }  EOF  
Then run sudo update-grub and reboot.

Full tutorial


Solution:6

  1. Please download super Grub and follow its directions. I never leave home without it. Very helpful when the grub menu does not show up.

  2. You'll have to load to a cd and boot it up. Just follow the instructions that come with it.

  3. It can also be used to fix windows as well. Since you can only boot into windows 8 you want to pick the linux fix.

Play around with this but do read over the instructions. You'll feel like an expert after a while. RS


Solution:7

My Ultimate Workaround

(*Because Tom's didn't work and NikTh's link is too complicated. But hey, thanks for bothering!)

Install rEFInd.


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.


Note:If u also have question or solution just comment us below or mail us on toontricks1994@gmail.com
Previous
Next Post »