Tutorials/Tips, Ubuntu

How to dual-boot Ubuntu 12.04 and Windows 7

One tool that has seen very little or no change over the past several releases in Ubuntu Desktop is the installation program. So it is somewhat surprising that some users are having a hard time dual-booting Windows 7 and Ubuntu 12.04 using a tutorial written for Ubuntu 11.04.

Stemming from comments in that article, and email from readers, I decided to revisit that tutorial using Ubuntu 12.04. So the purpose of this article is to show how to dual-boot Windows 7 and Ubuntu 12.04 on a computer with one hard drive. And it will be on a computer with an existing installation of Windows 7. If there is a need to, you may reinstall your copy of Windows 7.

If you want to attempt this on a computer with two hard drives, see how to Dual-boot Ubuntu 12.04 and Windows 7 on a computer with 2 hard drives.

To get started, download an installation image of Ubuntu 12.04 from here. Depending on your platform, you may download the 32- or 64-bit image. Screenshosts used in this tutorial were taken from test installations using a 32-bit installation image in both a virtual environment using VirtualBox, and on real hardware. In either case, I did not encounter any errors that others have reported, so I am certain that if you follow this guide, you should have a computer with both Windows 7 and Ubuntu 12.04 installed in a dual-boot configuration.

So that anytime you reboot the computer, you should see Windows 7’s boot menu with two entries listed – Windows 7 and Ubuntu 12.04 (LTS). Then you may choose to boot into Windows 7 or Ubuntu 12.04.
Windows 7 Dual-Boot Boot Menu

Now that you know what the overall goal is, how do you get from here to there? First, understand that if you have a computer running Windows 7, that Windows 7’s boot manager is responsible for making sure that the system boots. Installing Ubuntu on the same hard drive throws another boot manager into the mix. So the most important decision you are going to make about this, is which boot manager (Windows 7’s boot manager or Ubuntu’s) do you want to be responsible for primary boot operations?

When dual-booting Windows 7 and a Linux distribution on a computer with one hard drive, the best option is to have Windows 7’s boot manager be the primary boot manager. Why? Because whenever you reinstall or update Windows 7, its installer will overwrite anything it finds in the portion of the hard drive where critical boot-related programs are installed. That portion of the hard drive is known as the Master Boot Record (MBR). Also, certain anti-virus programs have been known to mess with the contents of the MBR, so installing GRUB in another location will ease the maintenance headache associated with your system. This point determines where GRUB will be installed.

Related Post:  Casino Life: Games that exploded on the App Store

If you are not familiar with disk partitioning (in Linux) and dual-booting, it is highly recommended that you read guide to disks and disk partitions in Linux and tips for dual-booting Windows and Linux.

By default, a new installation of Ubuntu 12.04 is installed on two partitions – a main partition, and Swap. The main partition is usually a primary partition and the Swap, a logical partition. And if Ubuntu is the only operating system on the hard drive, you will see both partitions labeled /dev/sda1 and /dev/sda5. Because you are going to install it on a computer with another operating system on it, the partitioning scheme will have to change.

The recommended partition scheme that will work better with the system you are about to install will have at least three partitions. They are the:

  • Boot partition – This is where GRUB will be installed, instead of in the MBR. Installing GRUB in the boot partition is where users have encountered errors, so pay particular attention to what you do with this partition
  • Root partition – This is where all the programs will be installed
  • Home partition – This is optional, but it helps to have your files and folders on a separate partition
  • Swap space

I think what you need to do should be pretty clear now. Time to begin the process! If you have not done so already, burn the installation image (of Ubuntu 12.04) you downloaded to a CD or transfer it to a USB stick, and boot the computer from it. When booted from the CD, you will be given the option to boot into a Live Desktop or start the installation without visiting the Live Desktop. It does not matter which option you choose, but booting into the Live Desktop and starting the installation from there seems to be a very good choice.
Ubuntu 12.04 Live Desktop or Installer

Related Post:  How to backup your Linux files to an Amazon S3 bucket using CloudBerry Backup

Whether the installation process is started from the Live Desktop or not, clicking through the installer gets you to the step shown in the image below. The most important information here is the minimum disk space (4.4 GB) recommended for a successful installation of Ubuntu 12.04. That piece of information will help you determine how much disk space to allocate to the root partition.
Ubuntu 12.04 Installation Requirements

Clicking Continue from the previous step will land you here. If, as in this example, you have Windows 7 installed on the target hard drive, you should see the same three options shown here. Because you will be creating partitions manually, the option you want to select is Something else.
Ubuntu 12.04 Partition Options

That should bring you to the Advanced disk partitioning tool. Again, if we are operating from the same point, that is, if you have a default installation of Windows 7 on the target hard drive, you should see two ntfs partitions (/dev/sda1 and /dev/sda2) listed. The main Windows 7 partitions, also popularly known as the C drive, is your sda2. To install Ubuntu, you will have to resize that partition. Note: If have free unallocated space on the hard drive, you do not have to go through this partition resizing process. To resize the partition, select it and click the Change button.
Ubuntu 12.04 Advanced Partition Tool

That should open this window. The only thing to do here is tell the installer how much disk space you want to keep for Windows 7. The rest will be used for Ubuntu. The system used for this tutorial has about 324 GB of disk space. I chose to keep 100 GB for Windows.
Ubuntu 12.04 Partition Resize

So the window now looks like this. Click OK.
Ubuntu 12.04 New Partition Size

After the partition has been resized successfully, you should see the freed space marked as free space. Select it and click Add to start creating partitions for Ubuntu 12.04.
Ubuntu 12.04 Unallocated Partition Space

Subscribe to LinuxBSDos.com

Subscribe to receive the latest articles in your Inbox

I agree to have my personal information transfered to MailChimp ( more information )

Trust me, you'll not be spammed...

Please share:

We Recommend These Blockchain Conferences and Servicess

Register now for Blockchain & Decentralized Tech SuperSummit, international conference on blockchain technnology in Dallas, TX (USA), October 30 - November 2, 2018

Learn how to trade cryptocurrencies profitably using technical and fundamental analysis at BDT SuperSummit

Best binary auto trading software reviews by 7binaryoptions.com

Launch an SSD VPS in Europe, USA, Asia & Australia on Vultr's KVM-based Cloud platform starting at $5:00/month (15 GB SSD, 768 MB of RAM).


  1. This worked perfectly. I’m another Windows Power User becoming a Linux newbie. I appreciate the great instructions.

  2. I stumbled across this just before installing Ubuntu 12.04 on a Windows 7 machine. It worked perfectly.

  3. Hi, great tutoria, I tried several times to insall the Studio 12.04 using the method you described. I have a Win7, a WinXP and had a MINT install and all worked fine. No I decided to replace the Linux MINT (Lisa) with the new ubuntu Studio 12.04 .

    While intalling all works fine, till at the very end I get an error called GRUB cannot be installed on de/mapper/isw_bdfdibagjp_Voluime0p5

    I have a raid system, so need to work on that, cannot use dev/sda5.

    You have an idea how to solve that?

    Thanks a lot,

  4. Hi

    Great tutorial – very straightforward. Only frustration was having to go into the windows partition.

    However, for me, it goes to the Windows/Ubuntu choice, and when I select Ubuntu, it goes to the Grub selection where I again must choose between Ubuntu or Windows. Surely there’s a way to go straight to Ubuntu? I suppose you could set that up in EasyBCD quite easily, but this seems a bit round about: go to windows to default into Ubuntu to use the Ubuntu selection menu to choose windows or ubuntu

  5. i did everything according to the tutorial. However the boot menu is totally frozen in windows7. Mouse or keyboard don’t work at all.Any solutions?

  6. I have win7 on a 64-bit machine. Can I install a 32-bit
    Lbuntu system?

    I have a wired LAN with an machine ip number and gateway ip number (= a router’s ip number)
    that i want to use. What do I say to the installer about
    my internet connection during installing, and how do I say it? (I recall it may not ask me anything and assume,
    incorrectly that it can use dhcp.)

    • Yes, you can install a 32-bit Ubuntu alongside a 64-bit Windows 7.

      The installer does need an Internet connection to work, so this is not something you need to worry about.

  7. Installed 12.10 on a new Fujitsu Lifebook with Win 7.
    Used EasyBCD 2.2.
    Get taken through to Grub2 prompt rather than Ubuntu start menu each time.
    Tried Boot-Repair, but that didn’t work.
    Now going to look for another tutorial!

  8. Dude nice tut! However, is there a way to use grub 2 as default startup manager. Whenever I start the computer wp, the normal windows system for choosing which OS to run pops up. After I choose Ubuntu, Grub 2 also pops up and I have to do it again. Is there a way to change this?

    • To use GRUB as the default startup manager, you will have to install it in the MBR, which is not recommended.

      If you do not want to see the GRUB menu after selecting Ubuntu from the Windows boot menu, just edit /etc/default/grub, and change GRUB_TIMEOUT=10 to GRUB_TIMEOUT=0.

      • Wow nice prompt reply! Thanks for the info. Also noticed that your tut looks similar to the one for mint. Is there any difference b/w the two?

      • Hey I tried changing the grub file just like you said, but it looks like I don’t have permissions to do that. I navigated to it using terminal and tried ‘sudo chmod u+w grub’ and that still did not work. How do I edit it?

  9. I am an Ubuntu user!
    What would be a good reason to have both operating systems in a Laptop?
    Assuming one has all the resources for installation, does the computer become inefficient in anyway having both systems?

    • Some users have applications that they run on Windows that may not be available in Linux. And dual-booting gives you the option of testing Linux on your hardware.

      I have found that when new users run Linux in this way for a few weeks, they tend to use Windows less often, as most or all of their computing needs are met in Linux.

      Since the computer will be running 1 OS at a time, the performance is not affected. The beauty of this is that you can read and write to your Windows account while using Linux. See this article.

    • Another good reason is performance: If you are running compute intensive tasks which need to use the latest vector libraries (Intel’s SSE4/AVX for example), it wont work on most virtual machines.

  10. Hi, firstly, great tutorial! I reached a dead end when I tried to download EasyBCD, is there any other sites which offer the download?

  11. thank you very much… helping me a lot.. simple and great

  12. Hi finid,
    Thanks for the great tutorial!
    I was having the same problem some other guys here had with getting stuck in the grub command prompt after following your tutorial (step by step). Im trying to install version 12.10 and my windows drive is partitioned into 3 partitions (OS, Recovery and another very small partition in the FAT format).
    I must point out that i had tried installing Ubuntu before reading your tutorial through the wizard (that comes with the CD) using the “install inside windows 7” option and it seemed to have stopped during the installation (or maybe it succeeded, but i wasn’t even given the chance to set my password or anything…) so maybe this is the problem….
    Anyways since then i tried running boot-repair through the live-CD and now when i restart my computer it first launches a Ubuntu screen that asks me from which drive i want to boot. if i choose Ubuntu it starts loading and says that something is missing (i press skip) and it never finishes loading.
    if i choose windows, it loads to the windows boot up screen asking me which OS i want to boot from (but works fine if i choose windows).
    What could be the problem and what can i do?
    Thanks a lot!

    • i also found these files inside my windows OS drive: AutoNeoGrub0.mbr, ANG0 (and now i see also bootmgr).

    • If yo used the automated mode (install inside windows 7), then GRUB is installed in the MBR, replacing the Windows boot loader. But if you were not given the change to create an account, then it’s doubtful that the installation was complete.


      Reinstall the Windows boot loader in the MBR. If you do not have a recovery CD, try the method used in this article. After that, try reinstalling Ubuntu using this article as a guide.

      • I have tried what you said: i restored the MBR using BCD and then erased the linux partitions using Partition Wizard and then followed this article again and again the installation was unsuccessfull but in a different way… first of all, when i was making my linux partitions my pc seemed to be working very hard and just crashed all of a sudden. then i rebooted it and it kept on crashing even when i tried to access windows. so i waited a bit, rebooted again and windows went up…. i tried the process again, passed the partitioning part and during installation i went to do something else. when i came back the pc was out and i dont realy know if the insallation finished or it crashed during… anyways when i tried to boot through ubuntu after i turned it on, there was a windows message saying something about some failure.
        my pc never crashed on me once before that. what might be the problem? should i try installing a different version or using a different media (such as a usb stick)? or should i just give up and thank god that my pc is still ok?

        • If the PC is crashing using Windows or installing Ubuntu, then there could be something else at play. What are the specs on the PC? Amount of memory installed is what?

          • it is a dell studio-1558 notebook. it has: CPU – i5 M520
            RAM – 4GB
            Im using a single HDD of 500GB and im trying to install the 64bit version of Ubuntu.

          • is it normal for the installation to shut off the pc when it is finished? because from what i see in the installation tutorial at the Ubuntu website it should show a message that it has finished and asks you to restart (not shut it down automatically without asking the user).

          • That is not normal. There is something going on with that PC. Did you get the change to create a user during the installation process?

          • yes… the furthest i have got is to where it displays all the features of Ubuntu after i have completed filling the information. I wasn’t paying attention both times to whether it completed the entire installation after that…

          • Regardless, the PC should not reboot automatically. The installation process does not work that way.

          • any suggestions? (BTW the pc does not reboot, it just shuts off).

          • i have tried installing again but this time from a usb stick (i thought maybe the pc might be shutting itself due to overhitting or something caused by reading from the disc). the installation went smooth and i when it was completed i was given the message to restart…
            after restarting and booting through Ubuntu i was able to access my account and the first thing i did was to update the system. during update the pc crashed again. and when i tried to start ubuntu again it gave me a message that some file could not be found and after a while crashed again. i tried the different boot options in the ubuntu boot loader and in one of them i succeeded to enter my account again and then it crashed again.
            i guess my hardware or something is not compatible with linux?

          • Yep, it might be a graphics thing. Did you buy that lappy with the integrated graphics, or the optional ATI card?

            You might want to try another distro not based on Ubuntu to see whether the box will still crash.

            Try Fedora or Magiea.

          • the ATI card…
            what other linux distribution do you recommend? (im not that familiar with the linux “scene”)

          • isn’t there a simple solution that could be done to fix this behavior of ubuntu on my pc? like tweaking with the GPU drivers? (i have only just seen the distributions you listed, i will try them if nothing simple can be done)

          • before cleaning Ubuntu from my HDD i checked the GPU temperature and it was 97C and gradually rising. i tried installing propietary drivers for my radeon card but with no success (mainly because im new to linux).
            I then installed Fedora (successfully) and although i didn’t experience crashes i noticed that the GPU temperature was about the same (97C and rising). the driver that was preinstalled was gallium 0.4 for radeon RV710 (or something like that). i then tried to install the ATI drivers and there were all sorts of instabilities until i couldn’t even boot the system. For comparison the gpu temp in windows is around 60C and the CPU cores also run cooler…
            I think i will just give up, my hardware is incompatible with any linux distribution.

          • after more than 20 reinstallations i have managed to install ATI’s proprietary driver and get the GPU stable at around 66C. I had to switch to ubuntu 12.04 though because 12.10 is just impossible with my hardware.
            in 12.04 it was very easy installing the right driver (i found it in “additional drivers” while in 12.10 it wasn’t there).

          • That’s nice. If you have the time, why not write an article on how you did it. Make it easier for others with the same hardware.

  13. Dear finid,
    My ubuntu 12.04 LTS was so slow and sometimes non-responsive. So, I decided to re-install it from the CD. It was a successful re-installation, but I came up with a dual boot option problem. The laptop boots immediately to ubuntu, I am not able to get in to (boot to) windows 7. I installed and run boot repair but still I am not able to get the dual boot option that I had before the re-installation of ubuntu 12.04 LTS. Please have a look in the link below ( the boot information), if in case it helps you to find where ( what) is the problem that I am facing.

    Please finid help me, I am really frustrated.

    • Dear Finid,
      Thank you for the clear tutorials.
      I want to install ubuntu only in my laptop, which has windos 7. So, shall I go for ubuntu 12.04 or 12.10, in terms of stability? Would you please also give me some instructions on how to install ubuntu 12.04 or 12.10 only.
      Thank you

  14. Hi finid,

    I burned an Ubuntu 12.04 AMD 64-bit disk and was presented with the UEFI screen with the choice to install or to run as a LiveCD.

    I choose to run as a LiveCD and then I get a blank screen – and that’s the end of it.

    Do you have any ideas why?

    I previously partitioned using Linux, so that would make the partition non UEFI, assuming I understand correctly. However, I used gParted to delete those partitions and extend the Win7 partition. Then I booted Win7 and followed the Win7 partitioning instructions contained in this tutorial.

    Both times – blank screen after 10 minutes.

    Again, any help would be appreciated.


    • UEFI has nothing to do with the HDD, just the motherboard. UEFI is the firmware in the motherboard, just like BIOS, but more advanced.

      Not sure why you are having a blank screen. I’ve been trying to dual-boot Windows 8 Pro and either Ubuntu 12.04 or 12.10 on UEFI system, and I am not having a blank screen issue. Try installing it instead of choosing the run as live desktop option and see what happens.

      • Hi finid,

        I tried to directly install Ubuntu as you suggested with no luck. I did notice a very brief error message between the boot screen and the Ubuntu selection screen.

        It said,

        “error: prefix not set”

        The DVD doesn’t spin when I try to install Ubuntu. I also tried to check the DVD for errors and nothing happened there, either. The DVD doesn’t spin.

        I am using a DVD RW – could that be the problem? Should I burn the iso to a permanent disk?


    • I had the same problem with the blank screen. Try to increase the brightness using the buttons of the keyboard of your screen when the blank screen appear. e.g fn+f3 or fn+f4 depending on your model the keys may change

  15. Hey finid,
    I’ve just installed Ubuntu 12.10 32bits on my pc. I also have windows 7 x64 running on it. when i boot into ubuntu from the windows boot-loader it shows me the GRUB command line and i can’t go any further than this. What can i do?