Partner links

Dual-boot Windows 8 and Ubuntu 12.10 in UEFI mode

Ubuntu 12.10 UEFI boot menu

Dual-booting Windows 8 and a Linux distribution in UEFI or EFI-compatible mode can be a very frustrating and unpredictable adventure. You just never know how the system will boot or whether it will even boot at all.

I have a computer that I built (assembled) using a motherboard with UEFI firmware. By default, it boots in Legacy mode. In that mode, setting up a dual-booting system between Windows 7 or 8 and any Linux distribution works as expected – all the time. But if UEFI mode is enabled, setting up such a system becomes a painful and frustrating adventure. This was especially true on my first attempt.

Even when you’ve figured out how to do it, you’ll likely begin to question whether it was worth the trouble. I came to the conclusion, after spending the last 72 hours trying to set up such a system between Windows 8 Pro and Ubuntu 12.10 on real hardware, that running a dual-boot system in UEFI mode is not worth the trouble, unless you really do need the benefits of a GPT-based partitioning scheme and/or you are not able to boot your computer in Legacy mode.

If you must set up a dual-boot system between Windows 8 and Ubuntu 12.10 on a single hard disk drive (HDD), this tutorial provides a step-by-step guide on how to get it done. The objective is to install Ubuntu 12.10 after Windows 8 Pro, with the Windows 8 boot manager as the “master” boot loader, and the Ubuntu boot loader installed in its boot partition, so what when the computer is rebooted, you will see Windows Boot Manager’s menu.
Windows 8 Boot Manager menu

And there is also the option of seeing Ubuntu’s boot menu. I’m sure you noticed the low quality of this image and the one above. They were taken with my el cheapo digital camera. That’s because the system used for this tutorial was installed on real hardware, not in a virtual environment, where it would have been easier to obtain better screen shots. There are one or two other images towards the end of this article that are of similar quality, so watch out!
Ubuntu 12.10 GRUB menu

As with most tasks, there are more than one method of getting this done. After several failed attempts, I decided that the method presented here is the path of least headache. If you must tag along with me, here are the tools you’ll need.

I. A computer with UEFI mode enabled in the firmware. Note that the computer I used is not a store-bought unit. As such, Secure Boot (actually, Restricted Boot) is disabled. In fact, that feature is not available in the UEFI setup utility. So it might be best to disable it on the computer you are going to use.

II. Windows 8 Pro installation DVD. You’ll need the 64-bit edition if you want to use a GPT partitioning scheme. This is very important else you’ll be out of sync with this tutorial’s images and descriptions.

III. A 64-bit edition of Ubuntu 12.10 installation ISO image, which you can download from here. Be sure to get the 64-bit edition, and burn it to a DVD or transfer to a USB stick.

IV. EasyBCD, a free program for messing with the Boot Configuration Data of Windows.

Now that you know what you’ll need, here are the steps you’ll have to follow to accomplish the task.

A. Install Windows 8 Pro. After this first task, the Windows 8 boot loader will be installed in the first sector of the HDD. By default, Windows 8’s installer create four partitions on a GPT partitioning scheme. And because the partitioning scheme is GPT, all four partitions are primary partitions. (See Guide to disks and disk partitions in Linux for more on this subject.)

B. Install Ubuntu 12.10 alongside Windows 8. In the method used for this tutorial, GRUB, Ubuntu’s boot loader, is installed in the first sector of the HDD, a process that erases or overwrites Windows 8 boot files from that location. GRUB, the GRand Unified Bootloader, is the boot loader used on almost all modern Linux distributions. GRUB version 2 is the latest version most often used. Partitions for Ubuntu will be created manually, and only three were created for the system used in the tutorial. These are the boot, root, and Swap partitions.

C. Install GRUB in the first sector of the Ubuntu’s boot partition. This sector of the boot partition is known as the Partition Boot Record (PBR).

D. Restore Windows 8 boot loader to the first sector of the HDD using EascyBCD and add an entry for Ubuntu 12.10 in the boot manager’s menu.

Ok, now that we know what we need and what to do, let’s get started.

1. Install Windows 8 Pro The 64-bit edition of Windows 8 Pro was used for this tutorial. The HDD used is 500 GB in size, and I let the installer partition it automatically. In UEFI mode, the installer automatically creates partitions based on a GPT partitioning scheme. And by default, it creates a total of four partitions.

The first partition is a recovery partition of 300 MB, followed by an EFI System Partition, then a Microsoft Reserved Partition (MSR), and finally, the data partition (commonly known as the C drive). The screen shot below shows the partitions as seen from Windows 8’s partition manager. Note that only three are shown here. The only one you’ll not see from the partition manager is the MSR partition. That’s because it’s always unmounted, hence it’s “hidden.”
Windows 8 Pro EFI GPT Partitions

From Ubuntu’s Advanced Partitioning Tool, all four partitions can be seen. The partition labeled /dev/sda3 is the MSR partition. The Microsoft Reserved Partition is a portion of disk space reserved for future use by the operating system. An MSR is always created by the installer when a GPT partitioning scheme is used.
Ubuntu 12.10 advanced partition tool

From Ubuntu’s disk management utility, you can see more information about the MSR partition.
Windows 8 C drive

After the installation of Windows 8 Pro, insert Ubuntu’s installation DVD in the optical drive and reboot the computer.

2. Install Ubuntu 12.10 As with Windows 8 Pro, the 64-bit edition of Ubuntu 12.10 was used for this tutorial. That is the recommended edition to use if UEFI and GPT are to be used. This is the disk partitioning methods step of the installation program. You can see that the installer has not detected the presence of Windows 8 Pro on the HDD. But you know it’s there. You’ll just have to use the installer’s Advanced Partitioning Tool to see the Windows 8 partitions and create partitions for Ubuntu 12.10. To do that, click “Something else,” then on the Continue button.
Ubuntu 12.10 installation

2a. Shrink the C drive From the Advanced Partitioning Tool’s window, you can see all existing partitions on the HDD. These are the default partitions created by the Windows 8 installer. The task here is to shrink the C drive (/dev/sda4), and use the freed space for creating partitions for Ubuntu 12.10. To do that, select the partition as shown, and click on the Change button.
Ubuntu 12.10 Add GPT Partition

From here, you can specify by how much you want to Shrink the C drive. You actually have to specify how much disk space you want to allocate to the C drive. For this installation, I opted to give it 100 GB.
Ubuntu 12.10 resize partition

Here’s the same window with the disk space I chose to allocate in place. Click OK. Note: The size is the only change you make at this window, else you are going to screw up your Windows 8 installation.
Ubuntu 12.10 Resize GPT Partition

Continue.
Ubuntu 12.10 Resize GPT Partition UEFI

2b. Create Ubuntu Partitions By default, Ubuntu’s installer creates just two partitions – root and Swap. However, for this tutorial, three will be created – boot, root, and Swap. Creating a separate boot partition, mounted at /boot, makes it a lot easier to install GRUB in a PBR. You could also create a separate partition for users’ home folders, mounted at /home. But that’s optional. To start creating partitions, select the free space as shown in this screen shot and click on the “+” button just below it on the left side.
Ubuntu 12.10 Resize GPT Partition

This is the partition creation window. You’ll have to specify the size, the mount point, and the file system to use. The default file system is Ext4. Except for Swap, that is what we’ll use for the other partitions. Note that because a GPT partitioning scheme is used, all partitions will be primary partitions.
Ubuntu 12.10 Resize GPT Partition

This is the same window showing the selections for the boot partition. On a new installation of Ubuntu 12.10, the disk space used by the boot partition is just 39 MB, so 300 MB should be more than enough. Be sure to set the mount point to /boot. OK.
Ubuntu 12.10 Add GPT boot Partition

For the root partition, I chose to assign a disk space of 100 GB (100,000 MB), and the mount point should be /. OK.
Ubuntu 12.10 Add GPT root Partition

For Swap, 4 GB (4000 MB) is good. Select “swap area” from the use as dropdown menu. OK.
Ubuntu 12.10 Add GPT swap Partition

Back to the Advanced Partitioning Tool’s window, you can see the partitions that now exist on the HDD. This screen shot shows the Windows 8 partitions.
Ubuntu 12.10 GPT Partition

This one shows the newly created partitions for Ubuntu 12.10. For some reason, the installer has this 0 MB free space between sda4 and sda5. If you find it on yours too, don’t worry about it, because it does not affect anything. No other change is needed at this window. GRUB 2 will be installed in the first sector of the HDD. Click Install Now to continue with the rest of the installation. On my test system, I left some free space at the end of the HDD. You could do that too, and use it to create an NTFS data partition.
Ubuntu 12.10 GPT Partition

Share:

Facebook
Twitter
Pinterest
LinkedIn

Partner links

Newsletter: Subscribe for updates

Subscribe
Notify of
guest
33 Comments
Inline Feedbacks
View all comments
Bryan Horna
10 years ago

Hi! I followed all the tutorial step-by-step, but what I got is two partitions “F:” and “G:” into Windows.
And when I try to add Ubuntu 12.10 with EasyBCD, it shows “Bootloader Path: \NST\AutoNeoGrub1.mbr” instead of what you got in the picture.
Finally, I’m getting the same Ubuntu boot screen, and no Windows Boot Manager (BIOS primary).
What I did wrong and how can I fix that? Thanks in advance.

Srinivas J R
Srinivas J R
10 years ago

You have missed out on what to select for “device for boot loader installation” during Ubuntu Installation??
Should I select /dev/sda or /dev/sda1 or /dev/sda2 …. or so??

Please explain on that and what it does.

Srinivas J R
Srinivas J R
Reply to  finid
10 years ago

Thanks.

I have another query for you. I have two disks. one HDD and another SSD. I have installed win 8.1 on HDD and Ubuntu 13.10 on ssd. due to booting issues I’ve formatted ssd. Now using EasyBCD I have made Windows boot manager and I can happily boot into win 8.1.

In my dell laptop UEFI boot settings(by pressing F12 during startup) I still see Ubuntu boot option along with Win boot manager. I want that to be removed from there, how can I do it?

Here is my EasyBCD settings –
comment image
comment image

I hope u can assist me in that.

Srinivas J R
Srinivas J R
Reply to  finid
10 years ago

Yes, It is the same laptop having both drives. But the problem is I didn’t create a /boot partition during ubuntu installation. So, from that grub menu I can’t goto Win 8.1, it says the path to efi is wrong or something.

If I create a /boot partition, will everything be OK?

grayfield
grayfield
10 years ago

I have done exactly as the tutorial guide. The result was the bootloader changed back to win8 metro style and shown 2 OS: win8(default) and Ubuntu, like the screenshot at the first page. But when I boot into Ubuntu, it displayed error message, that it cant be load or something is missing.

\NST\AutoNeoGrub.mbr

Robert
Robert
10 years ago

I’ve installed Win 8.1 Pro x64 on my UEFI computer’s SSD. Just wondering if Ubuntu would be better installed for dual-boot on a second GPT HDD? Thoughts?

Sudeepto Dutta
Sudeepto Dutta
10 years ago

Hey finid,

I read your previous tutorial on how to dual boot windows 7 and ubuntu 12.04

I did that on my UEFI ASUS motherboard without any trouble.

But here at the end of STEP 2b , instead of selecting /boot partition to install GRUB there you just went along and installed it on the first sector of HDD where usually Windows files reside . RIGHT ???

Why would you do that ?? Is there a reason ?? Please tell me ..

Because I followed everything you said except that part where I chose to select /boot to install GRUB..

I booted straight to windows , where I made an entry for UBUNTU and restarted ..

After rebooting, I saw a blue screen (the one you have one page 1) ..

MY ONLY PROBLEM is that whenever I select UBUNTU , my computer used to restart and then boot UBUNTU..

Is there a solution to that finid??

Please tell what should I do ??

Thank You 🙂

Pendelton
Pendelton
10 years ago

I so hope that this works. I have spent 3 days so far trying to get Ubuntu to dual boot on my new Toshiba laptop which shipped with Windows 8. I have set up dual boot lots of times before with XP, Vista and Windows 7 without any problem but Windows 8 with this new BIOS is pure hell. I don’t care if the terminology is correct or not, I will try anything at this stage that sounds like it may also work for me. I wish I could just have Ubuntu on my laptop but I also need Windows to run Adobe Illustrator on the same machine. 🙁

Sam
Sam
10 years ago

Ok, everything is fine and smoothly possible! But there is a big problem! Most win8 sold laptops are coming with too many partitions which reach the limit partition possible to install any OS. Even if you manage to make a way around the UEFI or any other issue, you can’t work around this! Unless, you try to remove some of these partitions and I can’t imagine how it will affect the win8 functionality!
Instead you have two choices:
1- if your HDD easy removable, get another one for Linux
2- Make your mind and keep only one OS! Linux or Windows.

There is a third choice but I personally don’t like:
3- Use virtual machine to run Linux under windows. I don’t see the point!

My solution was easier, I have 2 laptops. One is Ubuntu 12.10 and the second is Win8.

capt
capt
10 years ago

Is it required to do step 5 or can you just use grub to boot to either operating system?

Srinivas J R
Srinivas J R
Reply to  finid
10 years ago

I’d like to use GRUB as boot loader. So if I make /dev/sda as the device for boot loader installation, is it necessary to create a /boot partition for ubuntu during ubuntu installation??

I mean is it essential to create PBR ?

As I’m getting confused with terminology, could you tell me difference between “First Boot partition” , “PBR” and “MBR”.

Sorry if I’m asking too many questions.

Thanks tough for ur tutorial.

Richard
Richard
Reply to  capt
10 years ago

You can put Ubuntu on a logical partition and it will be perfectly happy there. You can have up to 64 logical partitions so I think you would run out of HDD space before you run out of logical partition slots.

Windows NT versions also will install in a logical.

I have 4 OS’s on one machine with a UEFI BIOS and Windows 8 and Ubuntu is on a logical since there were no Primary slots left available.

geekchef
geekchef
11 years ago

If you buy a PC with Windows 8 preinstalled, you have no choice but to configure it to dual boot in UEFI mode. The trick is to disable Quick Boot (or Fast Boot, depending on how your BIOS labels this feature) and Secure Boot. This is because you cannot perform a clean install of Windows 8 using the recovery media that either came with your PC or that you created after buying it. Re-installing Windows 8 on such a PC will always re-install it in UEFI mode. Also, on such a PC, Secure Boot will be enabled. This prevents both Windows 8’s Boot Manager as well as GRUB from chain loading boot managers/loaders for other OS’s, because the boot manager/loader cannot validate other OS’s security certificate. Only the BIOS can do that. It would be nice if the BIOS on a system with Secure Boot functionality provided an interface to allow a boot loader to validate another OS’s security certificate, thus allowing the ability to dual-boot from either Windows 8’s boot manager or GRUB with Secure Boot enabled. Until that type of functionality is available, your choices are to either rely on the BIOS’s boot manager to dual boot Windows 8 and other OS’s in Secure Boot mode, or disable Secure Boot so you can use GRUB or the Windows 8 boot manager to dual boot between Windows 8 and Linux.

Richard
Richard
Reply to  finid
10 years ago

Yeh, that is the more sensible option. Build your own or have someone build one that is not in a factory owned by a billion dollar OEM conglomerate being paid off by MS to load and aloww only Windows 8

Frodo
Frodo
11 years ago

I stopped using MBR partitioning scheme on my personal computers including a notebook, months ago, but I still use terms like those finid is using, even though I know they no longer apply to my systems.

And I can’t seem to get the terms out of my head. don’t blame me. blame years of using MBR and company. Like finid said, we are in a transitional phase. I’m slowing teaching myself (reminding myself) that I now live in a GPT-world.

Yes, MBR is dead (for me), but the terms still live on in my head. Again, don’t blame me.

Don't follow me
Don't follow me
11 years ago

Sorry, I meant winload.efi, not winload.exe

Don't follow me
Don't follow me
11 years ago

Apart from a partition table with one dummy “Protective” partition the first sector of a GPT drive is empty.

You said:
“Install Windows 8 Pro. After this first task, the Windows 8 boot loader will be installed in the first sector of the HDD.”

Windows has never installed its bootloader to the MBR. You mean the Initial Program Loader, which no longer exists on a GPT drive. Windows8 instead adds an entry to the EFI bootmanager to start the Windows bootmanager on the EFI system partittion, which will then start the Win8 bootloader, which is winload.exe on the Windows8 partition.

littlenoodles`
littlenoodles`
Reply to  finid
11 years ago

I went through UEFI setup hell a few months ago with a new OEM Windows 7 box and Linux Mint 14-KDE. I also tried to use EasyBCD, but guess what, according to the guy who wrote EasyBCD, it does not support EFI booting at all. In any case, it’s just a shell around some command line stuff, and maybe in Windows 8, it can do what you describe – just saying, it didn’t work for me. I ultimately ended up using rEFInd, which is an EFI boot menu system – it can even locate an boot 64-bit EFI-capable Linux kernels directly. I did also have to use the Ubuntu boot-repair tool, and lots of other hellish stuff I don’t even remember.

KM0201
KM0201
Reply to  finid
10 years ago

No doubt something Microsoft intended. If I buy a new laptop, I’ll just pick up a new 2.5in hard drive as well. I don’t use Windows enough (maybe 2-3x a year?) to stress it.

yao
yao
Reply to  littlenoodles`
8 years ago

This is what I’m going through now. I already had windows 7 installed and decided to install linux mint 17.3 to dual boot. Almost nothing went according to tutorials I saw. Linux didn’t detect windows 7 to install alongside it so I had to do the “something else” option. I installed it just fine and it all works, however, I noticed that I have an issue where whenever I hibernate the computer in windows, when I bring it back up, it cannot resume into windows. It has to just reboot. In trying to fix that problem, I wondered if using easybcd(which I just hadn’t gotten around to yet) to create that grub menu thing may help. But I got that same message about limited features due to efi mode. Can’t do anything under any of the tabs except windows.

smh

Gonna look up this refind thing you mentioned to see if it helps.

Thanks

Richard
Richard
Reply to  Don't follow me
10 years ago

I built a new system with Windows 8 in ti and I don’t have an EFI partition. Why would anyone need one unless they are in for pain and suffering??

Don't follow me - I'm lost too.
Don't follow me - I'm lost too.
11 years ago

You really have no idea what you are doing and you should not be publishing this stuff to encourage others to stumble blindly into the same mistakes and mis-conceptions. Where do I start? How about the fact that there is no MBR on a GPT styled drive.

Get the latest

On social media

Security distros

Hacker
Linux distros for hacking and pentesting

Crypto mining OS

Bitcoin
Distros for mining bitcoin and other cryptocurrencies

Crypto hardware

MSI GeForce GTX 1070
Installing Nvidia GTX 1070 GPU drivers on Ubuntu

Disk guide

LVM
Beginner's guide to disks & disk partitions in Linux

Bash guide

Bash shell terminal
How to set the PATH variable in Bash
Categories
Archives
33
0
Hya, what do you think? Please comment.x
()
x