Partner links

Dual-boot Windows 7 and Ubuntu 12.04 on a PC with UEFI hardware

Windows 7 Boot Entry

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, the same one I used for writing dual-boot Windows 7 and Ubuntu 12.04 on a PC with UEFI board, SSD and HDD. The only difference between that article and this one, is that this one shows how to set up the dual-boot system on single, 500 GB hard drive.

Since it is likely that you will already have an existing installation of Windows on your computer, the tutorial begins on a system with a fresh, default installation of Windows 7. That means, there are just two partitions on it – the Windows 7 System Reserved partition, and the main Windows 7 partition – the C drive. The task here is to shrink the C drive, freeing up enough room for Ubuntu. Then install Ubuntu on the free space.

To install Ubuntu, the partitions have to be created manually, with the following three partitions created: A boot partition; a root partition; and a partition for Swap space. GRUB, Ubuntu’s boot loader will be installed in the boot partition. After Ubuntu has been installed successfully, an entry for Ubuntu will then be added to Windows 7’s boot menu, so you will have a choice of OS to boot into from the Windows boot menu. That, in a nut shell, is the task at hand.

If you are new to Linux, have never set up a dual-boot system before, and are not familiar with disk partitioning in Linux, it is highly recommended that you read guide to disks and disk partitions in Linux and 7 tips for dual-booting Linux distributions and Windows.

Before you start messing with the partitions in Windows, download an installation image of Ubuntu 12.04 from here. Burn it to a CD or transfer it to a USB stick.

Let us begin.

1. Windows Partition Manager: Since we are starting with a system with an existing installation of Windows 7, we need to shrink the C drive. To do that, start Windows 7’s partition manager: Type partition into the search box and click the only item that appears. This screen shot shows what it looks like. On a single disk system like the one used for this tutorial, you should see two partitions as shown in this image. The one you need to mess with is the C drive. Do not touch the System Reserved partition. Right-click on the C drive and select Shrink Volume.
Windows 7 Partition Manager

2. Shrink The C Drive: This window should open. Because my test system is a fresh installation on a 500 GB HDD, it has plenty of free space, and Windows has decided that it is save to shrink the C drive down to about 14 GB. That works for me and for the purpose of this tutorial. If you are satisfied with what you are seeing on this window, click the Shrink button.
Windows 7 Shrink Partition

3. Unallocated Windows Partition: Back to the main partition manager’s window, you should see the space that was recovered from the C drive. It is the one labeled Unallocated. That is what will be partitioned for installing Ubuntu. Close the window and reboot the computer. Be sure to put the Ubuntu installation CD in the optical drive before rebooting.
Windows 7 Free Partition

4. Ubuntu’s Installation Requirements: When the computer boots from the Ubuntu installation CD, start the installer either from the Live desktop or without first booting into the Live desktop. Click through the first few steps until you get to this one. This just tells you how much space you will need to install Ubuntu. Click Continue.
UbuntuSpace

5. Ubuntu’s Partitioning Methods: You should now be looking at this step. You want to choose Something else. Why? Because that is the one that will allow you to configure the partitions manually and let you choose where the boot loader will be installed. The other options will create the partitions automatically, install GRUB in the Master Boot Record (MBR), which will overwrite Windows’ boot programs there. Continue. Selecting Something else else takes you to the Advanced Partitioning Tool.
Ubuntu Partition Methods

6. Ubuntu’s Advanced Partitioning Tool: This is the Advanced Partitioning Tool. You can see the two NTFS (Windows) partitions and the space that was recovered from the C drive. In this screen shot, /dev/sda2 is what Windows calls the C drive. The System Reserved partition is /dev/sda1. Do not mess with either one. You will be creating partitions for Ubuntu using the free space. So, select it and click Add to start creating partitions. For this tutorial, only the boot, root and Swap partitions will be created. If you want, you can create another one for /home.
Advanced Partition Tool

Share:

Facebook
Twitter
Pinterest
LinkedIn

Partner links

Newsletter: Subscribe for updates

Subscribe
Notify of
guest
50 Comments
Inline Feedbacks
View all comments
fadil
fadil
1 year ago

Thank you for nice information.

Sekim
10 years ago

Hi Finid,

I have followed your tutorial to the letter trying to install Ubuntu alongside Windows 7 on an Asus laptop having UEFI system and GPT partitioning but when I tried to reboot into Ubuntu I got the same error that I encountered sometime back when tried to install wubi.

The error:

Windows failed to start. A recent hardware or software might have caused the error….

File \NST\AutoNeoGrub0.mbr
Status 0X0000098

The selected entry could not be loaded because the application is missing or corrupt.

I have tried different boot loader types (GRUB 2, GRUB(legacy) etc) when adding Ubuntu on EasyBCD but it still doesn’t work.

The only thing that I did differently during the installation is that, after creating the three partitions as you have recommended and clicking on ‘install’ the system suggested I go back and make another partition of type ‘Reserved bios boot area’, which I did and allocated 480 MB. I have even tried to book from this partition but it still doesn’t work.

Could you may be have an idea of what went wrong?

Thank you!

Gustavo
Reply to  Sekim
10 years ago

I’m getting the same error! And I basically did the same as you.

Can anyone help us?

reponsatou
reponsatou
10 years ago

Hi finid,

I have a brief question: is there a specific reason why, except for potential Windows Updating from Win7 to Win8, on all your installation guides you suggest to boot on Windows MBR instead of booting directly on the GRUB manager?

Does it have something to do with the UEFI or the Intel Rapid Storage Technology (when a small SSD exists)?

Last year my former computer crashed and I’m pretty sure I used one of your guide to install a dual-boot Win7/Mint Maya booting directly on the GRUB but I cannot see this tutorial anymore. Is it me or did you change the tutorial?

Thanks!

reponsatou
reponsatou
Reply to  finid
10 years ago

Thanks for your reply!

I get your point. But then, when the PC boots on the Windows MBR what happens when Windows crashes? how can you boot on Linux (without a LiveDVD I mean)?

(if your tutorials are updated I must have mixed up last year when installing Linux, sorry for mentioning that.)

Regarding the UEFI, I had Windows 8 pre-installed on my new laptop. I managed to replace it with Windows 7 by deactivating the UEFI mode. So technically I’m not using the UEFI but it’s still there on one of my HDD partition (Gparted can see it) so I don’t exactly know if I should consider tutorials with or without UEFI…

As for my SSD of 24Gb, it is separated from the HDD.

reponsatou
reponsatou
Reply to  finid
10 years ago

Thank you for the link to the article, it is very interesting. I never thought about this GPT issue before. Assuming (I have to check) that Windows 7 has been installed with the GTP table, is a dual-boot with Linux Mint hopeless when keeping the GTP table?

Frederik
Frederik
10 years ago

I get a choice menu to boot either Win-7 or Ubuntu
but Win-7 boots fine and Ubuntu does not boot at all.
When I choose Ubuntu I get to a Grub promt, no further.
Please help, thanks.

EasyBSCD reports as follows:

There are a total of 2 entries listed in the bootloader.

Default: Windows 7
Timeout: 30 seconds
EasyBCD Boot Device: C:\

Entry #1
Name: Windows 7
BCD ID: {current}
Drive: C:\
Bootloader Path: \windows\system32\winload.exe

Entry #2
Name: Ubuntu 12.04.2
BCD ID: {cb5d3b5c-df7d-11e2-aee4-a5c82e918538}
Drive: C:\
Bootloader Path: \NST\AutoNeoGrub0.mbr

Craig
10 years ago

Thank you for the tutorial. I followed your instructions to the letter and yet I am presented with a GRUB4DOS screen after choosing to boot from the Ubuntu 12.04 LTS entry created by EasyBCD. The partitions are exactly the same as you’ve set up so I don’t understand. The entry found and added by EasyBCD is Drive C:\ then Bootloader path \NST\AutoNeoGrub0.mbr

delaney
delaney
11 years ago

Now, the question is, how to do this with gpt partitioned drives?

Sophia
Sophia
11 years ago

Hi, could you tell me if this would work with dual booting ubuntu 12.4.2 with windows 8? I get the feeling windows 8 has made it even more difficult.

I managed to get to the ubuntu installation on my computer but it didn’t detect windows 8 OS and so i’m worried this will be a problem later…so haven’t installed anything yet…

Sophia
Sophia
Reply to  Sophia
11 years ago

oh and just to add, windows 8 is already pre-installed

cooldude
cooldude
11 years ago

i partitioned as described(for me i allocated a 25gb from my E-Drive) 25gb unallocated. Then i loaded ubuntu in pendrive. first time installing ubuntu it shows “unusable 25gb” in ubuntu partition list. so switched to win7 to check partition. it was same wat it was already as 25gb unallocated. now i try ubuntu,this time it showing as “C” as dev3 and “D,E,unallocated space” together as dev4. i cannot find the 25gb as free space how to get it to install ubuntu please help me. Thanks for ur help.

cooldude
cooldude
Reply to  finid
11 years ago

used
sda1 reiserfs 1MB unknown
sda2 ntfs 104MB unknown
sda3 ntfs 150GB
sda4 ntfs 160GB

cooldude
cooldude
Reply to  finid
11 years ago

is there any way to solve it? i still remember last december i formatted my entire hard disk and installed freshly win7. when i google for reiserfs i found its belong to linux. can i delete it and try ubuntu? why i am asking tat because tat 1MB is not listed in win7 disk management.

Namo Narayan Meena
11 years ago

When I have tried to install in the same fashion, I have received an error

“No root partion is defined.Please correct this from the partitioning menu.”

I am not able to understand it, though I have 66Gb free space for ubuntu 12.04.1 installation. Previously this kind of error never comes. Is there any hardware issues or somthing else.

PC Configuration:
350Gb HDD
AMD Phenom(tm)II X4 B97 3.2Ghz Processor
4GB Ram.

HELP ME Plzzz.

Bill
Bill
11 years ago

Thanks for the tutorial. It’s a great basic guide to the installation of a dual-boot.

Most people run into problems with a UEFI system, though, possibly because of an issue that wasn’t mentioned in the article: you’ll need to get the Ubuntu 12.04 64-bit edition, and choose the UEFI option when booting from the live CD.

I can’t personally vouch that this solution works yet, since it’s late and I’m going to try it tomorrow and let you know how it goes.

This is the link to the explanation: http://www.linuxbsdos.com/2011/09/18/guide-to-disks-and-disk-partitions-in-linux/

Hope that helps.

Dirceu
Dirceu
11 years ago

Does the boot partition need to be of a primary type?
I tried the installation procedure on my Sony laptop. There are MANY partitions for laptop recovery, and other purposes. When I tried to create the first Linux partition, the boot one, it game me no option to create it as a primary one. I went ahead with the other partitions, and directed GRUB2 to be installed at /boot partition. In the middle of the installation, program reported an error – not able to install into the /boot partition, asked me to select another one. Obviously, I selected to abort the installation…
Any clue how to get out of this problem?

Dirceu
Dirceu
Reply to  Dirceu
11 years ago

Sorry about replying to my own msg – more information: I went back to my win7 disk manager, and there I can see the boot, root, and swap partitions all reported as primary partitions, as follows: 477MB primary (boot); 111.76GB primary (root), and 3.73GB primary (swap).
The interesting thing is that all 4 win7 partitions, as well as 3 linux partitions, are reported as primary. I thought there could exist only up to 4 primary partitions…
Comments?

Dirceu
Dirceu
Reply to  Dirceu
11 years ago

One more piece of information: I went back to Linux installation partition tool, and the volumes shown are not cleanly named as /dev/sda3 (for boot partition), but rather:
/dev/mapper/isw_cagijcdieh_Volume0p6 (ext4)

I also noted that the tool no longer show any mount point…

Dirceu
Dirceu
Reply to  finid
11 years ago

12.04 amd 64bit edition. My laptop has a win7 64bit installed. HDD SSD 512GB. I have shrunk win7 C drive to make room for 120GB unallocated space…
What does /dev/mapper mean? I confess I did not like it when I saw that…

Dirceu
Dirceu
Reply to  finid
11 years ago

OK, my problem is that I have a RAID as HD. I guess I need the alternate iso version…
You would not have a version of this tutorial for RAID disks, would you?

Dirceu
Dirceu
Reply to  finid
11 years ago

I guess the differences in installation are in the disk partitioning/creation of the /boot, / and swap areas.
In “alternate installer land”, after “Detect disks” step, when I select “Activate Serial ATA RAID”, I get the following as the reading of my ATA RAID device:
Serial ATA RAID isw_cagijcdieh_Volume0 (stripe) – 512.1 GB Linux device-mapper
#1 primary 22.1 GB ntfs
#2 primary 367.0 MB B ntfs
#3 primary 355.2 GB ntfs
logical 125.8 GB FREE SPACE
#5 logical 8.6 GB

So, I assume linux device mapper is able to coherently read my ATA RAID disks. Shall I then just select free space, and start adding partitions just as in the tutorial?

Anyone has done that before?

Dirceu
Dirceu
Reply to  finid
11 years ago

Quick update. I was able to create /boot, / root and swap partitions using alternate installer on my RAID0. However, installer reported a “Installation step failed” under “Select and install software”. It then offers the option to continue…but I decided to abort the installation.
Does anyone know whether it is safe to skip “Select and install software” step, and proceed with the installation?
I also headr that during “GRUB installation” step, one is not offered the choice of NOT installing in the MBR of Win7 by the alternate installer…Can anyone confirm this?
THanks

Dirceu
Dirceu
Reply to  finid
11 years ago

I went after system messages during alternate installation. There are many error messages, and most of them related to “not finding” a particular folder supposed to be mounted in the RAID0.

So, I am bailing out. Will try next to run Ubuntu inside a VM on that machine, with all potential limitations.

Thanks

dirceu
dirceu
Reply to  finid
11 years ago

Last update. After using alternate installer disk partition on the Vaio machine, I tried to expand back Win7, and FAILED.
I had to reimage the OS back to factory condition, or else I wuld have wasted over 100GB of SSD HD – not good.
So, dont try this – wait until Ubuntu installer is able to deal with Intel Fake RAID used in latest Vaio machines.

Mint
Mint
11 years ago

It is my understanding that UEFI dual boots can only work with 64-bit versions of Ubuntu. I tried 64-bit Mint with no luck. I’m now going to try again with Ubuntu 12.04 64-bit and see how it goes.

If 64-bit is required, I recommend you clarify that early in the tutorial.

Mint
Mint
11 years ago

I followed this tutorial and received the following error when trying to boot into Linux Mint…

“Windows failed to start
… [text here] …
File: \NST\AutoNEOGubo.mbr
Status: 0xc0000098
Info: [more text here]

Does anyone have any idea how I can get back on the tracks?

TIA…

Mint
Mint
Reply to  finid
11 years ago

Hi finid, I have an HP P6-2120 desktop computer. It has a 1TB drive.

SDA1 Win7
SDA2 Win7
SDA3 Win7
SDA4 (Nothing here)
SDA5 /Boot
SDA6 /
SDA7 /Home
SDA8 Swap

My current approach is to turn off UEFI completely and install Mint in BIOS mode. I have a question, though. If I do that, do I need to set aside 1 MB for the Reserved BIOS boot area or is that something I should skip? I think I skipped it before and the BIOS didn’t recognize any OS to boot.

I’m afraid to try it for fear it might mess up the Win7 bootloader – even with UEFI turned off.

TIA…

Mint
Mint
Reply to  finid
11 years ago

finid, it just dawned on me that I didn’t follow your tutorial to the “T”. I partitioned with Miint Live CD – and that might be why it didn’t work right. I will undo my Linux partitions, expand the Win7 partition and then follow your tutorial to “T”. I’ll let you know how it goes.

Mint
Mint
Reply to  Mint
11 years ago

finid, I’m currently going through the tutorial and I wasn’t able to simply restart and go straight to the LiveCD.

For people with a similar situation, a note that some systems might have to disable UEFI in order to boot into a LiveCD would be helpful.

There is no way that I’ve found that will let me boot into a Mint LiveCD without disabling UEFI – and that includes listing my CD/DVD as the first UEFI boot choice.

I’m going to download and burn the latest Ubuntu and try to boot with that instead. Maybe Mint is lacking the ability to boot UEFI whereas Ubuntu’s latest might have that ability.

Mint
Mint
Reply to  Mint
11 years ago

My attempt with Ubuntu 12.10 failed in similar fashion as well.

I’m wondering if the HP Pavilion H/W and Boot Loader config is to blame.

I’m at a complete loss as how to proceed.

There was a warning about a Reserved BIOS boot area being required, but I didn’t it mentioned in the tutorial and I didn’t go that route for fear of possible damage to the Win7 boot loader.

Steve
Steve
Reply to  Mint
11 years ago

Hi Finid,

Thanks for posting these tutorials.

I got the same error message as “Mint” did (Windows failed to start…AutoNeoGrub0 etc.) after following this tutorial. Got the same one when I first mistakenly followed your BIOS tutorial not realizing what UEFI was.

Trying to dual boot onto an Asus U47VC-DS51 notebook with 750gb.

Does this mean that Mint cannot be dual booted with my machine? Will I have better luck with Ubuntu?

Thanks,
Steve

phalloc
phalloc
11 years ago

great very simple tutorial, i bought a new computer a week ago, and didn’t new about the EFI technology, i ended messing everything up by not booting in UEFI mode, but then i learned how to do it and folowing this step by step all worked out.
thanks!

WorBlux
WorBlux
11 years ago

EasyBCD is not under an open source license and requires a paid license for commercial use.

But don’t despair there are several other options here.

One is to use grub as the bootloader.

Another is rEFInd http://www.rodsbooks.com/refind/installing.html

Another is to use the efi kernel stub and the firmware included boot menu.

Get the latest

On social media

Security distros

Hacker
Linux distros for hacking and pentesting

Crypto mining OS

Bitcoin
Distros for mining bitcoin and other cryptocurrencies

Crypto hardware

MSI GeForce GTX 1070
Installing Nvidia GTX 1070 GPU drivers on Ubuntu

Disk guide

LVM
Beginner's guide to disks & disk partitions in Linux

Bash guide

Bash shell terminal
How to set the PATH variable in Bash
Categories
Archives
50
0
Hya, what do you think? Please comment.x
()
x