Dual boot Windows 8 and Ubuntu?

4

I've installed Windows 8 on a machine (Lenovo X220 laptop) with Ubuntu 12.10 already installed on another disk.

I am guessing that Windows 8 has convinced the laptop to switch to UEFI boot (rather than the BIOS boot that was there previously) as the Lenovo splash screen on startup now no longer has the options to interrupt the boot process (for example, to choose the boot drive). Interestingly, I can interrupt the boot process and drop into the BIOS or choose a different boot drive if I restart the machine, but not from a cold boot.

Previously I had Windows 7 on one drive (mSATA SSD; listed in Linux as /dev/sdb; first preference in the BIOS for booting) and Ubuntu on the other drive (SATA HDD listed in Linux as /dev/sda). I had the Windows bootloader installed on sdb, and GRUB installed on sda, and I would choose which OS to boot by choosing the boot drive in the BIOS rather than through a bootloader menu. I can still do this (to load Linux) if I manage to get into the BIOS boot menu - GRUB is booting via the BIOS, but Windows is booting via UEFI.

So I would ultimately like to have both Linux and Windows boot by UEFI and have the option of choosing which one through a menu of some sort. How can I retrospectively get Linux booting from UEFI, and how would I get a menu happening?

askvictor

Posted 2012-11-02T01:23:22.950

Reputation: 1 450

Answers

5

Without more information, any answer will be guesswork. I recommend you boot from an emergency Linux disc, run Boot Info Script, and post a link to the RESULTS.txt file that it produces. This will provide information about your partition layout and boot loader configuration.

Contrary to what TheX wrote, Ubuntu most emphatically does support (U)EFI booting. TheX is confusing UEFI with one of its specific features, Secure Boot, which is intended to improve security. Ubuntu has supported (U)EFI for quite a while, and they're working on seamlessly booting on systems with Secure Boot enabled. They may even have incorporated such support in Ubuntu 12.10, but I'm not positive of that.


Edit:

Your system is definitely not booting either OS in EFI mode. Both your hard disks use the MBR partition table, and Windows ties the partition table type to the firmware type, with MBR being superglued to a BIOS-mode boot. You also have no EFI System Partition (ESP) or FAT partition, which are required to boot UEFI-based PCs. Thus, your suspicions about a mixed BIOS-mode/EFI-mode boot are misplaced.

My hunch is that you've accidentally changed a firmware setting -- perhaps you've enabled a "fast boot" option or changed the splash screen. This will affect how the BIOS goes through its initial tests and displays, and could make it harder to access its settings or activate its boot manager. I recommend you go into the BIOS settings and look for such options. I'm not familiar with your specific model so I can't give more specific advice on this score.

Once you've booted Ubuntu, you should be able to get it to detect your Windows configuration and add it to the GRUB menu by doing a grub-mkconfig -o /boot/grub/grub.cfg. If Windows still doesn't appear in the GRUB menu, you may need to create a manual entry for it in /etc/grub.d/40_custom; or you can use your BIOS options to select the boot device, as you've done in the past, if you can slow it down to the point that getting to those options can be done reliably.

Rod Smith

Posted 2012-11-02T01:23:22.950

Reputation: 18 427

RESULTS.txt at http://pastebin.com/4hApTpKD - I've made some edits to the situation which might clear things up slightly - note that the grub config has some leftovers from the old install, so isn't reliable (though it does boot Linux successfully).

– askvictor – 2012-11-09T00:12:41.377

0

What you needed to do was install Windows first, then Ubuntu. But there is a way to fix it.

Essentially you are going to boot into your live disk (USB/DVD) and restore GRUB (Linux boot loader)

This is a fairly simple process, and you can find exact directions here.

This should get it done:

Making GRUB 2 detect Windows Installs:

Proceed to boot into your Linux environment. Open a terminal and type sudo update-grub (enter your root password when prompted) If all went well, grub should have updated it's menu entries to reflect what it detected. Including existing Windows partitions.

TheXed

Posted 2012-11-02T01:23:22.950

Reputation: 1 931

I don't think it's possible to revert to non-UEFI boot like that. – SLaks – 2012-11-02T02:23:38.930

The only way Windows is using UEFI, is if you enabled it in your BIOS, if they even support UEFI. – TheXed – 2012-11-02T02:25:01.687

@TheX - I have both UEFI and BIOS boot modes enabled. I could revert to BIOS, but would rather go UEFI for everything – askvictor – 2012-11-04T05:42:30.163

Ubuntu does not currently support UEFI... That is the whole idea behind UEFI, to prevent unauthorized (aka, non-Microsoft) operating systems... – TheXed – 2012-11-04T23:14:34.593

0

You simply download EasyBCD; it's free software. Install it on Windows, run it, add a new entry and name it as whatever you want. Click on the bootloader option and change it into GRUB 2, restart your system. You will get a beautiful bootloader with installed operating systems...

Nikhil

Posted 2012-11-02T01:23:22.950

Reputation: 111

Has anyone confirmed the EasyBCD option? – jww – 2013-12-09T07:50:35.887