This tutorial provides a step-by-step guide on how to triple-boot Windows 7 and 8 and Ubuntu 14.04 on a computer with UEFI firmware and on a single hard disk drive (HDD).

The working assumption is that the first OS on the computer, which could be OEM or self-built, is Windows 8. Windows 7 will be installed alongside it, followed by Ubuntu 14.04.

Step 0. Prepare the Target HDD: The test computer used for this tutorial has a 500 GB HDD, with Windows 8 taking up about 200 GB of that. The unused portion will be used for installing Windows 7 and Ubuntu 14.04. This screenshot shows the partition layout as seen from the Windows 8 partition manager. If you don’t have free space on your target HDD, use the partition manager to shrink or reduce the C drive. This forum post shows how it’s done.
Windows 8 Partitions

After making sure that you have some unallocated space on the HDD, the next task is to install Windows 7. After that, Ubuntu 14.04 will be installed on three partitions, which will be created manually. Those partitions will be mounted at / (root), /home and Swap. If you haven’t done so already, download an installation image of Ubuntu 14.04 from here. Burn it to a DVD or transfer it to a USB stick. You’ll need it for Step 4.

Step 1. Install Windows 7: To begin the installation of Windows 7, reboot the computer with the Windows 7 installation DVD in the optical drive. When the installer starts, click until you get to the disk partitioning step. This screenshot shows the partitions on the HDD as seen by the installer. Partitions 1-4 are the Windows 8 partitions, with partition 2 the EFI System Partition (ESP). On a UEFI system, that partition serves as the boot partition for all installed operating systems.

To install Windows 7, select the “Unallocated Space” and click Next.
Install Windows 7 partition

On my test system, the installer threw this message after I clicked Next in the previous step. As far as I knew, the partitions were in the proper order, so I just clicked OK. The installation completed successfully and I rebooted the computer.
Install Windows 7 GPT partition

Step 2. UEFI Boot Menu and Windows Boot Manager : Before the computer boots into the default boot device, press the F-key that will take you to the boot menu. On mine, that key is the F11 key. This screenshot shows what the boot menu of the test computer looks like. For each OS installed on any HDD connected to the computer, an entry is made in the boot menu for it. In this screenshot, the AHCI P2: WDC WD50000… entry is the target HDD. The Windows Boot Manager entry is used for booting Windows 7 and Windows 8. Selecting it will not boot directly into either OS, but will only take you to the Windows boot menu.
UEFI menu Windows Boot Manager

This is what that Windows boot menu looks like. On your system, test to make sure that you can boot into Windows 7 and Windows 8 before moving on to the next step. First, boot into windows 8, then into Windows 7. If you did not encounter any problem (I did not), remain logged into windows 7 to complete the next step.
Windows boot manager UEFI

Step 3. Shrink the Windows 7 Partition: That next step involves shrinking the Windows 7 C drive, so that you can use the recovered disk space to install Ubuntu 14.04. It’s just the same thing you did to the Windows 8 C drive before you could install Windows 7. Again, This forum post shows how it is done. This screenshot shows the partitions as seen from the Windows 7 partition manager, which is actually the same as the Windows 8 partition manager.
Windows 7 partition

This one shows the same view as the previous one, but with the Windows 7 C drive reduced to about half. The partition marked “Unallocated” will be used to install Ubuntu 14.04.
Windows 7 partition shrink volume