Dual-boot Ubuntu 12.04 and Windows 7 on a computer with 2 hard drives

The first partition you want to add is going to be mounted at /boot. This is the boot partition. On a new installation of Ubuntu 12.04, /boot takes up about 35 MB of disk space, but to make allowance for growth that comes with system upgrades, be generous here. A size of 500 MB is the default on most Linux distributions. The default file system is Ext4. Unless you know what you are doing, there is no reason to choose any other. OK.
Ubuntu 12.04 Add Boot Partition

The second partition will be the root partition. The recommended disk space for installing Ubuntu 12.04 is 5.7 GB, which is more than enough, since a new installation takes up just under 4 GB (of disk space). Because resizing a non-LVM disk partition is not a trivial matter, be generous with disk allocation here, too. Be sure to select / as the mount point, and stick with the default file system type. OK.
Ubuntu 12.04 Add Root Partition

Related Post:  StackFolder and KLook integration

For the partition where your home directory will be located, allocate as much disk space as you can afford. Do not skimp on disk space here. More is better. For the mount point, be sure to select /home. OK.
Ubuntu 12.04 Add Home Partition

Finally, the Swap partition. For guidance on how much disk space to allocate to it, see the answer to a question at the Forum. About 4 GB should be enough for most desktop systems. Select swap area from the Use as dropdown menu, then click OK.
Ubuntu 12.04 Add Swap Partition

That should bring you back to the main disk partitioning window, where all the partitions you just created should be listed. Before clicking Install Now, you want to make sure that the Device for boot loader installation is /dev/sdb. Else the installer will be overwriting Windows’ boot programs in the Master Boot Record of sda.
Ubuntu 12.04 Partitions

Related Post:  What I can say about KDE Plasma 5 that I can't say about Windows 8

Towards the end of the installation process, the installer will give you the option to import your data from Windows. Your call.
Ubuntu 12.04 Import Windows Settings

After installation, reboot. If the default boot device is sda, the computer will reboot into Windows 7. Rather than going through the process of installing another application to use for adding an entry for Ubuntu 12.04 in the Windows 7 boot menu, it is better and easier to change the default boot device to sdb. Then on each reboot, you will have the option to choose either Windows 7 or Ubuntu 12.04 from GRUB’s boot menu.

If you would rather not change the default boot device, then download EasyBCD, a free application from NeoSmart Technologies, from here. Follow the instructions in this article to add an entry for Ubuntu 12.04 in Windows 7’s boot menu.


Share on facebook
Share on twitter
Share on pinterest
Share on linkedin

Hola! Did you notice that LinuxBSDos.com no longer run network ads?  Yep, no more ads from the usual suspects that track and annoy you across the Internet. But since I still need to pay to keep the site running, feel free to make a small donation by PayPal or your favorite cryptocurrency.

  • Bitcoin
  • Ethereum
  • Xrp
  • Bitcoin cash
  • Bitcoin sv
  • Litecoin
  • Binance coin
  • Cardano
  • Ethereum classic
Scan to Donate Bitcoin to bc1qzvlte2m224zkayhdc7fdfjkp2rsgt0l5a496ua

Donate Bitcoin to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin

Scan to Donate Ethereum to 0x0F4362DFF77F3Ba0Dc637F5f3Eba35D09a2fA60C

Donate Ethereum to this address

Scan the QR code or copy the address below into your wallet to send some Ethereum

Scan to Donate Xrp to r4ggjvL36njsMCYTkJ3S7cTHscPsMsSGQv

Donate Xrp to this address

Scan the QR code or copy the address below into your wallet to send some Xrp

Scan to Donate Bitcoin cash to qrs0dedzp9t55af3nfwypydghp29r0xguy9s20fz2k

Donate Bitcoin cash to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin cash

Scan to Donate Bitcoin sv to 15K9TLyVDBtLuG9cYvXCX9SSkq9C9oUKHK

Donate Bitcoin sv to this address

Scan the QR code or copy the address below into your wallet to send some Bitcoin sv

Scan to Donate Litecoin to LetJ9QQMb7u2LMZ9Tu6rtHwcBcQFW98fbG

Donate Litecoin to this address

Scan the QR code or copy the address below into your wallet to send some Litecoin

Scan to Donate Binance coin to bnb1ga8trq08ssqepd90v6225nzfgy448pu5pw8gxp

Donate Binance coin to this address

Scan the QR code or copy the address below into your wallet to send some Binance coin

Scan to Donate Cardano to addr1qx2354yw49etstfljpdhwja3ajjlt487lg95vu9ngy2q6vu4rf2ga2tjhqknlyzmwa9mrm997h20a7stgectxsg5p5esq5l7d9

Donate Cardano to this address

Scan the QR code or copy the address below into your wallet to send some Cardano

Scan to Donate Ethereum classic to 0xcD6CC972a2297FcafACDcfE042C55C69516a9264

Donate Ethereum classic to this address

Scan the QR code or copy the address below into your wallet to send some Ethereum classic

Subscribe for updates. Trust me, no spam!

Sponsored links

1. Attend Algorithm Conference, a top AI and ML event.
2. Reasons to use control panel for your server.
3. DHgate Computers Electronics, Cell Phones & more.

Upcoming events

132 Responses

  1. Hi! I know this post is pretty old and you might not follow it anymore, but i try anyway.

    I installed Ubuntu 12.4 as you explained and everything went fine. I’ve set on my boot menu, priority first to the hard drive with ubuntu isntalled, but it always load Windows XP instead(installed in the main hard drive)

    Have a missed something? My Bios is a dual wefi bios.

    Thanks in advance for you help

  2. Hi, I wish I read this article before! My question is…Can I still do this after I installed 12.04 on the Slave Drive? What I mean, can I reinstall 12.04 and do it like you have in the article. What I would like is for the computer to do is boot to Windows Vista first. Right now it boots to 12.04 unless I dont choose it to before the 10sec. run out. The first time I installed 12.04 on the Slave Drive I got this message:error: no such device: 42b5645e-9e24-4551-bdfe-259699182345 grub rescue>

    I was able to repair it and it works fine but, I would still like to boot to Windows first since we share the PC at home and not wanting to confuse anyone at.

    Sorry fot he long question,


    1. You actually don’t need to reinstall anything. Just make the Vista HDD the primary one, then add an entry for Ubuntu in its boot manager.

      1. Thanks for you reply. I do have the Vista as the primary HDD but, it still wants to boot to 12.04 first and how do I add the entry for Ubuntu in the boot manager?

        1. To add an entry for Ubuntu in the Windows boot manager, you’ll have to use EasyBCD, as described in this article.

          Btw, wat type of computer are you attempting to install this on?

  3. Hi,

    I have two drives. Every time I go to install windows, no matter which drive I choose, when I go to install Ubuntu it shows Windows as being on /dev/sdb. How can I force Windows to be on /dev/sda?

    1. I think you have to set the primary boot disk in the BIOS or UEFI utility. Then install Windows on that. When it comes time to install Ubuntu, it should correctly detect that Windows in on sda.

      Do that and let me know if it worked out like that.

      1. Hi- thanks for replying. I don’t have the ability to select primary disks in the BIOS (I am using a Lenovo x230 thinkpad). All I had was an option to “lock” the boot priority order. The reason I must get Windows on sda is because Windows won’t hibernate unless its on sda in a two-disk installation…..

        1. If there’s an option to lock the boot priority order, there ought to be one to (re)set the boot order before locking it. Is your x230 thinkpad one of those with 2 HDDs or 2 SSDs?

          Since I don’t have one on hand, you might want to call Lenovo to ask their help on this, because I doubt that it’s really impossible to change the boot disk order.

          1. Two SSDs. Sorry I should be more clear- I can change the boot order fine- but this does not seem to be the same as setting the primary and secondary drive. I say this because when Windows kept getting relegated to /dev/sdb this disk was the first disk in the boot priority before I installed Windows 7.

  4. I just added a second HDD and created a volume on it but when installing Ubuntu 12.04 only dev/sda is displayed and sdb is not being recognized.

    The second HDD does appear in the device manager and Windows Explorer in Windows 7.

    Any tips?

    1. So you have Ubuntu and Windows dual-booted on sda and added a 2nd HDD to the system. Is that right? If not, explain what exactly you are trying to do.

      1. Sorry about that, here it goes:

        I have a computer with Windows 7 installed on the existing HDD and have added a second HDD, but have not yet installed Ubuntu.

        When I attempt to install Ubuntu from the live CD I get as far as the “Installation Type” screen depicted in your instructions after selecting “Something else”.

        On this page only my first HDD is displayed (sda) and “sdb” is not listed as an option. It does not appear that Ubuntu is recognizing the second drive.

        Thank you for the tutorial and your help!

        1. Todd,

          Did you format your new HDD in Windows? Just plugging it in to the motherboard and power isn’t enough. Check under “My Computer” to see if the new drive appears.

          If not: 1) Go to Control Panel, and in the search box (top right of screen) type in “disk management”.

          2) Select “Create and Format Hard Disk Drive Partitions”

          3) You’ll see a display of all your HDDs. The new one will probably be “Disk 1” and should be shown with a black bar. Right click on the name, and choose “Initialize disk”, then “MBR”.

          4) Now you need to allocate it. If the new volume wizard doesn’t come up automatically, right click on the box for the partition and follow the cues. Format should be quick format, NTFS. You can do the partitioning you’ll want for Linux now, or just leave it as one single partition now, and subdivide later when you install Linux.

          5) OK, check your work: go back to My Computer and verify that you can see the new HDD with the volume label and drive letter you gave it. If so, then reboot the live CD/USB and you should see your new drive.

          4) Now you need to

          1. I need a forum so bad. And I need something in the image and likeness of Stackoverflow. Any suggestions?

  5. Great tutorial! I am new to this and have two quick questions. If I did everything as said in this tutorial but wanted to have a partition within the second hard drive(linux one) that I could access while in windows, how would I do that?

    Second, if I want to have multiple distributions of linux also installed on the second hard drive, would I simply leave extra space and then do these steps with other distro and grub will allow me to select from the 3 OS’s?

    1. To the 2nd question, the answer is a yes.

      If you want to use a partition on the 2nd HDD for Windows, then just leave enough free space for it and create an NTFS partition using that space from inside Windows, though doing that defeats the whole point of using 2 HDDS for this, which is to keep both OSs completely separate.

      Note that you cannot access a Linux partition from Windows, so don’t even try doing that.

  6. Hello,

    I’ve installed Windows 7 on /sda and after, Ubuntu on /sdb.
    If I set in BIOS to boot from /sda, Windows 7 loads up, which is normal. If I set up to boot from /sdb, GRUB appears asking me which OS I want to load. If I go for Ubuntu, everything works fine but if I go for Windows 7, an error appears (“NTLDR is missing. Press Ctrl+Alt+Del to restart”). When Ubuntu was installed I made sure to set as device for boot loader /sdb1 (which is /boot partition). Should it be /sdb instead of /sdb1? Or there’s no difference? Am I missing something here?

    Thanks in advance!

    1. Yes, the device for boot loader should have been sdb instead of sdb1. Not saying that’s the cause of the problem, but you never know…

      So you can log into Ubuntu, type grub-install /dev/sdb, then type update-grub

      You can then make sdb the default boot device, so you get to choose between Windows or Ubuntu whenever you reboot.

      1. I did what you said, but the problem persists. I see the entry for Win7 but it won’t boot from it.

        At the end of “grub.cfg” I found this:

        menuentry “Windows 7 (loader) (on /dev/sda3)” {
        insmod ntfs
        set root='(hd0,3)’
        search –no-floppy –fs-uuid –set D62C67872C67618B
        chainloader +1

        Do you find anything wrong in this entry?
        Thanks a lot for all the help 🙂

      2. I reinstalled Ubuntu with device for boot loader as /sdb instead of /sdb1, with same result.
        I solved the problem in the end using EasyBCD for adding an entry in Win7 loader for Ubuntu’s GRUB.

        Thank you once again!

Comments are closed.

Get the latest

On social media
Via my newsletter

Partner links

1. Attend Algorithm Conference, a top AI and ML event for 2021.
2. Reasons to use control panel for your server.
3. DHgate Computers Electronics, Cell Phones & more.
Hacking, pentesting distributions

Linux Distributions for Hacking

Experts use these Linux distributions for hacking, digital forensics, and pentesting.


The authors of these books are confirmed to speak during

Algorithm Conference

T-minus AI

Author was the first chairperson of AI for the U.S. Air Force.

The case for killer robots

Author is the Director of the Center for Natural and Artificial Intelligence.

Why greatness cannot be planned

Author works on AI safety as a Senior Research Scientist at Uber AI Labs.