ubuntu dual boot illustrated site ubuntu dual boot windows 7 maverick meerkat
Pre-install Page

Edited Saturday, August 13 2011 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 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.


Preparing to install Ubuntu - things you should do to get ready

1. Preparing For The Install

It is generally recommended for most people (especially if you're new), to take a look at the next three pages of this website and consider taking some of the (optional) steps outlined there before proceding with your installation.

If you know what you are doing and you're in a hurry, you can skip steps 1, 2, and 3 and jump right to step 4, (it's on this page, just scroll down).

Step 1 - Prepare your PC's BIOS to boot a live cd

BIOS Page - Basic CMOS settings in the BIOS to enable booting a 'Live CD' or USB

Step 2 -  Try Ubuntu out by running the live cd to see if you like it and if it likes your computer

Live CD Page - using your Ubuntu Live CD

Step 3 - 'Look before you leap', before installing Ubuntu, learn how to uninstall Ubuntu

Uninstall Page 


Step 4 - Preparing to install Ubuntu - things you should do to get ready

Preparing to Install Ubuntu
Just like most other things you do, it's wise to invest a little extra time and effort to make the right preparations for the job from the start. This can increase your chances of achieving the best results immediately and make things lot easier for you in the long run too.
1) Check how much room you have on your hard disk, and decide how much you need to keep for Windows, and how much for any other partitions you might want. The initial Ubuntu installation will take up at least 1.8 GB of hard disk space without any files or extra software installed.The smallest partition size I have used was 3.0 GB. It was okay for what I wanted it for at the time but it wouldn't be satisfactory for most people's use. Most modern computers have nice big hard drives. At least 10.0 GB is a good size to begin with but if you have the hard drive space consider making it bigger than that.

2) Back up all your data!  Backing up all of your data is the most important thing. Please back up all your data!
You should also make sure you have CDs and DVDs for re-installing your old operating systems and all your added software and drivers for printers and other periferals.
You can always restore your old operating system and data as long as you have everything backed up. If you decide to copy one of these example installs, you will be doing some operations which can result in erasing everything out of your computer if you make a bad mistake or have some bad luck. You need to be confident that you or someone else can easily restore everything back to normal if things should go wrong.
If you do not feel confident about being able to fully restore your system it might be better to wait until your computer skills develop more, or make sure you have someone who does know what to do lined up to help if you need it.
3) Windows CHKSK and Defrag 
I recommend running CHKDSK /R on your NTFS file system before resizing it.
If errors were found and fixed, keep repeating the file system check until there are no more errors reported.
Here's how to run CHKDSK/R,
In a running Windows system, go to 'My Computer', and right-click on Drive C, click on the 'Tools' tab, and schedule a file system check for next time you restart your computer, and make sure both checkboxes are ticked, for a thorough file system check, (Or 'scandisk').
On a broken Windows System,  CHKDSK /R  can be run from Windows or from a Windows Recovery Console. NTFS and FAT32 file system repair and maintenance.

If you're planning on using Windows Disk Manager to shrink Windows with, most people say you need to run the disk defragmenter first. I don't think defragging Windows will do any harm, and it may do Windows a little good.

It's not necessary to defragment Windows before resizing with GParted. GParted can resize Windows just as well regardless of the state of fragmenation, so in that case defragmenting is probably just a waste of time.
According to the Parted Users Manual, you don't need to, 2.4.13 resize - Parted Manual
The ntfsresize documentation says defragging doesn't matter, How to resize NTFS without data loss?.
According to the Linux manual page for ntfsresize it's not necessary,
The  ntfsresize program safely resizes Windows XP, Windows Server 2003, Windows 2000, Windows NT4 and Longhorn NTFS filesystems without data loss.
All NTFS versions are supported, used by 32-bit and 64-bit Windows. 
Defragmentation is NOT required prior to resizing because the program can relocate any data if needed, without risking data integrity.

Geek Girls website has the best how-to I have seen to help you make Microsoft utilities work properly. Look under 'windows guides'-->' windows tools & techniques',-->' why defrag?', and see especially where it explains step by step: efficient defragging. I use this method all the time for running either scandisk or defrag.  It really works great! (And saves a lot of time too).
... or just boot into 'safe made' by pressing your F8 key during boot-up and run your defrag in 'safe mode'.

* Here's another tip I have read about concerning the degragging of Windows.  This is optional, and is not really necessary for most computers unless you have already had problems resizing.
Windows has a thing called a 'page file'. This is kind of like 'fake' memory. It's for when your real memory is getting a bit full. It's kind of a 'slow lane' for memory. It works by writting slow moving memory stuff temporarily to the hard disk  leaving your real memory available for the 'fast lane' stuff. The 'page file' shows up as a big green unmovable block in the defragmenter.
 It might be a good idea to get that out of the way too, before defragging the partition.
Windows XP: Just turn it off in 'Control Panel' -->'System' --> 'System Properties'-->'Advanced' tab -->'Performance, Settings button' --> 'Advanced' tab, 'Virtual Memory',-->'Change', take note of your settings (on a piece of paper), and click the radio button for 'no paging file' -->'Set', 'Apply', 'Okay'.
Then restart your computer and now you can run defrag as many times as you need to, without the big green block in the way.
Windows 7: Turn it off in 'Control Panel' -->'System and Security' --> 'System'-->'Advanced System Settings'-->'Advanced' tab, 'Performance'-->'Settings'-->'Advanced' tab, 'Change', take note of your settings (on a piece of paper), remove the checkmark for 'automatically manage and click the radio button for 'no paging file' -->'Set', 'Apply', 'Okay'.
   (If you do this, don't forget to go back and turn it on again later, after the resizing is over).

4) Make an emergency boot floppy disk or CD-ROM for booting either Windows or your new Linux install just in case of any possible bootloader difficulty.
Super Grub Disk  is free and it's only a small download and it's extremely useful. Take a look at this website's Super Grub Disk Page for more help if you need any.

GAG Boot Manager is another good emergency boot disk, especially for booting Windows with .
To see my GAG Boot Manager Page, Click Here.

For extreme problems booting Windows XP,
Here's the ultimate web-page for heavy duty, hard case Windows XP boot disks and troubleshooting, Click Here. You can also download NTLDR boot discs from this site now and I highly recommend them. These are not for booting Linux with, but they will boot Windows XP in some situations when chainloading from Grub or even Super Grub disk doesn't work.

5) Back up your MBR
If you are concerned for any reason that the Linux bootloader might harm your MBR in some way or clobber something hidden in the first track of your hard disk maybe, you can back up your MBR first, MBR Backup and Restore to see how to use a Linux live CD for doing that. This is optional but it could be important for some computers if there's anything non-standard or special in their MBR and first track.

6) Have your network and internet connections plugged in and other hardware turned on.
(So Ubuntu can auto-detect your network hardware during the installation).
This is not vital, but it does help a little.
7) When doing any kind of partitioning work and installing operating systems, it is recommended that you use a good, dependable UPS unit between your computer and the household electricity outlet. This is particularly important during this critical time, as even a very short power failure or fluctuation in your electricity supply can have unpredictable consequences. 

8) Check your hardware's suitability for the new software 
In any computer
It's a wise precaution to try out the 'Desktop' (Live CD) version of Ubuntu. 
This will help to determine if Ubuntu will work okay  with your computer's hardware.
If your computer runs the 'Desktop' CD well it is a good sign, if not, proceed with caution.
The live CD runs a little slowly in the best of computers, but test whether things like your monitor and sound, keyboard and mouse, network connections and other important things like that will work. Often if one or two things don't work, you can fix them after the install. But if more than one or two things don't work, it might be too much work. Therefore poor live CD performance is an indicator for caution, but does not rule out installation completely.
I have had good installs with a shaky CD drive, but have had to keep repeating the install process several times before 'getting there' in the end. It can still result in a satisfactory installation.

If your computer is a laptop or notebook,  great progress has been made in making Ubuntu suitable for all laptops. I don't think there is any special reason these days to think a laptop wouldn't be supported just because it is a laptop.
You can check to see if your laptop is on one of the supported laptops lists.

If your laptop hasn't been mentioned it doesn't mean you can't install. Just take the same precautions as for a desktop computer (back up your data), and go ahead and take the plunge!

Clean your optical drive lens
Even if a CD/DVD drive can read music and video CDs and DVDs okay you can still have problems with a software CD due to a little dirt on the optical drive lens.

Here's a link to this website's Cleaning the optical drive.

If your installation CD won't boot or freezes part of the way through and maybe ends in red warning screens it could be that you have a dirty CD/DVD drive.
This is another reason why it is important to make data backups before using hard disk partitioning and operating system installation discs.
Just a small grain of dust or oily film on your optical drive lens can cause major havoc and result in something like a corrupted partition table. Normally such dirt is invisible to the naked eye, and this can happen to anyone, regardless of how clean your house and computer is.
Keeping your computer and its surroundings clean is a big help though.

Here are some more links about how to clean optical drives,
Computer Cleaning Guide (and then click on the DVD/CD Drives link)

Cleaning Your Xbox DVD Drive (the principles will work for pretty much any CD or DVD drive).

Smart Computing: How to Maintain Your Optical Drives

Back up your MBR      (Optional)
Some people are a little worried about installing Ubuntu because Ubuntu will install GRUB bootloader's IPL to MBR in the first hard disk unless you specify otherwise. Usually it is best to install GRUB to MBR.
If you want to try installing GRUB to MBR, but you're not sure if you will like GRUB or not, or if you are afraid GRUB might not work properly in your special computer, I have added a how-to in my back-up & restore page about how to use any live cd to back up the IPL in your MBR before beginning an install. (And restore it again later if you want to).
It's quite simple and easy to do, MBR Backup and Restore

Help on Partitioning

The 'Alternate' CD's Ubuntu installer features 'Partman' disk partitioner from Debian, based on GNU libparted.

GNU PartedQTPartedGParted LiveCD and Parted Magic are also all very good disk partitioning programs based on LibParted.

You should only use a good 'Parted based hard disk partitioning program if you're going to install Ubuntu.  Then stick with 'Parted based partition editors.
Avoid mixing hard disk partitioners, (don't alternate between different brands).


The makers of every brand of hard disk partitioning software all recommend users should back up their data before using their software.No matter how safe the disk partitioning software you use is, you still need to back up all your data first.  

Vista or Windows 7 WARNING:

avoid moving the start point of any Windows Vista or Windows 7 partition with any partition editing program.  If the start point of the Windows partition is you will have a problem booting Windows, but this can usually be easily fixed with your Windows Installation CD.

The inbuilt partitioner in the Ubuntu installer is safe, and will resize Windows Vista or Windows 7 partitions from the end without moving the start point.

Uncheck the "round to cylinder" box to avoid moving the start point by accident.
If you're using an older version of GParted, (Lucid Lynx and earlier), just make sure you remove the checkmark from the 'round to cylinders' checkbox before touching any Windows 7 or Vista partitions.
Moving the start point of a Vista/Win 7 partition will make the operating system unbootable and it may require a little additional work to be able to boot Vista/Win 7 again.
You may only resize your Windows Vista or Windows 7 partition from the right-hand end.
Try not to 'move' the entire partition at all.

When using some really old versions of GParted,
the two-headed arrow, indicates a resize operation, and GParted will tell you what it's going to do and you have to confirm it twice before anything will happen.
Don't use the four-way arrow cursor, it indicates a 'move' operation. Don't allow the operation to continue if you applied an operation with the four-way arrow, and GParted tells you it will 'move' your partition. You will be told what GParted will do. You have to confirm it twice before GParted will do anything. Don't agree to move any Windows Vista or Windows 7 partition unless that's what you really want.

If you do really need to move the start of a Windows Vista or Windows 7 partition for some reason, you can fix the problem of not being able to boot anymore merely by booting from the Vista CD, choose "Repair Computer" and the CD will reconfigure the Vista Boot loader for you. If it doesn't work, go to the command prompt and run BOOTREC /FIXBOOT.
That should fix it.

Vista and Windows 7 booting help:  VISTA and WINDOWS 7 - boot errors and how to fix them.

Partitioning Rules
We can have between zero and four primary partitions in each hard disk, or we can have between zero and three primary partitions plus one extended partition.
An extended partition can contain zero or more logical partitions. Logical partitions must be 'contiguous' (arranged in a series).

A partition that has its own entry in the partition table inside the hard disk's Master Boot Record is called a 'primary' partition.
The reason why can't have more than four primary partitions because there are only four 16 byte spaces for partition details reserved in the partition table.

A hard disk divided into the maximum of 4 primary partitions. No more partitions can be added.
They can all be different sizes, and there can be free spaces (gaps) in between.

There is a way to create more than just four primary partitions.
We can make one of them as an 'extended' partition instead of a regular primary partition.
An 'extended' partition is something like an empty box, and inside that we can create one or more 'logical' partitions.
By using an extended type of partition and dividing it up into logical partitions, we can divide a hard disk up into a great number of partitions, many more than just four.

This is only possible if the 'logical' partitions can be 'contiguous' or arranged in a series.

It's okay to make your extended partition first on the hard disk or in the middle of the hard disk.

Something we can't do is place a 'primary' partition in between two logical partitions or the series of logical partitions will be broken and become unusable. Logical partitions are strung together like a series circuit or a chain.
It is okay to leave an empty space between logical partitions, but we can't place a 'primary' partition in between two logical partitions or the series of logical partitions will be broken and become unusable.

For this reason it is best to plan ahead a little and try to make sure we have room to add more 'primary' partitions or 'logical' partitions in groups in our hard disks.
We probably don't want to use up out maximum of four primary partitions too soon, it is a good idea to make an extended partition sometime before we run out.

What not to do:

free space
We don't want to 'paint ourselves into a corner' by 'boxing in' our extended partition by surrounding it with primary partitions.
In the illustration above, the four partition limit is used up. The extended partition is in between the primary partitions. There is free space at the end of the disc, but no more partitions can be created.

What not to do:

free space
In this illustration all four partitions have been made as primary partitions so no more partitions can be made in this hard disk, and there is free space that can't be used.

 It doesn't matter what you do as long as you're thinking ahead, Linux partitions can be 'moved' these days with the latest versions of GParted, but it can be a slow process. They can also be copied and pasted into an equal or larger area of free space, providing the partitioning rule won't be broken in the process.
If you can plan your partitions well to begin with it will save you some time and frustration in the long run.

Windows normally prefers to be installed and booted in a primary partition, but Linux can be installed in either 'primary' partitions or 'logical' partitions, it doesn't matter.

Windows C:
A typical partitioning scheme to begin with would be the simple situation where Windows is installed in a primary partition that takes up all of the hard disk.

Windows FAT32
Ubuntu ext3

Windows with the FAT32 file system and Ubuntu.
Ubuntu makes an ext3 partition for it's main part, or '/' (root filesystem), plus a small swap area. A 'swap' area is like a page file, but it's in a partition.
By default, the swap area is logical but it really doesn't matter.

Windows NTFS
Ubuntu ext3

Windows with the NTFS file system and Ubuntu and an extra FAT32 partition for sharing files.
Linux has no problem writing to NTFS nowadays, but a few users might still like to keep using a FAT32 shared data partition anyway. It allows files being transferred between Linux and Windows to be scanned for viruses. Linux is immune to viruses, but a virus can be accidentally passed from Linux to Windows in certain types of files, so it's best to scan them for viruses first.
There's a swap area at the end of the hard disk.

Windows NTFS
'/ '
/home ext3

A Separate /home install resizes the Windows partition to a smaller size to make room for the Linux partitions.
Then it creates a Linux EXT3 operating system (root) partition (primary).  At first the files in / will only take up about 1.8 GB, but good size for a / partition would be at least 5.0 GB to allow roon for adding software.
It makes a logical EXT3  /home partition, (logical), a FAT32 data partition, (logical), and the remaining space is used as a swap area.

If you find later on that you got your partition sizes wrong, or your needs have changed since you made the partitions, don't worry about it. GParted -- LiveCD is free and only a small download and can do everything you need with all your partitions and filesystems.
It can even move Linux partitions from the start of the partition as well as the end.
NTFS is not a problem, GParted -- LiveCD can create NTFS filesystems too.

Partitioning Laptops

Normally laptops and a few desktops computers too, come with a small 'recovery' partition before the operating system partition.
Normally they don't take up very much hard disk space, so it would be best to just leave them alone.
Please refer to the instructions for your brand and model of computer to find out if you can make or obtain your own Windows Installation Disc or Recovery CD, in case the hard disk's partition table might ever get accidentally corrupted somehow and the recovery partition can't help you.
What not to do:
Never delete a recovery partition or any other partition unless you're sure you will still be able to re-install your old operating system somehow without it.  
What You might be able to do:
  • Ask your computer manufacturer to give you a proper 'Installation Disk' for the software that you paid for when you purchased the computer, as without that you really don't have the software permanently.
  • You may be able to use Partimage in Linux to make a carbon copy of your other operating system and restore it from that image instead, if your other operating system ever needs to be re-installed. 
  • You may be able to go to BartPE website and make a BartePE LiveCD as a Rescue Disk for your other operating system and once you have made that you might be able to use files in your hard drive to further make your own 'Installation CD'.
Your Recovery partition might be given an entry in your new GRUB menu when you install Ubuntu.
If it does, it might not be correctly labelled. You can edit the title for it in your GRUB menu by editing your /boot/grub/menu.lst file in Ubuntu.
Make sure you never boot the recovery partition by mistake. In some computers it will erase and reformat your entire hard disk! At least it might erase and reformat your other operating system.

Windows Default Dual Boot
Windows can normally only be installed and booted in a primary partition, but sometimes it can be installed and booted in a logical partition if it boots through another Windows installation.
For example,
Windows 98
installed originally
'boot' partition
Windows XP,
installed in logical partition
depends on Windows 98 to boot it.
What you should not do if you have a Windows dual boot set up by the Windows default method, is to delete your Windows 98 install to install Ubuntu there. If you do you will also be deleting the files Windows XP needs to boot, which were transferred to Windows 98 when 'XP was installed.
If you do that you will be making a big mistake and I am not sure if it can be easily repaired.
Here is a great link on the subject: Understanding Multibooting and Booting Windows from an Extended Partition  by Dan Goodall.

Windows 98
Windows XP

What you can do is simply reduce the size of your Windows XP logical and install Ubuntu in a logical partition too. Ubuntu will boot just as well in a logical partition, it makes no difference at all.
Also, if all the data is removed and Windows 98 is cleaned up, it can be shrunk to a minimal size and really doesn't take up very much hard disk space at all. The Windows XP partition can be moved with GParted -- LiveCD and that should make a little more room for Ubuntu.

Two Hard Disks

/dev/hda Ubuntu (primary master) (hd0,0)

/dev/hdb Windows (primary slave) (hd1,0)
People wanting to dual boot with two (or more) hard disks should read this great thread and links provided from it on the subject in Ubuntu Web Forums.    Dualboot Two Hard Drives
Thanks confused57 and lha, catlett, Sutekh, shoki, gn2, mingus, bulldog, xpod, Bigbluecat and all other participants for the information in these threads.

It is only a little bit more complicated to use two or more hard disks for installing operating systems on. I have helped users with up to seven hard disks. If they are all IDE or all SATA it is reasonably trouble free. When IDE and SATA drives are together in the same computer it can mean whatever bootloader you use might need a little manual help to get fully configured. That's not usually too much of a problem, it's relatively simple to figure out.

Windows and Linux Multiple Boot Arrangements

The small dark blue partition after Window is a dedicated grub partition. It isn't vital to have a dedicated grub partition, but it can be an improvement in a multiple boot Linux set-up.

I prefer to install each of my Linuxes as a single partition install, all in one 'root' partition. (As opposed to having a separate /home). That way I can multiple boot lots of operating systems without making such a complicated mess of my hard disks. Each operating system is independent. I like things better that way.
The red partition is the swap area that all my Linux operating systems share.
If you are going to try previewing and testing a new version of Ubuntu before it is officially released, there is a smart way to do it.
You don't need any data in it, (keep your data somewhere else), and you want to be able to restore your whole partition in a hurry with most of your added software, settings and updates.
The spare partition at the end of the disk could be used to store compressed Partimage backups of my Hardy test installation. If I get a bad update or try an experiment that causes some kind of severe problems for my Hardy test install and I think it will be too much work to repair it, I can just delete the whole partition.
I can then just restore it again to an earlier state from the Partimage backup. Aysiu has the best web page about how to Use PartImage

Windows and Two Linux With a Shared /home
Windows NTFS
'/ '
'/ '
/home ext3

In this type of partition arrangement two Linux operating systems are sharing a common /home partition, and the swap area. Both operating systems have access to the same files.

Of course, another thing we can do is install more than one desktop in an operating system. I have one operating system that can be booted as Ubuntu, Kubuntu or Xubuntu by selecting a different desktop at login. There is no need to have separate partitions to try out different desktops, just install as many different desktops as you like in the one system. There are many more desktops available.
...but that's a subject for after you install!

For a different discussion on how you can partition your hard disks, please visit Aysiu's
 Plan Partitions web page. Aysiu site features the Desktop CD installer, and Aysiu has a nice page about partitioning schemes there. You should read that one too.

Back to Top