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.

I'm trying to dual boot Ubuntu 12.04 (or 12.10) with Windows 8 on a new Sony Vaio, but have run into some problems :)

Specifically, my problems seem to come from choosing UEFI or Legacy as the Bootmode in the BIOS.

Here is what I have found so far:

  • Windows 8 needs to boot using UEFI, and doesn't work in Legacy mode
  • Ubuntu (both 12.04 and 12.10) needs to boot using Legacy, and won't boot (at least from the live disk) in UEFI mode

I have been able to boot Ubuntu using a live USB disc, provided that I change the Bootmode to Legacy. I haven't committed to installing it yet, because I don't really understand the consequences.

My main concerns are that instead of simply selecting Windows or Ubuntu in Grub, I would also have to change my Bootmode every single time, which seems like a lot more trouble than it should be.

So, the question: how can I install Ubuntu 12.04 or 12.10 in UEFI boot mode?

share|improve this question
    
Just to check: are you sure that you are using a 64-bit installer? A quick check is if it has an "efi" folder at the root. 32-bit installers don't work with UEFI, only in legacy. –  skytreader Nov 12 '12 at 2:28
    
@skytreader thanks for your comment :) I did try both the 32 bit and 64 bit, sadly with no succeess :( So the 64-bit should work then? –  cmhughes Nov 12 '12 at 2:30

3 Answers 3

This is probably a Secure Boot issue, at least in part. (Selecting the correct EFI-mode boot option may be part of the issue, too.) On the one system I've got that can handle Secure Boot, enabling it and trying to boot from a disc that can boot in either EFI or BIOS mode, but without a valid Secure Boot signature, results in a BIOS-mode boot, even if I tell the computer to boot in EFI mode. This behavior exactly matches your description of what's happening to you. Furthermore, you say this is a new computer with Windows 8 installed, which means that it almost certainly shipped with Secure Boot active.

If I'm right, you have three options for how to proceed:

  • Disable Secure Boot in your firmware -- this is the easiest method if you're familiar with setting basic firmware options, but you'll need to track down the right one.
  • Install using a distribution that's been signed with a Secure Boot key -- Ubuntu 12.04's installer has not been so signed, AFAIK, but I suspect that Ubuntu 12.10's has been. I'm not positive of that, though. (I've not yet tested it on my Secure Boot-capable PC.) Fedora 18 is supposed to be signed, but it's not yet been released, and I'm not sure of the status of whatever pre-release version is out there.
  • Create your own Secure Boot keys, sign everything yourself, and use Secure Boot in that way. This is the hardest approach by far.

For more information on all of these approaches, see this Web page I wrote on the subject. Note that the Web page says nothing about OS installation. Most of the issues and procedures would be the same for OS installation as for anything else, but modifying files on an installation CD is trickier than modifying files on a USB flash drive, so keep that in mind when you're considering your options.


Addition: I can think of a number of reasons why you might be getting an "Operating system not found" message even when booting in EFI mode with Secure Boot disabled. I suggest you check the following:

  • Check your Secure Boot setting again. Yes, I know you said you've disabled it, but firmware settings can be tricky sometimes. It's worth double-checking.
  • Using gdisk or parted, verify that the USB drive you're using has a valid GUID Partition Table (GPT) with an EFI System Partition (ESP; identified as partition type code EF00 in gdisk, or by a "boot" flag in parted). If the disk uses an MBR partition table, a fussy firmware might reject it. Likewise if it lacks an ESP.
  • If the disk uses a hybrid optical disc/hard disk configuration (as some installation disk images do), it could be that a fussy firmware will reject it. In this case, backing it up, creating a fresh GPT on the disk with a new ESP, and restoring everything on a file-by-file basis might get it working.
  • Mount the ESP and look for a file called EFI/BOOT/bootx64.efi. (Case shouldn't matter; but see below.) This is the boot loader file. If it's absent, the disk won't boot. You'll need to figure out what happened to the file and restore it.
  • Although the FAT filesystem used on ESPs is case-insensitive, I've encountered one badly broken EFI with case sensitivity issues. Messing with the filename case might fix it, but there are a lot of possible variants.
  • Check that the ESP uses FAT32, not FAT16. Most EFIs seem to be happy with both, but the spec does say the ESP should be FAT32, and I know of one implementation that's unhappy with a FAT16 ESP.

You could also try booting something else in EFI mode. One possibility is rEFInd, which is an EFI boot loader that, if you can get it to boot, it may be able to detect and run the Ubuntu installer's boot loader. There's a CD image of rEFInd, but that really is a CD image, not a USB image. To create a USB image, you'd need to download the binary file and install it manually. Tip: There's a new install.sh script that's available here. (It's destined for the next release, but that release isn't finalized yet.) This version of the script includes a new option, --usedefault, that can be used to help create a bootable USB flash drive. You'd use it like this:

sudo ./install.sh --usedefault /dev/sdc1

This example should create an EFI-bootable USB flash drive on /dev/sdc1, provided that partition is an ESP on the USB flash drive. Note that you must partition the disk and create a FAT ESP before running install.sh.

One more possibility is to install in BIOS mode and then sort it out later. You can install rEFInd, gummiboot, or an EFI-enabled version of GRUB after installing in BIOS mode. You might need to jump through some hoops with renaming boot loaders to get things working, but if you can't get your installer to boot in EFI mode, this may be your only option.

share|improve this answer
    
+1 thanks for your answer :) the secure boot is already disabled. I can't boot Ubuntu in UEFI mode as I get the error Operating System not found –  cmhughes Nov 12 '12 at 19:04
    
Please clarify: Have you done an installation and now find that you're unable to boot from the hard disk? If so, you probably need to muck with your NVRAM's settings and/or rename your boot loaders. See rodsbooks.com/efi-bootloaders/installation.html for several suggestions (scroll to near the bottom, in the "Announcing the Boot Loader to the EFI" section). –  Rod Smith Nov 12 '12 at 23:23
    
Thanks for the follow-up. I have not done an installation yet because I have been unable to boot the live disk while in UEFI mode, and get the error Operating system not found. If I change to Legacy mode then I can boot the live disk just fine. –  cmhughes Nov 13 '12 at 1:39
    
See my additional comments above. –  Rod Smith Nov 13 '12 at 4:04
    
There are systems (including mine) which won't boot Ubuntu unless UEFI is set to legacy mode, not even with Secure Boot disabled. –  RobinJ Oct 24 '13 at 11:46
  1. Setup your BIOS to boot the CD in UEFI mode: https://help.ubuntu.com/community/UEFI#Setup_the_BIOS_in_EFI_or_Legacy_mode
  2. Install Ubuntu 64-bit
  3. Reboot the PC. If still not good, convert Ubuntu into UEFI mode: https://help.ubuntu.com/community/UEFI#Converting_Ubuntu_into_EFI_mode
share|improve this answer
    
+1 thanks for your answer :) I can't do step 1 though- as I said in the question, the live disk will not boot in UEFI mode, and gives the error: Operating system not found –  cmhughes Nov 12 '12 at 18:46
    
Then simply install Ubuntu64bit, then run Boot-Repair's Recommended Repair from a liveCD. Indicate the URL that will appear if any problem. –  LovinBuntu Nov 13 '12 at 11:53

Use the 64-bit installer. Hopefully, you are comfortable with dealing your BIOS*. You need to ensure that your DVD Drive/USB ports are considered first for bootable media before your HDD or the Windows Boot Manager. Then, you need to add the .efi found in the "efi" directory of your Ubuntu installer to your whitelist; for this, check the "Security" tab of your BIOS. You might need to set certain passwords first before you can proceed with this. After whitelisting, restart with your installer inserted (USB port, DVD Drive, wherever) and you should be able to boot from it now.

Based on my experience, though you may get to boot from your LiveCD, that may not be the end of your problems. Feel to ask around (and browse the previous questions) and good luck with dual booting!

*If not, there are plenty of howtos online. Proceed with caution though! This can get dangerous.

share|improve this answer

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.