ubuntu dual boot illustrated site ubuntu dual boot windows 7 maverick meerkat
Ubuntu / Windows Dual Boot 'B'
Edited:  Tuesday, December 14 2010  Document made with KompoZer

This web-page is part of a larger site giving examples of how to install Windows+Ubuntu Linux operating systems 'dual boot' in a computer.  Illustrated Dual Boot HomePage

This web page is about how to pre-partition with GParted and use the Ubuntu 'Desktop' Live CD to install Ubuntu Linux in a computer that had Windows installed in it already.

The example shown here has been tested with Windows 7, and it should work with Windows Vista, Windows XP and earlier versions of Windows too.
This website contains information that is getting out of date and may be  harmful to new computers. The author only has old computers and is not contemplating the purchase of any new equipment now or in the near future. 
The information below should be okay for PCs up to and including Windows 7 era.  The author of this website has no knowledge of Windows 8  computers.

The version of Ubuntu you'll see being installed in this web page is Ubuntu Maverick Meerkat and it is a little different to install than previous versions of Ubuntu. The appearance of the installer has been changed, but the same basic techniques still apply.

A lot of people are still uncertain about how to partition their hard disks. I have made two similar web pages, they both end up with exactly the same installation.

The difference between this web page and my other one is that in this installation the partitioning work will be performed during the installation with the Ubuntu installer's inbuilt Gnu Parted partition editing program.

The other web page shows how to use Gnome Partition Editor (GParted), to partition the hard disc in advance of the installation.  Ubuntu / Windows - Graphical Installation C.

Most experts recommend using Windows own Disk Manager for shrinking the Windows partition from within Windows 7 or Windows Vista. This is not only possible, it is quite quick and easy too.
If you think you would prefer to use Windows own disk manager to resize your Vista or Windows 7 partition smaller to make room for Ubuntu before going any further with your installation you are welcome to.
The How-To Geek has the how-to for that, 'Resize a Partition for Free in Windows Vista'.

There are some limitations and caveats involved with using Windows own Disk Manager to shrink Windows.
For one it requires defragmenting the drive first, and defragging usually takes a lot of extra time.
Secondly and probably worse, the Windows MFT and page files show up as 'immovable files' which the Windows Disk Manager can't deal with. The most you can possibly shrink Windows is half way, (where you bump into the MFT), and that's only if you're lucky enough not to run into stray fragments of page file first.
Thirdly there's also a risk is your hard disk might fail to be recognized by the Ubuntu installer and not appear in the list of disks it's possible to install Ubuntu in.

There's no evidence to suggest that Windows own partitioning software is really any more reliable than any other partition editor but if you damage your Windows system with its own software it's no concern for me or other proponents of open source.
No matter what software you choose for shrinking Windows, I recommend running a thorough file system check such as CHKDSK /R beforehand, repeating until no more errors are found.
You should have a backup copy of all your files stored on some other media, operating system installation DVDs/CDs and installed software disks before using any disk partitioning program.

This website is about how to use open source software so the installations in this site demonstrate the use of open source programs. Both GParted and the Ubuntu Installer's partitioner based on GParted can resize Windows regardless of the state of fragmentation or so called 'immovable' files.

No operating systems were harmed in the making of this web page.

This installation example presumes that some version of Windows has already been installed in the first hard disc and occupies the entire hard disk. Here's a link to a good Windows 7 installation guide, Windows 7 Installation Guide / Tutorial, in case anyone needs it.

The CD used for this installation was made from ubuntu-10.10-desktop-i386.iso, which is downloadable from http://www.ubuntu.com/desktop - free download.
For relevant information, see Ubuntu 10.10 Maverick Meerkat Technical Overview - wiki.ubuntu.com
For a list of all Ubuntu Hashes, use this link, UbuntuHashes.
herman@amd-quad-lynx:~$ md5sum ubuntu-10.10-desktop-i386.iso
59d15a16ce90c8ee97fa7c211b7673a8   ubuntu-10.10-desktop-i386.iso
How to run an md5sum integrity test on your downloaded .iso file (before you burn it to disk).

Why integrity check your downloaded .iso?

Checking the integrity of your .iso in Ubuntu

Checking the integrity of your .iso from a Linux live CD

Checking the integrity of your .iso in Windows

The computer used for this demonstration is one I assembled myself for less than half the price I would have paid for a factory made model with equivalent hardware.
It's a fairly standard computer, nothing too fancy, but it's capable enough to run Ubuntu and even Windows 7 or Vista. It has an ASUS P5QL PRO motherboard, and the CPU is an Intel(R) Core(TM)2 Quad CPU Q8400 @ 2.66GHz. It only has  2x1GB DDR2 800 mhz RAM at the moment, and the graphics cars is a GeForce GTS 250.
My regular Ubuntu installation is in an OCZ Vertex Series SSD which can boot Ubuntu in 3.03 seconds.
I'm leaving uplugged while I'm demonstrating these dual boot installations.

The boot loader I use and recommend is called the Grand Unified Boot Loader, known as GRUB for short.
There is information on GRUB in a special section in this website, GRUB2 Pages.

This installation shows you how to install GRUB to the MBR of the first hard disk.
That means the boot.img will be written to appropriate area in the MBR, and GRUB's core.img will be embedded in the otherwise empty sectors following the MBR.
That's safe for most normal versions of Windows as the boot..img fits in the MBR without altering the 'disk signature' which is important to Windows 7 and Windows Vista's BCD bootloader.
If you have a special Windows installation and there's some reason why you shouldn't install GRUB to MBR you'll probably know about that because you probably paid extra for it. If in doubt, you may optionally want to make a backup of the boot loader code area of your first hard disk's Master Boot Record for safety's sake, just to be sure.
Here's a link about how to back up and restore your MBR (optional), MBR backup and restore.
NEW: I also show you how to make a backup copy of the first track of your hard disk too, (optional).

Super Grub Disc
You may want to take the precaution of downloading a copy of Super Grub Disk in case you have any problems booting after the new operating system is installed.  Boot loader problems are generally easily fixed, but most of the time you need to be able to boot the computer first in order to be able to fix the booting problem. That creates a circular arguement. Super Grub Disk can boot your computer until you get the regular boot loader fixed.

You should always make a backup of at least your most important files before using any hard disk partitioning software.

The first step is to boot the Ubuntu Maverick Meerkat 'Desktop' Live/Install CD.
If your Live CD doesn't boot, make sure you have the boot order in your BIOS set to boot from a LiveCD. If you're not sure how to do that, look at this link, BIOS Page .

This is the first thing you see when the Ubuntu Maverick Meerkat Desktop Live CD boots up.
It's a progress screen, just to reasure you something's happening and to give you something nice to look at while you're waiting.

In this screen we're offered the chance to try Ubuntu out first by booting the rest of the way to the Ubuntu Live CD's 'Desktop' , or finish booting now and go right to the Ubuntu installer.
I recommend choosing the first option, 'Try Ubuntu', unless you're really in a hurry. The advantage of loading the Desktop and trying Ubuntu out is you can make sure everything works okay with this version of Ubuntu and your hardware.
If you choose 'Install Ubuntu' and skip loading the Ubuntu Desktop, you'll save the extra minute or two it takes for the Desktop to load, and you'll have more RAM to spare during the installation too. That could be worth thinking about if you're computer is a little low on RAM, but if is very low on RAM, consider using the Ubuntu 'Alternate Installation' CD instead. This website contains pages with examples about how to use the 'Alternate Installation' CD too.

TIP: Here's a tip for anyone installing Ubuntu in a computer that's a little bit low on RAM. (Less than 512MB).
Try using a partition editor such as GParted for creating a small partition somewhere in a hard disk or USB external disk that you are not planning on using to install Ubuntu in this time. Format it as a linux swap area.
Then reboot your Ubuntu Desktop Live/Install CD. The Ubuntu Live CD will find that extra swap area and start using it automatically and you'll notice a big improvement in the performance of the Live CD.

Here we are in the Desktop of the Live CD.
If you have never tried Ubuntu Linux in your computer before and you have made it this far then you know that your computer is working okay and Ubuntu supports your hardware. You can see that the graphical display is good, try out your sound card, and make sure the internet is working okay and so on. Here's a link for more ideas for things you can do with your Ubuntu Live CD - Ubuntu Live CD.

Before partitioning your hard disk there are a few things you should know, like the 'partitioning rules', and what sort of partition scheme will suit you best.
We don't have room for all that in this page.
Here is a link to another page with some information about that, Help on Partitioning.



If you have your computer plugged in to the internet while you are installing Ubuntu, it can automatically download updates while installing.  Some updates could be bug fix updates and some could be important security updates, so we recommend you enable this under most normal circumstances.

'Third party software' means software that is not necessarily made by the same people as make the main parts of your Ubuntu operating system, but they are necessary to make Ubuntu work better. For example, Maverick Meerkat can play most music and videos immediately after installation. Earlier versions of Ubuntu could only play a few kinds of music and video file types without extra work to enable them the play a wider range of files.

Ultra security concsious people may want to install third party software later or not at all, maybe they don't care about music and videos. Strict GNU fans may decide to abstain from installing third party software for ethical reasons.

If you do enable these two options, you may notice a small increase in the time taken for the installation to complete if you have a slow internet connection. You won't need to do these things yourself later on after the installation is over, so you'll save time and effort in the long run.

 This website has always been about how to specify your partitions manually, (advanced), so as usual, that's the only option we'll be using in this web page.

The other two options,  'Install alongside other operating systems' and 'Erase and use the entire disc' used to be the simpler options. In the past it wasn't  worth bothering to make a web page for explaining them. They were too easy and anybody should have been able to figure out what to do.
Now though, in Maverick Meerkat's new installer it seems like they tried to make them even simpler than simple, but it seems to have backfired and they have inadverently made them confusing instead. I have taken a look at those two options and I have to say I can't recommend them to new users, thanks to kansasnoob for alerting us all to the problems in the following thread, Understanding the new live installer/ubiquity.

'Specify partitions Manually' is the only choice I think people should use for Maverick Meerkat.

The new partition editing Window in the Maverick Meerkat installer is very small and only allows one or two lines to be seen at a time. It's hard to tell which partitions are which here.

The buttons you can see below the partition window here are:
  1. New partition table - will only be available if you select a disc/drive, selecting this will erase everything on that drive!
  2. Add - should only be available if you select a device with free space available.
  3. Change - well, just what it says. This is usually the only option you'll use if you pre-created partitions as previously recommended.
  4. Delete - does what it says!
  5. Revert - should revert any change before it’s been applied if possible. Don’t count on it!
You should always make a backup of at least your most important files before using any hard disk partitioning software.

I have selected the partition I want to work on, it is partition number 2, this is my main Windows 7 operating system partition and I need to resize it to make some free space in the hard disk to install Ubuntu in.

Then I hit the 'Change' button.

After selecting the proper device (/dev/sda5 in this example) you’ll see the following four options:

(1) New partition size
(2) Use as
(3) Format the partition
(4) Mount point

How much do I want to shrink my Windows 7 partition?



Good! My Windows 7 partition has been resized successfully and now I have some free space to install Ubuntu in.

Now I have highlighted the free space and I'm about to hit the 'Add' button to add a new partition in the free space.


I want my new Ubuntu partition to be a logical partition.

I to think about out how large to make my new Ubuntu partition while leaving some spare room at the end for a swap area.


I changed it from '309301' to '307301' MiB in size, so I'll have romm for around 2GB of swap area.

I'm going to leave it set as the ext4 file system, that's the latest in the ext series of file systems and it's the default file system for Ubuntu so it's the one most other Ubuntu users have.
The ext4 file system by Mr Theodore Tso and friends is my favorite file system for most purposes.

Ext4 (and Ext2/Ext3) Wiki -  kernelnewbies

Ext4 How To - kernelnewbies

This will be my main Ubuntu operating system partition, designated with a slash symbol in Linux, '/', (shorthand for 'root file system'.

Some people like to create a separate /home partition, and others like to have a separate partition for almost all of the directories. Personally, I don't think it's necessary these days, and it might become very confusing in a mutiple boot set-up too.
More than one operating system can share the same /home directory, some people like to try that out. I like each operating system to have it's own /home directory, (just my personal preference).


I have clicked on the area of free space I want to use and I'm about to click 'New partition'.


For anyone who doesn't know what a swap area is for, it's like a 'page file', but it's in a separate partition. It is used for a slow lane for the memory, leaving your RAM free for the fast stuff, so the computer works better.
The swap area becomes even more important if the computer has less than about 512 MB of RAM.
Anyone who already has Windows Vista or Windows 7 in their computer already has lots of RAM so they only need a swap area if they want to 'hibernate' their computer instead of shutting it down.
We need a swap area at least double the size of our RAM if we want to 'hibernate' our computer.

It's also possible to install Ubuntu with no swap area, and make a swap file inside the Ubuntu partition later on. That's a good idea because then you can resize it more easily if you decide you want it larger or smaller later on, HOWTO: Use swapfile instead of partition and hibernate - by iva2k

This is how the fields looked like for my new swap area.
I just let it take up the remainder of the hard disk.

Our partitioning scheme is all set up now.

The next thing to do is decide where we want to install the boot loader.

Ubuntu boots with GNU/GRUB, and the most recent versions of GNU/GRUB are very different from the old  'Legacy GRUB'.
GNU/GRUB still comes in three parts the same as always.
The part that goes into the first 440 bytes of the MBR and used to be called 'stage_1' is now called 'boot.img'.
It's role hasn't changed, it's still the first stage of the boot loader, and its job is to point to the second stage, now called core.img.
The second stage which is 'embedded' in the next 48 to 51 sectors or so of the total 62 normally empty sectors in the first track of the hard disk. If youre worried about clobbering something and you want to be particularly careful, you may make a backup of the MBR and first track, refer to this website's MBR Backup and Restore.

The third stage of GRUB, which replaces the old stage2 is called normal.mod, that's the part that lives inside the Ubuntu partition and it can have a large number of other modules attached to it as required.

One of the nice things about the new design of the Ubuntu installer is it's easy to look and see which hard disk and partititon belongs to your new Ubuntu installation in case you forgot.
In this example, it's in /dev/sda6, the 'a' at the end of 'sda' part indicates the first hard disk and the 6 means partition number 6.

The MBR of the first hard disk is the ideal location to install the boot.img and core.img of GRUB.
In the top of the list, /dev/sda is highlighted by default and that's normally the best choice.

Another location for installing GRUB's boot.img which used to be popular was the partition boot sector of the Ubuntu partition. In this case that's /dev/sda6.  Although it can still be done if you insist, this practice is now discouraged. GRUB's core.img cannot be embedded when we install the boot.img to a partition boot sector, and although GRUB will still work with the copy of core.img in /boot/grub, (within the file system), it would need to rely on block addressing to locate it, and that would make GRUB less reliable.
Just look at all the trouble Windows Vista users have when their partition's boot sector is moved accidentally by an ill informed person using partition editor and you'll see why.
Some people still like to install GRUB to their Ubuntu partition boot sector anyway though, especailly if they use GAG Boot Manager for multibooting several GNU/Linux Distros and possibly Windows.

Anyone installing Ubuntu in a removable drive, such as a USB drive, should NOT install GRUB to their first hard disk's MBR, but to MBR in their USB drive instead.

There's no option in this installer to install an alternative boot loader like LiLo.
It's not possible to skip it and continue the without any boot loader at all.
If for some weird reason you need either of these two things, you should use the 'Alternate Installation' CD for installing with and not the Ubuntu 'Desktop/Install' CD.

 It's a good idea to have a copy of Super Grub Disk ready just in case, whenever you're messing around with boot loaders and partition editors.
A full Ubuntu installation in a USB flash memory stick that boots with GRUB makes a great emergancy boot disc too. You can boot the USB Ubuntu and run grub-mkconfig to scan the computer for OSesand add them to the USB's GRUB menu and then reboot. When you reboot the USB again, just select an internal operating system entry and in most cases your operating system will boot, (sometimes not, depending on what the problem is exactly).


This is your last viable option to quit or go back if you have any doubts, if you're sure ............. click on Install Now






Your name as you type it here will be used by programs such as email, so make sure you don't type anything funny here in case you forget and send an email to somebody you need to impress such as a potential emplyer or someone like that.

Your username needs to be in lower casem, no capital letters please.

Your password should be a mixture of letters, numbers and characters and you can change between upper and lower case if you want to.
Here is a link to an easy way to choose a secure password that's easy to remember but hard to crack, password tip.

It might be a good idea to have your home folder encrypted, especailly if you are installing in a laptop, netbook or USB flash memory stick. If you decide to have your home folder encypted, make sure you keep backups in a safe place and try to find out how to unencrypt it to rescue your files in case you might need to for some reason.




When I rebooted, my new Dedicated GRUB menu looked something like this,

 Ubuntu, with Linux  2.6.35-22-generic                
 Ubuntu, with Linux  2.6.35-22-generic (recovery mode)
  Memory test (memtest86+)
 Other operating systems:
Microsoft Windows 7 (on /dev/sda1)

    Use the | and | keys to select which entry is highlighted.
    Press enter to boot the selected OS, or 'e' to edit the
    commands before booting, or 'c' for a command-line.

     The highlighted entry will be booted in 10 seconds.

This is the GNU/GRUB boot screen where we choose which operating system want to boot .
GRUB is fully customizable and you can have fun learning about GRUB, for more info on the GNU/GRUB boot loader, click this link, GRUB Page .

This is the new Maverick Meerkat Desktop.

The installation is all done,  now it's time to start having fun customizing and personalizing our new operating system.
It's a good idea to open up our repositories and get an update, install the software we want, and start configuring, personalizing and customizing our Ubuntu installations.
Here's a link to a page with some information to get you started, Post-install Page.

If you used this installation as a guide for setting up a Ubuntu/Ubuntu or Ubuntu/other Linux dual boot, your /boot/grub/menu.lst file will probably be set up with a 'direct kernel boot' for the other Linux operating system.
I recommend you amend that and change it to a chainloader or a config file boot command so that both Linux operating systems can update their kernels without the GRUB menu needing to be manually updated. Please read the following link, Operating System Entries for Multiple Booting More Linux Systems.

 Here's a link to a very important new websiteUbuntuHCL.org                    
That's the new Ubuntu Linux Hardware Compatibility Site.

No longer do we need to risk bringing our new hardware home after a trip to the computer store with our hard-earned cash only to find that the new hardware we bought isn't usable with Linux.

Help your fellow Ubuntu users by entering details of hardware that you own that you know does work well with Ubuntu so others will know what to look for when we go shopping for new computer parts.

Look in UbuntuHCL.org first to see what other Ubuntu users had to say about a computer hardware item you are considering before you go ahead with a purchase.

This is what my Windows 7 Desktop looks like just to prove to you that it's still okay.

You can expect Windows to run a file system check the first time you try to boot it after it has been resized by an open source partition editing program. That's perfectly normal and in fact, the partition editor itself deliberately induces Windows to do that just to be on the safe side by inserting the 'dirty flag' in the NTFS file system.
Windows will reboot when the file system check has completed, never interrupt a file system check.

That's all for this page. I hope you enjoyed it.