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.
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!
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.”
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.
From Ubuntu’s disk management utility, you can see more information about the MSR partition.
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.
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.
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.
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.
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.
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.
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.
For the root partition, I chose to assign a disk space of 100 GB (100,000 MB), and the mount point should be /. OK.
For Swap, 4 GB (4000 MB) is good. Select “swap area” from the use as dropdown menu. OK.
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.
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.
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.
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.
The bootloader should be installed in the boot partition of Ubuntu. In this tutorial, it is /dev/sda5.
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 –
I hope u can assist me in that.
If the Dell laptop is the same one with the HDD and SSD, you don’t need to use EasyBCD. Just install both on their separate drives as you have done, then make the Ubuntu drive the default from the BIOS or UEFI Setup utility.
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?
Don’t use EasyBCD, you don’t need it with 2 drives involved.
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.
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?
If you can afford to, it’s always better to use a second HDD or SSD for the other OS in a dual-boot setup.
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 🙂
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. 🙁
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.
Is it required to do step 5 or can you just use grub to boot to either operating system?
Not required, but recommended.
If you want to use GRUB as the “master” or only boot loader, then you have to make sure that the device for boot loader installation is set to /dev/sda during the installation of Ubuntu.
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.
If sda is the SSD that Ubuntu is installed, and it is the sole OS on it, then it is not necessary to have a separate partition for boot. It’s good to have, but not absolutely necessary. For the record, a default installation of Ubuntu does not make use of a separate boot partition.
Use PBR when referring to first sectors of a partition, MBR for the entire HDD.
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.
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.
Rather than buy a PC, then, it is far better to build one yourself. That way, you avoid all the signing keys and Secure Boot madness.
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
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.
Sorry, I meant winload.efi, not winload.exe
Apart from a partition table with one dummy “Protective” partition the first sector of a GPT drive is empty.
“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.
Again, a misuse of terms. Rather than “MBR” and the “first sector of the HDD,” perhaps the proper terms should have been used. We are all still adjusting to GPT and (U)EFI terminologies, and the misuse here does not invalidate the steps given in this article, unless you can point out where following this guide will fail to yield a successful dual-boot system.
Complete elimination of terms like MBR from an article on this subject is not impossible, but it’ll take a conscious effort, especially when a tool like EasyBCD, which has been updated to accommodate all the good and bad that Windows 8 brings to the table, still has a button that reads “Write MBR.” Maybe it should it read “Write GPT,” Write to LBA 1,” or “Write to EFI System Partition.” Whatever the button reads, it does the job, it just does not use the proper terms – yet.
I take your criticism in stride because I make a point of doing the same to distro developers who fail to do things the right way. It’s how you move forward.
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.
I considered using rEFInd, but EasyBCD has always worked for me, and it did not fail for this article. And true, dual-booting between Linux and Windows 8 is one heck of a mess, especially with UEFI involved.
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.
The interesting thing with EasyBCD is not only did it work in Windows 8, but it automatically created an entry for Ubuntu during its instllation. that has never happened with Windows 7 or 8 in Legacy mode.
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.
Gonna look up this refind thing you mentioned to see if it helps.
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??
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.
It’s not a question of having “no idea what you are doing,” but more of intentional “misuse” of terminologies. Even the author of EasyBCD and similar tools still choose to use MBR, as in “Write MBR,” when that clearly no longer applies.
Even replacing “MBR” with the “first sector of the HDD” muddles things up a bit, but that seems to take the term that you are having a problem with out of the picture. Not that it really mattes, because as much as you want to convince yourself that “there is no MBR on a GPT styled drive,” the first sector of such a drive is called the “protective MBR.” We are still in a transitional phase between old and new, so don’t be too hard on terminologies.
So it’s not that I don’t know what I’m doing, just that some terms are so ingrained that they refuse to “die.”
Now, aside from MBR, what other “mistakes and mis-conceptions” do you want to point out?