Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

Im very new with this dual booting stuff. But I just installed Ubuntu 12.04.3 lts onto an un allocated 150gb space that I shrank from my D: drive. When I boot the computer up it goes into the Ubuntu menu and lets me select:

Ubuntu Generic, Ubuntu recovery, previous versions of linux, Windows 8 recovery, Windows 8 (loader)

When I select Windows 8 (loader) and Windows 8 recovery selection it gives me an error " ERROR CANNOT LOCATE DRIVE MAP" and after pressing the ENTER key it goes back to the menu with all the options to choose from.

My friend said that I should just use boot-repair from the terminal and just repair it there... but he has let me down in the past so I just want to make sure that would actually help out more than do harm. It would be greatly appreciated if someone could help me out!

Boot-repair http://paste.ubuntu.com/6190163/

I have a ASUS K55N preloaded with Windows 8 and F2 is BIOS

When I disable "secure boot" from the BIOS UBUNTU will not load, but when I enable "secure boot" it boots Ubuntu right up.

share|improve this question
    
Can you boot Ubuntu from the grub menu? Can you boot Windows from the EFI menu (Hold down a function key to select OS or device to boot)? –  ubfan1 Oct 4 '13 at 0:34
    
When I select UBUNTU from the GRUB menu it says Binary is Whitelisted and boots up. I cannot boot Windows 8 or Windows 8 Recovery from the Grub menu when I try that option it gives me an ERROR "map drive". When I go into BIOS and switch the boot order then Windows will load up perfectly fine. –  Nathaniel Reyes Oct 4 '13 at 1:29

1 Answer 1

You have a successful install on a secure boot UEFI system. Things remaining to fix are:

  1. Make the EFI partition (sda1) the bootable one instead of sda7. Although things seem to work anyway much to my surprise. Use gparted or fdisk to remove the boot flag from sda7 and add it to sda1.
  2. Fix the Windows chainloader command, it should not be chainloader +1 anymore but something like the below (You MUST use the uuid on your efi partition, which I think I got). Replace the chainloader +1 line.

    search --fs-uuid --no-floppy --set=root 02D1-4312 chainloader (${root})/EFI/Microsoft/Boot/bootmgfw.efi

Edit the grub.cfg file (change permissions if necessary to make it writable (chmod +w grub.cfg) and replace one of the chainloader +1 lines with the above. You can then change the permissions back with chmod -w grub.cfg boot-repair can do this for you, but if you run it, select what it does rather than a blanket set of mostly unnecessary changes (in your case). NOTE, even with the correct chainloader command, some windows machines will still not boot, complaining of cannot load image and giving an error message (bug 1091464). In that case, you will always have to boot windows through the efi menu (until the bug is f

  1. Fix the /etc/grub.d files which build the grub.cfg file (which you could manually edit, but you really don't want to edit it each time you update a kernel). Again, boot-repair can fix this for you.

For the most part, boot-repair is the fix recommended because there are so many odd situations with different machines. Just use it selectively, and you should be OK. Things it does which you do not need would be the renaming of the bootloaders (to fool bad UEFI implementations which only boot files with the windows bootloader name).

You should have a function key which gives you the boot selection, so you should not have to go into the BIOS setup each time.

share|improve this answer
    
I am terribly sorry to ask this and I apologize in advance since I am new with Lunix and am very interested in Linux, but in order to make the sda1 the bootable instead of the sda7 how would you go about doing this and how would you go about changing the chainloader? I looked into Gparted and I clicked on information over the /dev/sda1, it is a fat32 file system, mount point /boot/efi and is 300Mb in size and 34.97 MBs used already it said that UUID is already 02D1-4312 as you said in your post above. –  Nathaniel Reyes Oct 4 '13 at 3:06
    
With UEFI all systems boot from the efi partition. Each system has its own folder in the efi partition with its boot files. YOu can copy ubfan1 chainload entry into 40_custom. Or Boot-Repair can create similar entries in 25_custom. Bug on wrong (BIOS) style boot entries. bugs.launchpad.net/ubuntu/+source/grub2/+bug/1024383 –  oldfred Oct 4 '13 at 3:57
    
Well the issue with that is when I turn off SECURE BOOT it won't UBUNTU from the GRUB menu, only when SECURE BOOT is enabled does it boot from the GRUB. When I go into the BIOS and switch boot order for Windows it loads up with or without SECURE BOOT. I have updated the Legacy Grub to Grub 1.99ubuntu3.10. So I am thinking is there isn't a real way unless going to the BIOS each time and switching the OS from there. :/ –  Nathaniel Reyes Oct 4 '13 at 13:02
    
Thanks both of you for the advice, I upgraded my legacy GRUB menu things for some reason started working a little smoother, and editing the chain loader things went perfectly fine. Again THANKS A BUNCH! –  Nathaniel Reyes Oct 5 '13 at 15:42

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.