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.
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.
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.
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.
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.
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.
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.
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.
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.
I have been battling with installing Win7 and Ubuntu 12.04 all weekend. I have a home built system using an Asrock Z68 Fatail1ty board, and Nvidia 560 TI video, Win7 on SSD and Ubuntu on HDD.
My UEFI boot menu from start up gives me two options to run my DVD drive: UEFI or AHCI. If I select UEFI Ubuntu loads automatically, without prompts, and I get a blank screen after the keyboard+Human logo. If I select AHCI I am able to set ‘nomodeset’ from editing the commands and everything installs perfectly fine.
After install however, Win7 is the only thing that will boot. If I use the start up boot menu and select my Ubuntu drive it still boots Win7. I have 5 separate HDD’s in my system; so if I plug them all up, go into the UEFI and bury my Win7 SSD on the bottom of the boot priorities I get a ‘1234F:’ prompt.
I followed the guide to the letter 3 times. I had attempted installing without a guide 2 times before that all with the same result. I am selecting sdb as my boot device in Ubuntu install. It’s almost like the motherboard is refusing to allow me to boot from anything other than my SSD.
I have 2 ssd and a Gigabyte dual uefi bios motherboard. The dual bios might be important, I don’t know. I have installed 12.04 and win 7, both 64 bit, each on 1 ssd.
I think I installed windows first (sorry don’t remember anymore), then unplugged the windows ssd (removing sata connector inside pc), plugged the second ssd in another sata port, and installed ubuntu. Finally I booted with both ssd connected. During startup a bios boot window shows up where you can press F12 and select the boot drive. If you skip pressing F12 you will boot in windows automatically.
Any other attached hdd (only for storage) is usable from both os, being formated initially in windows.
Everything works fine for several month now.
Hope this helps.
I got a asrock h77 pro4/mvp motherboard, installed win 7 on the first ssd, but i am failed to install ubuntu 12.10 and 12.04 on the second ssd, i had disabled the secure boot feature in bios, would you please give me some recommendations? thank!
What happens when you try to install Ubuntu on the second SSD?
Stupid question alert: Is that mobo on a store-bought PC or you built the system yourself?
i built the system
cpu: xeon e3-1245
ram: kingston 8gb
1. when i choose try ubuntu before install it, there is only black screen with blinking underscore….then it stop blinking….
2. when i can boot into the ubuntu loading screen, and i pressed F2, the screen shown: stdin: Not a typewriter stdin: Not a typewriter Generating locales… en_US.UTF-8… done Generation complete. then stoped there.
Have not encountered that error, even on an ASRock system that I built. Have you tried another distros to see if they’ll boot?
i solved this problem by unplugged my dvd-rom. i guess ubuntu searching a dvd-rom even usb is the first boot drive.
I got a ultrabook lenovo with a hybrid HDD (SSD for cache) you mentioned before. In my case, Win 7 is installed on HDD (?)…Do you know what I can do in this case? do you have any idea?
Please! I want ubuntu in my laptop but I’m trying to read many comments and explanation before try to(mess up) configure my machine…
Thanks in advance!
I’ll put out an article on SSHDs in a couple of days.
But here’s the deal with them: the OS does not see an hybrid SSD or SSHD as two disks, but as one. So the OS will always be intalled on the HDD part. Therefore, if you install Windows on it and try to install another OS alongside it, that other OS will be installed on the free space in the HDD part.
The big question is this: Since the SSD part is for caching, what happens to the cached content if you reboot from one OS to the other?
Hi, I tried to follow this tutorial to install Ubuntu 12.04 LTS on my Sony Vaio SVS151190X with Windows 8 Pro as my main OS because I replaced my optical disk with a second ssd and wanted to install Ubuntu for computer science class and for personal android builds on the second ssd but I couldn’t get it to work. The only reason I’m not dual booting off of the main drive is because I ordered the laptop with the SSD upgrade and it comes as a fakeraid 0 with 2x 64gb SSD and I would like to leave it that way. I was wondering is it because of Windows 8 or because I tried to use the ssd that replaced the optical disc. I created an entry using EasyBCD 2.2 for the Windows 8 Bootloader found in another one of your tutorials but it would never load Ubuntu. EasyBCD also get pointing the boot to the C:/ drive if that means anything. I tried to change in advance settings to BOOT and even D:/ (my second drive letter) neither of which worked.
Thank You for any advice you can give me because I’m currently running a VM and it’s horribly slow for compile.
I think you need to change the settings in the BIOS to a non-RAID option. That’s likely the cause of the problem you’re having.
Would raid really be the problem because I installed on the second hard drive. Would there be a work around I’d really like to not touch the raid setup because I would have to wipe everything.
To be clear the raid only affects the main ssd. it’s a fakeraid Sony implemented with a single board that fits into 1 drive spot the main one. My second (3rd if you could the 2 in raid) is in the optical drive bay and is separate from the fakeraid setup
I want to install Ubuntu on the solid state drive, and Windows on the HDD. Just curious why you don’t address this possibility and assume the opposite?
That’s not an issue, just install Ubuntu on the SSD and Windows on the HDD. Be sure to install Windows on the HDD first.
Hello Thanks for help.. Ok -I have dual SSD with UEFI all set up with ubuntu studio in four partitions. I decide I want to install updated distro. Is this a difficult lengthy process? Is there a tutorial for this?
Simple question i haven’t started this yet but i have 2 ssd’s with win7 on my 240gb ssd and i was going to install ubuntu on my other 60gb ssd. This tutorial does specify a difference between ssd and hdd and just wanted to check before i start that i can have win 7 on an ssd and add ubuntu on my other ssd.
Yes, you can. Just pretend that the title is, “dual-boot Windows 7 and Ubuntu 12.04 on a PC with 2 SSDs.”
It’s same as BIOS PC, what’s the difference UEFI makes? There was a so much about that UEFI will not load Linux.
Older distros will not load on UEFI hardware.
Hey finid, its me again and yes still having lots of problems
I keep reformatting my laptop with WIndows 7 and BT still can’t detect my windows 7 partition.
Am i right to suspect that UEFI is causing this problem?
My laptop was purchased on June 2012.
Very new, im suspecting so
Sorry, I’ve been battling major issues with my site’s migration, so I’ve no had time to take a look at this again.
If BT 5 cannot even detect the partitions, then you are having the type of issue I had with Windows 8 and Ubuntu. See Why is Windows 8 on SSD invisible to Ubuntu 12.10’s installer?.
What type of disk came with that PC. Some of the newer PC, especially notebooks come with a special kind of disk called hybrid disk, which is a fusion of a small SSD and a larger HDD. IS that what you have?
Post your Windows partitions here, so we can have an idea what’s going on. And what is the brand and model of the PC?
Btw, I just downloaded BT 5 R3 GNOME, and will try dual-booting with Windows 7 and 8 between now and Sunday.
I’m constantly spam-formatting my laptop
SATA HDD – 750GB
UEFI – 1 problematic piece of M$ crap to the linux community.
Anyway, people have said disabling UEFI will make Windows installation fall back to MBR mode (the older BIOS mode)..
However when UEFI is disabled and Windows7 is installed, my BT5R3 cannot detect my Windows7 partitions. Back to square 1 again.
Sigh…so much problems yet learnt alot about UEFI/BIOS GPT/MBR…
Fantastic article. Great work!
You finished the above tutorial (last sentence) by saying,
> 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.
Debain (as you know) is not ‘Ubuntu based’. Will your tutorial still work as a dual-boot for installing Debian?
I would like to utilize the information in this tutorial (not the UEFI part)as well as the tutorial titled, ‘dual-boot-ubuntu-12-04-and-windows-7-on-a-computer-with-2-hard-drives’, to set-up a dual-boot on my older dual pentium III system. I am installing ‘Debian Squeeze netinst’ version 6.0.6