Ubuntu 12.10 UEFI boot menu

Dual-boot Windows 8 and Ubuntu 12.10 in UEFI mode

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.)

Related Post:  Accessing Linux systems remotely

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

Related Post:  Creativity: The key to the Virtual Reality gambling experience of the future

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

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

Please share:

33 Responses

Add a Comment

Your email address will not be published. Required fields are marked *