Zemanta Related Posts Thumbnail

Dual-boot Windows 7 and Ubuntu 12.04 on a PC with UEFI board, SSD and HDD

How to dual-boot Ubuntu 12.04 and Windows 7 and how to dual-boot Ubuntu 12.04 and Windows 7 on a computer with 2 hard drive provided step-by-step guides on how to setup a dual-boot system with those operating systems. They were based on test installations on computers with BIOS (Basic Input/Output System) firmware.

While the tutorials worked for people using computers with BIOS firmware, those using newer computers with UEFI firmware ran into one or more problems. UEFI (Unified Extensible Firmware Interface) is a replacement for BIOS, and it is very likely that any computer or motherboard you buy today will have UEFI instead of BIOS firmware.

Since I just built a new computer with UEFI firmware, I decided to recreate those tutorials to show how it should be done on computers with the latest firmware, and also to see if I will run into any of the problems that others have been reporting.

The computer used for this article is a custom-built one with an ASRock Z77 Pro4 motherboard, with a 128 GB SSD and a 500 GB HDD. Windows 7 will be installed on the SSD, while Ubuntu 12.04 LTS will be on the HDD.

When setting up a dual-boot system between Windows and a Linux distribution on a system with two hard drives, it is best to set the default boot disk in the firmware to the one on which the Linux distribution will be installed. That way, the Linux distribution’s boot loader will be the primary boot loader and it will not be necessary to make any changes to the Windows boot manager or menu. (To setup a dual-boot system on UEFI hardware with one hard drive between Windows 7 and Ubuntu 12.04, see dual-boot Windows 7 and Ubuntu 12.04 on a PC with UEFI hardware.)

To use a computer with two storage drives for dual-booting Windows and a Linux distribution, the storage mode in the firmware must be set to AHCI (Advanced Host Controller Interface). The other option is RAID. On some motherboards, IDE is a third option. This is very important because on some of the new Windows computers with two hard drives that you buy today, the mode is set to RAID. Attempting to setup a dual-boot configuration with such a setting will not be fun. If you are new to Linux, have never set up a dual-boot system before, and are not familiar with disk partitioning in Linux, you might want to read guide to disks and disk partitions in Linux and 7 tips for dual-booting Linux distributions and Windows.

Since my test system is custom-built, I had to perform a fresh installation of both Windows 7 and Ubuntu 12.04. Because the installations were on real hardware, rather than in a virtual environment, and Windows 7 does not provide a means of taking screen shots during installation, there are no images showing the steps involving its installation. So if you are going to reinstall Windows, go ahead and do it. Just be sure to install it on the SSD.

If you have a system with an existing installation of Windows on the first hard drive (or SSD), and you do not want to reinstall, you can start the Ubuntu installation. Before you start, set the default boot device to the second hard drive.

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

After a successful installation of Windows 7 on the SSD, download Ubuntu 12.04 from here, and burn it to a CD or transfer to a USB stick. On booting the computer from the Ubuntu installation media, you will be given the option of booting into a Live desktop environment, where you may then start the installation, or begin the installation without first booting into the Live desktop. Regardless of where you start the installation process, when the installer starts, click through the initial steps until you get to the disk partitioning methods step. That, for this tutorial, is the first step.

That was a lengthy introduction, but it was necessary. Here is a condensed version: Get a UEFI system with an SSD and an HDD. Install Windows 7 on the SSD. Set the boot device to the HDD. Install Ubuntu 12.04 on the HDD. Reboot. Select Windows 7 or Ubuntu from GRUB’s menu. Have a fun computing.

1. Disk Partitioning Methods: When attempting to install Ubuntu on a system with an existing installations of other distributions or operating systems, the installer will, at this step, let you know if it detected the existing OS and give you the appropriate disk partitioning options. On this UEFI hardware, however, it did not detect Windows 7 on the SSD. Since this has never happened on any non-UEFI hardware that I have used in the past, I am going to assume that there is a setting in the ASRock UEFI Setup Utility that could be throwing the installer off.

Since I know for a fact that Windows 7 is on the SSD and CentOS is on the HDD and I am not about to erase Windows, the only option here is to select Something else. Selecting it and clicking Continue should take you to the installers Advanced Partitioning Tool.
UbuntuUEFI

2. The Advanced Partitioning Tool: This is the main window of the Advanced Partitioning Tool. You can see two hard drives listed – /dev/sda and /dev/sdb. sda is the SSD, while sdb is the 500 GB HDD. The only problem here is that the installer is not aware that Windows 7 is on the SDD. It correctly detected a Linux file system on sdb1, but not the Physical Volume on which CentOS is installed on sdb2. That is no surprise because this installer is normally not able to detect LVM partitions, and the CentOS on the HDD was installed on an LVM partitioning scheme. LVM is the Linux Logical Volume Manager.

The task here, then, is to delete the existing partitions under sdb and create new ones for Ubuntu. To do that, select each partition in turn and press the Delete button. Warning: Do NOT touch any partition under sda. That is the SSD with Windows 7 on it.
UbuntuUEFI2

3. Start Creating New Partitions: After the delete operation has completed, the window should look just like this one. Next task: Create new partitions for installing Ubuntu. Since this is a test installation to see if dual-booting will work on UEFI hardware sans problems that has been reported by others, I chose to create just three partitions – one each for /boot, root, and Swap. No separate partition for /home. You can create one if you like.
UbuntuUEFI3

Related Post:  You'll need to do this after installing Elementary OS 5 Juno

4. Create Boot Partition: The first partition is the boot partition. Assign a disk space of 500 MB or less. Set the mount point to /boot and leave the file system at ext4. That is the default. There are other file system options, but do not bother about those. Just use the default. Since this is the first partition on the HDD, the installer creates it as a primary partition. Click OK when all the options have been assigned values.
UEFIboot

5. Create Root Partition: The root partition is where all programs will be installed. If you do not create a separate /home partition, it is also where your home directory will be located. For this test system, I allocated 300 GB of disk space to it. Use the default file system (ext4), and set the mount point to /. Note that I also created this as a primary partition. You do not have to, and it should not make any difference whether this works or not. OK.
UEFIroot

6. Create Swap: The last partition was for Swap, which I allocated 4 GB of disk space to. I also created as a primary partition. OK.
UEFIswap

7. Set Device for Boot Loader Installation: When all the partitions have been created, you should be back to the main Advanced Partitioning Tool window (see steps 2 and 3). The final task at that window, before clicking Install Now, is to select where GRUB, the boot loader, will be installed. By default, sdb should be selected in the Device for boot loader installation dropdown menu. If not, select it from the menu. Install Now.

8. Import Account From Windows: The installer surprised me by offering to import my account settings from the Windows 7 installation on the SSD when it did not detect it during the partitioning phase.
UEFIimport

After installation and reboot, booting into Ubuntu or Windows 7 from GRUB’s menu worked without a hitch. So there you have it. Dual-booting a Linux distribution and Windows 7 on a system with an SSD, an HDD, and UEFI firmware. A future article, which should be published in a couple of days, will show how to setup a dual-boot system on this same computer, but on a single hard drive. Since this dual-boot setup involved Ubuntu, this can also be used as a guide for setting up the same system with any other Ubuntu-based distribution.

Please share:

25 Responses

Add a Comment

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