Home Pauline Howto Articles Uniquely NZ Small Firms Search
The Road to Freedom
A progressive migration from Windows to Ubuntu for Safety, Security and Savings in Home Computing - part 1

Contents of this page


This is a guide which will allow a normal computer user to improve the Safety and Security of their existing Microsoft Windows XP, Vista or 7 system and enable them to easily make the transition to a Dual Booted Windows and Ubuntu Linux system. With XP coming to the end of its life there will probably never be a better time to shift. It is in two parts - this part primarily covers the Windows activities needed to secure, backup and prepare for installing a dual boot Windows/Ubuntu system and part 2 the installation and configuration of Ubuntu Linux to the point that it has at least the same capabilities as a typical pre-installed Windows system you buy which would typically including a basic set of utility software preinstalled. I am in the processing of extending these articles to the latest systems with Windows 8 and Laptops with Haswell architecture and hybrid graphics techniques such as Nvidia Optimus which presnt new challenges under Linux. It is based on a series of pages started four years ago called Fun with Ubuntu Linux which have generated a lot of feedback on the net. It came about from the interest I generated in a couple of presentations I have given with the title Linux and Open Source

Linux and Open Source
A Real alternative to Windows ?

Or, why settle for Windows when you
can have the whole house for free ?

The presentation ended with some notes on how to improve the security of Windows in a way that made a future transition to Ubuntu Linux much easier. This led me to consider how best to handle the transition based on my own experiences and those people I have assisted.

I started using Ubuntu Linux seven years ago with a dual booted system and found I was using Ubuntu most of the time whilst my wife initially used Microsoft Windows more of the time at home although she has now been converted and has the only machine with only Ubuntu now. Both of us, of course, use Ubuntu entirely for Internet access whilst away from home when we can not maintain the security of a Windows system. The recent experiences of many of our friends has convinced her of the perils of Microsoft Windows and we now both of use use Ubuntu entirely whilst on line. For a while there were still some activities and hardware that we did under Windows, namely scanning of documents and pictures, Video editing using Pinnacle Studio, and backing up our Windows Mobile PDAs - now all are done under Linux. To be fair I still have a couple of Windows programs still in use running under WINE (Wine is Not a Windows Emulator) including an old copy of Dreamweaver MX2004.

The proof of what I have written here will be how we get on with the MSI Wind U100 Netbook which we have just bought is more powerful than a Toshiba Satellite yet only weighs in at 1.1 Kgs - this is entirely used with Linux and I used the information here to set it up. This has been so successful we have bought a second one to replace Pauline's aging laptop - for the full story see Ubuntu on the MSI Wind U100 for Global Communications. Shortly we will be able to report on our experiences with the latest and most powerful laptop hardware as we have a Chillblast Defiant on order.

On the basis that many users will also want to make a progressive transition it seems prudent to look at how to make Windows as secure as possible and take every precaution to preserve ones important data before and as one makes a transition. It is clearly desirable to use software which is compatible with both Windows and Linux and fortunately there are now Open Source applications which are believed to be significantly more reliable, secure and equal in functionality to those from Microsoft - and are free. Most of you know of and probably use the Mozilla Firefox web browser. The Email client Thunderbird from the same stable is, I believe, superior to Outlook Express (now called Microsoft Mail under Vista). Thunderbird has an extension called Lightening for Calendar Event and Task management which brings it close in functionality to Microsoft Outlook. LibraOffice (aka Open Office) is file and to a large extent functional equivalent of Microsoft Office and provides Word processing, Spread Sheet, Presentation and other Office Functions. GIMP is a very powerful but slightly idiosyncratic image processing package which takes a few hours to get used to, after which you will wonder how you did without it. All are available under Windows, Mac and Linux.

I have tried to put together a 'Roadmap' for a progressive transition which at every stage should mean you are more secure than if you had not started and without losing any functionality, the only 'expense' should be the disk storage taken up when you install Ubuntu. It is prudent to spend some time doing background reading, planning, preparing and exploring your system and you will also need a few uninterrupted evenings when you are not up against the clock for when you make any major changes. Even if you chose not to make the final step to using Ubuntu as your main operating system you will have a better understanding and a much better backed up and a system which is much more secure against the many threats. It will minimise the chances of losing valuable information or be out of action for any length of time as well as making it easy to make a transition to Ubuntu, or some other Linux distribution in the future.

I started off writing this as a series of tutorials which ended with a list of things to prepare for the next one - such as from finding and looking up something in the manuals, finding the CDs that came with the machine or making decisions about which way to jump - things that need time to find or brood over in the background. Currently it is not so prescriptive but I still identify the main periods of activity which are best not interrupted and keep them to four or five short evenings (1.5 - 2 hours).

Costs should be low as all the software is free but you may want, or need to, get some hardware which will enhance your existing system as well as make it much easier to get set up on Ubuntu. In fact many of you will already have the most important items. Firstly a ADSL Firewall Router with Wifi should replace any old USB modems from your broadband supplier (£20 generic -> £50 big name from, Dabs) and secondly a pocket sized backup hard drive . The hardware firewall in the first will give enhanced protection over a software one when you are using Windows, especially if you have or plan to install a home network. The second gives the space to quickly and easily back up you most valuable data such as you pictures, if it is slow or complicated it does not get done often enough or at all. You may well have and use both already.

In practice backing up and planning for problems, whether hardware or viruses and other malware is an important part of the preliminary activities and arguably the most valuable if you do not precede any further. This guide covers not only the hardware you may consider to improve backing up and security but includes how to obtain and configure software to make regular backups of your system to CD/DVD. It covers partitioning your disks, whether used under Windows or Linux to you improve your chances of retaining data in the case of a major system crash or malware infection. It covers how to download, check and install an Ubuntu Dual Boot system. Finally it covers how to set up the Ubuntu system to use free software to support activities that are not included by default because they use proprietary software. This will give familiarity with installing software in general and an introduction to the advantages at times of a terminal over a Graphical User Interface, although it may be the only time you use it! A rough outline of what I plan to cover is:

Outline of Activities

But first of all a contentious area - I have to assume a certain level of familiarity with a computer otherwise you will have difficulty in understanding, following and doing some of the activities. The following is not prescriptive but I would expect to at least you to be familiar with say 80% of the following if you are going to change operating system. If not it will take longer and you might need occassional help from somebody.

What you should be able to do or conceive of doing before you start


I am not counting this as one of the evenings as it is really the preparation for the first real evening. It is a checklist of what you have and a potential shopping list which will take time to implement before you start. It covers many the things you know you ought to have done long ago!

Checklist of things you need to know and have available before you start towards a dual boot Windows/Ubuntu system:

Evening 1

Overview of changes to Windows to enhance security and compatibility

  1. Load and use Mozilla Firefox as a browser (if you have not already made the transition)
  2. Read the Discussion of Email systems
  3. Load and transfer settings to Mozilla Thunderbird for your email (if you have not already made the transition) See below
  4. Add Lightning to Thunderbird to provide Calendar and Task management support.
  5. Obtain and set up an ADSL Router with integral firewall [and Wifi if you have a laptop] for Broadband access (if you have not already made the transition)
  6. Write a backup plan and implement it.

1. Load and Configure Firefox

2. A Discussion of Email and Contacts and their transfer

Email is an important part of use of the internet, arguably second only to browsing. It is also an area where many people want to maintain information, not only in the Address Books and Contacts Lists on which people increasingly depend, and also in maintaining an audit trail of the Email communications one has sent and received. The problem is that this information is not in a simple form like a list of documents that can be opened, it is all mixed in with the settings for the programs in files or databases which are almost total opaque and incompatible between programs such as Outlook Express, Outlook, Thunderbird and Evolution. As you would expect there are no provisions in Microsoft programs to import from non Microshaft alternatives. Mozilla Thunderbird however is much better and does a first class job of importing mail, contacts and accounts from Outlook and Outlook Express. Likewise Mozilla Firefox imports favourites, history and cookies from Internet Explorer. The Mozilla programs have almost identical 'stores' for there information called profiles under all operating systems so a transfer from Windows to Linux and vice versa is quite easy. In fact, under some conditions, it is possible to have a single profile accessible from both systems so you can move backwards and forwards.

Before getting to details of transferring emails etc it is worth looking at how the main email systems work and how that can also help us in our transition.

Email System Considerations - IMAP versus POP mailboxes (Background reading)

POP Mail: Most people understand how POP (Post Office Protocol) mail works, the incoming mail is delivered and held on a server at your Internet Service Provider (ISP) and, in the simplest case, you download it to your machine on demand (usually called a Send/Receive activity in your email package) and it is deleted from the server. This was fine when a user had only one machine in one place. Nowadays many people access email from home, their office, from a mobile and perhaps a PDA. This leaves ones incoming mail fragmented in many places. Most email packages and POP mailboxes therefore allow you to collect your email whilst leaving a copy on the server and many also allow one to just download the headers or a restricted amount of data in each email. This is a much better way of working as the downloads can be done on many machines and the eventual deletion from the server is done on one machine. It does not help with outgoing mail which has to be copied to another account or some other method to allow an audit trail.

IMAP: There is an alternative to POP mail called IMAP which stands for Internet Message Access Protocol. In this case the email is stored on the server and not ever downloaded automatically and one can create addition folders on the server so one can have a complete filing system on the server and available whilst one is online, on corporate systems there may even be shared folders accessible by many users. Email stored on an IMAP server can be accessed and manipulated from a desktop computer at home, a workstation at the office, and a notebook computer while traveling as well as ones phone/PDA, without the need to transfer messages or files back and forth between these computers. In the simplest case data is only transferred as required - when you select your inbox or a remote folder the headers are transfer - when you select an email the message body is transferred and only when you open an attachment is the attachment transferred You can of course copy anything to a local folder on your machine to work on it and when you finally send a reply (whilst online) it is saved on the server and accessible from any other machine. IMAP is at its best when you are on a Broadband always on internet connection - a GPRS/3G connection charged on data transfers is acceptable.

Webmail: This is really not a separate email system but a way of accessing existing POP or IMAP mailboxes directly via a web interface. The email stays in place unless you delete it or download it from a POP mailbox. It is ideal for access from an internet cafe, it is rather like using IMAP but without easy movement to a local folder system for archiving if used alone. Some email accounts are intended for webmail use like Yahoo and Gmail

Implementation: Many ISPs offer the choice of a mix of POP or IMAP mailboxes and in some cases they are common boxes and the access protocols and port number used differentiates there use. Most POP and IMAP mailboxes are also accessible via a webmail interface in an internet cafe or on any friends machine. Even if you do not want to change completely without extensive trials it is worth setting up a single IMAP mailbox so when you are traveling so you can transfer mail from your 'mobile' machines via an IMAP mailbox to you home machines filing system via the IMAP mailbox without worries about the incompatible local mailbox and folder formats. You can also tidy up whilst traveling whenever you get a fast WiFi data link in an internet cafe. I do not feel comfortable solely depending on a remote server to store my emails long term but for a few months between archives it seems a very sensible way to proceed. With a GPRS/3G connection where one pays for data transfers rather than time online, it seems a very economical way to operate and most email packages allow one to download selected local copies for offline working as well as remote copies.

Some cautions: Both POP and IMAP protocols are define by RFCs but the implementation by email packages may not be rigorous when it comes to some of the more advanced features. It is possible that POP implementations of features used for leaving emails on the server for a fixed time differ between email packages and may be implemented locally or on the server so if you have different settings or ways those features are implemented between packages you may have a problem. A good way to start investigation is to see if the same mailbox can be accessed by POP, IMAP and Webmail without problems.

3. Install and Configure Thunderbird under Windows (only takes only minutes including importing accounts, contacts and email)

Note: This was written for Thunderbird 2.x and there may be small differences with later versions of Thunderbird

Installing Thunderbird and importing accounts, contacts and email.

Configuring Thunderbird to leave mail on the server and for handling junk

That is it as far as Thunderbird goes but if you are using Outlook you may want to do the same sort of thing to leave email on the server and so you can do everything form each package for a while. It will be under Tools -> Accounts -> View or Change Account -> Change -> More Settings -> Advanced tab and Tick Leave a Copy on the Server. Outlook Express is similar and it is under Tools -> Accounts -> Mail ->Properties -> Advanced tab and Tick Leave a Copy on the Server. There is no provision to do an automatic blind copy back to yourself so you have to remember

Thunderbird also allows you to import Address Books, Mail and Settings at a latter stage by Tools -> Import. This is most useful to update Address Books but there is no easy way back.

Evening 2

Backing Up your Windows System - essential regardless of whether you install Ubuntu.

The ability to Backup the system has always been considered an essential to any system on which our livelihood will increasingly depend in the future. The amount of data involved has increased dramatically - now a minimum size Windows XP system is about 6 Gbytes and Vista several times that. Our photographs from the last 10 years occupy 93 Gbytes and Audio 42 Gbytes - videos are not practical to back up and occupy some 750 Gbytes plus a lot on the original media (Video8 and DV tapes).

All our machines came with or have had a DVD writer added and CDs and DVDs and were the main backup media. In the last years pocket sized USB drives have become affordable and have a capacity of 640 or more Gbytes are common and have now become our main transfer and backup device for Pictures and Audio away from home whilst at home we try to keep multiple copies on different machines by copying over the network.

Backups to CD in the days of Windows 95 and 98 was either by simple dragging of the folders to the CD in Windows Explorer or by use of the Windows Backup program which allowed one to also backup the registry and compresses the files to save space. These days the programs provided are less useful and copying to CD/DVD is not easy for the backups of system files as they are buried in the file system and many files lock up copies as they are in use. Many files are also hidden so it is easy to miss them.

There are lots of commercial CD/DVD writing programs such as Nero but they are now huge and difficult to understand, as well as costly. Usually a cut down version of a CD/DVD writing program is included when you buy a computer with many facilities disabled until you pay up. I am currently using a freeware program called ImgBurn which has most of the facilities I want to be able to do a backup of enough of the Windows system to be able to extract the critical data if a complete system rebuild is needed because of a hard drive failure, crash or virus. If you download Imgburn make sure you do not end up with other programs which are heavily advertised and have seductive links.

Considerations for Rebuilding the system

Consideration has to be given on how to rebuild on another machine or from basics if the system is corrupted. This involves archiving (backing up) of all the valuable documents, the program sources needed to restore the system and copies of the special configuration files (templates, fax covers etc) - in other words everything which has not been installed so it can safely be loaded into another machine. It is clearly easier to do this if the Folder Structure is set up with this possibility in mind. My Documents has therefore been augmented by several more top level Folders. Following the nomenclature of Windows XX they are called My Programs, My Backups, My Teaching, My Web Site, My Images and My Pictures. Between them they contain all our documents and the files needed to rebuild the system.

The Folder Structure I use

I do not suggest you copy this exactly as your needs may be different but it is a good starting point. These folders containing all the documents and copies of information needed for rebuilding are very much more secure if stored on another drive, preferably a physically separate drive but even a different partition improves ones chances against malware and they are less likely to be damaged in a system crash. On all our laptops they are all on a separate partition and on the desktops I have added extra hard drives so they are on a physically different drive to the Windows system. My Pictures is divided into subdirectories by year which just fit a DVD and My Audio is also subdivided. My Video is on a separate large drive with a NTFS file system to give high speed and to be able to hold files over 4 Gbytes in size - it is so big as too be unrealistic to back up other than [selectively] to a hard drive.

Should anything else be backed up?

For a few weeks make a conscious effort to think about the importance need for a backup of everything you do and use - the spell check dictionaries, lists of favourites, the templates and the data and configuration of all the applications and make sure they are being backed up. You may have to change where applications such as financial packages store data to ensure they are covered or include extra directories in your weekly backups.

Most of the settings one may need to use to restore a machine are specific to a user and are contained somewhere in the subdirectories under C: Documents and Settings/yourusername/Application Data. If you have not separated where you store your documents then they will be in C: Documents and Settings/yourusername/My Documents and another important folder which needs saving, namely your desktop, is at C: Documents and Settings/yourusername/Desktop and several other folders used by Microsoft live at this level. It is therefore very sensible to back up C: Documents and Settings/yourusername/ rather than look for the current location for every dictionary, address book, email folder, set of cookies, favourites and other configuration settings separately. This backup will be too big for a CD but should fit on a DVD if your Documents, Audio, Video and Photographs have been moved to a separate drive as recommended above.

Backup Programs

There is a Windows XP backup facility - have a look at Windows XP Backup Made Easy which is a very sensible article by Ed Bott, Microsoft Press Author and Expert Zone Community Columnist.

In Windows XP Home Edition, this tool has to be installed manually from the CD-ROM, whereas in Windows XP Professional, this tool is installed by default. To load in XP put the CD in your drive - if it does not automatically open then get to it via My Computer

Note: Some OEMs such as Compaq, DELL and HP don't ship the Windows XP CD nor they include the NTBACKUP utility by default. You can try googling for "NTBACKUP.MSI download" or try downloading from http://www.winxptutor.com/ntbackup.msi - if I download files without really knowing their pedigree I try to get two or more copies from different sources and compare them.

Ntbackup normally writes to a file which should be on another (removable) drive or you should copy it to a CD/DVD. It has a clever way of copying files which are in use called Volume Shadow and has a mode in the case of XP Pro where it is possible to do a complete restore in conjunction with the Windows XP Pro CD but I have never tried it.

The Backup Timetable

Every Month and before major software changes in the system or partitioning disk drives:

Every Week:

Between other backups:

The media (or names on a disk) should be cycled through in order and some archived for much longer just in case you need an audit trail or you accidentally erase something and do not find out until the next quarter or even year when you need it. The Drive/CD/DVD capacity should be sufficient to hold a Data files backup and a series of Incremental Backups. One recent copy of the most important data must be held at a separate location in case of Fire, Flood or Theft.

CD/DVD writing Programs - ImgBurn

A very good way to back-up is to make regular copies to a DVD. I have finally found a free and flexible CD/DVD burning program for Windows XP and Vista - you do not want to expend a lot of money on time expired operating systems . Many machines have a 'Lite' versions of a CD/DVD burning program installed, often from Nero or Roxio/Sonic but I wanted something more comprehensive. One of my requirements is to be able to make quick backups of machines I am working on in case virus removal or partitioning disks goes badly astray. It is desirable that it is simple to use but it must have the flexibility to be able to back up a system without having to know explicitly the locations of all the important files ie. it has to be able to make a copy of the Documents and Settings folder without falling over because some files are in use, the folder nesting is too deep or file names too long.

In addition I wanted a program to tell people about for making LiveCD disks from ISO images for Ubuntu Linux and Disk Partitioning and to be able to verify the downloads and burning using the md5sum checksums which are provided these days with many large downloads. It seemed strange to be looking for Windows software to help people make the transition to Linux.

The search proved more difficult than I expected - the main recommendations I found doing Googling did not satisfy all the above or did not run under Vista and in some cases did not seem to work on my system at all. I finally found ImgBurn which does all I require yet has a basic interface simple enough to make life easy for newcomers. It will work 'out of the box' for most purposes yet there is the flexibility to set it up for bulk back-up of system folders and files. It has a brilliant idea in the 'drop zone' a small circular 'area' which is transparent and stays in front of all other windows onto which you can drag and drop files/folders from any program such as Windows Explorer to add them to the list of files for burning.

Loosely quoting the ImgBurn web site

ImgBurn will handle every current type of drive including CD, DVD, HD DVD and Blu-ray. It is normally entered by a quick start task selector panel has has several 'Modes', each one for performing a different task namely:

ImgBurn supports all the Windows OS's - Windows 95, 98, Me, NT4, 2000, XP, 2003, Vista and 7 (including all the 64-bit versions).

ImgBurn supports a wide range of image file formats - including BIN, CUE, DI, DVD, GI, IMG, ISO, MDS, NRG and PDI. It can burn Audio CD's from any file type supported via DirectShow / ACM - including AAC, APE, FLAC, M4A, MP3, MP4, MPC, OGG, PCM, WAV, WMA and WV. You can use it to build DVD Video discs (from a VIDEO_TS folder), HD DVD Video discs (from a HVDVD_TS folder) and Blu-ray Video discs. It supports Unicode folder/file names, so you shouldn't run in to any problems if you're using an international character set. It's a very flexible application with several advanced features that are often lacking in other tools, especially when it comes to burning DVD Video discs. "

Whilst ImgBurn will work perfectly straight out of the box, it is also very configurable for special purposes. I will give a detailed explanation of the settings I changed to enable me to backup all of the important 'system' files in one go. ImgBurn is periodically updated so the configuration information below may be in slightly different places as versions change and the ImgBurn web site has a lot of advertising. last time the esiest way to find the download was from the top bar where there was alink to download - do not be seduced by any of the adverts into downloading the wronge program!

The web site says that it should also run on Linux if you use Wine. For information, I have tried it under Ubuntu Linux with WINE 1.0 and I only had to change the Interface method to ASPI from SPTI. There are however many good and equivalent programs available with Ubuntu such as K3b so you should not need it..

Setting up ImgBurn for backing up system information:

We need to change some of the default settings to be able to back up system folders because:

Considerations when backing up system folders

  1. Some system files will be in use and should not be saved as they will always be different. Always close all programs especially your email and browser programs otherwise files you need to save may also be marked as in use and not saved or be inconsistent.
  2. The folder depth of nesting in a Windows system exceeds the CD file system defaults which are initially set to give the greatest possibility of being read on every legacy operating system
  3. The file names are longer than the defaults which are set to enable reading on every operating system
  4. You need to back up files which are hidden by the system to prevent accidental changes
  5. You need to be able to back up files marked as system files by the system to prevent accidental changes
  6. You may have files which have no extension if you have received them from a non windows system

Most of these changes do not affect normal operation so can be set the first time you want to save your system and left set from then on.

Setting up ImgBurn the first time

When you start the Imgburn program and select Write Files/Folders to Disk you will find that there are are a number of tabs on the right which need to be set up.

Information Tab (General Tab on some versions)

Options Tab

The first two can be set these once and for all - they are important to make sure you save the system information during backups

Advanced Tab

These can be set once and for all - they are important to prevent aborting in deep directories and long filenames inherent in systems directories but reduce compatibility with older systems such as Windows 95

Verify tick box (not on a tab - on leftat bottom) - normally leave this ticked - the CD/DVD will be briefly ejected and pulled back in and the CD/DVD checked after the CD/DVD has been written. If you are using a laptop you may have to manually reinsert the disk when it asks.

Settings from the Drop Down Menus

In addition some of the most important settings need to be made from the drop down menus at the top and can also be set once and for all.

The above options were last used on version under Vista - the current version is 2.5.7 (May 2012)


Using ImgBurn

It is now time to Add the files and folders you want to burn to the CD/DVD. Use the buttons down the right of the source panel or use drag and drop onto the special area called the drop zone which allows stays on the top - see above for turning on and off.

On the Labels Tab

You should give the CD/DVD a volume label each time which preferably includes the date - so you can find out what is on the CD/DVD - the others do not matter)

When you have created a set of files for a regular backup you should save the project :

When you come to Burn again

You can now use the button at the bottom to start to burn the CD/DVD. If it is rewritable it will check that you want to erase the existing data completely.

Background Reading

Disk Partitioning - Advantageous whether or not you Install Ubuntu (Background reading and a quiet evening to carry it out)

The following background on Disk Partitioning is only a brief summary of a complex situation - it identifies a few of the key words which you will meet.

Disk partitioning is the creation of separate divisions on a physical hard disk drive. On the Windows system which most people are familiar with the C: drive may be a whole physical disk drive or a partition within a partitioned drive. Likewise a drive D: may be a completely separate physical drive or on the same partitioned drive as the C: drive. It is impossible to tell in normal use.

Once a disk is divided into several partitions, directories/folders and files of different categories and file systems may be stored in different partitions.The way space management, access permissions and directory searching are implemented depends upon the type of file system installed on a partition.

The main purposes for partitioning are:

  1. Separation of the operating system files from data (user) files. This makes it easier to recover a corrupted file system or operating system installation. If one partition is corrupted, none of the other file systems are affected, and some of the data may still be salvageable. This is very important in this age of viruses and other malware.
  2. Allowing one to have more than one operating system on a single computer by multi booting. For example, one can install Microsoft Windows, Linux, Mac OS X, and other operating systems on different partitions of the same hard disk using different file systems and have a choice of booting into any of the operating system at power-up.
  3. Raising overall computer performance on systems where smaller file systems are more efficient or by having a dedicated area for operating system virtual memory swapping/paging

The first reason is the most important reason for partitioning a disk if you are using a single operating system. It does not give as much protection from hardware problems as having a completely separate drive but does help considerably if you become infected by malware or suffer a complete system crash and have to reinstall the operating system. It also helps if your system is damaged by a power cut - if you were unlucky and the disk was in use you came suffer a few files damaged which could be ones crucial to the operating system, in the worst case you could have been writing the directory. There are dangers in partitioning for the same reason, a previously damaged file system may be made worse by partitioning and a power outage could be disastrous.

There are three types of partition: primary, extended and logical. A standard PC hard drive can have a maximum of four primary partitions, or three primary and one extended partition. An extended partition is a 'container' for any number of logical partitions. All these partitions are described by 16-byte entries that constitute the Partition Table which is (normally) located in the Master Boot Record (MBR) .

Windows generally needs to start or boot from a primary partition which is usually the first drive on the operating system, the boot drive. This requirement has been relaxed for Windows XP and Vista but is still the best and conventional set up. Linux is capable of booting from a logical partition. The details of which drive is used for booting is in the MBR.

Note - the story is a lot more complex for Windows 8 systems where a different way of partitioning the disk is used called GPT (GUID Partition Table) file system and a different form of interface in the BIOS called UEFI (Unified Extensible Firmware Interface). I will cover that in a future article in this series but in the meantime there is some information on handling the latest systems in my Diary Pages here.

Changes can be made to the partitioning using a partition editor. Careful consideration of the size of the partition is necessary as the ability to change the size depends on the file system installed on the partition. A well known and proven Windows partition editor is Partition Magic - it is however expensive and best for Windows File Systems. A favoured Linux Partition Editor is Gparted which is the one I have used for the most part recently - it handles most file systems including the standard Windows NTFS and FAT32 file systems.

Always Check and Defragment your Drive(s) before Partitioning

Always check your disk(s) using the Windows built in utilities before partitioning as partitioning a drive with an already faulty file structure or physical errors may make things even worse to the extent that it can not be used. It is also very important to defragment the drive. As the drive gets full files get split into more and more parts making access slower and the work during partitioning more difficult and risky. If you right click on the drive and -> Properties -> Tools tab you will find buttons for Error Checking and Defragmenting. Both take a while so consider doing them overnight. In the case of Error Checking tick both boxes - if you are checking the system drive the machine will have to reboot and check the drive before the Windows system starts as files would otherwise be in use.

Defragmenting does a basic error check before starting and is best done whilst the machine is not in use- you should disconnect from the Internet and stop all virus checkers and malware detectors or they will check each file as it is joined up and slow or stop the process. Occasional error checks (monthly) are a very sensible precaution and may find and solve problems before they do damage. Defragmentation can lead to a major improvement in performance if the drive is more than half full and it reduce wear on the drive. Note that the drive needs about 15% free space to defragment effectively which puts one limit on the amount of space one can take from a drive when partitioning.

In contrast to the full reports available after defragmentation, there is no simple way to see or save the results of the errors found and corrected by Windows CHKDSK which only appear for a few seconds but for more experienced users try: Start -> Run and type: eventvwr.msc /s , and hit enter. When the Event Viewer opens, click on "Application", then scroll down to the line containing "Winlogon" and double-click on it. This is the log created after running CHKDSK

It is worth noting that Ubuntu automatically does a simple drive test every 30 times it is booted and the ext3 and ext4 file systems it uses do not need separate defragmenting and employe a journalling system which keeps a copy whilst writing is taking place long enough to be able avoid data loss if the power fails or you hit reset.

It is recommended to shrink any Windows Vista, 7 or 8 system partitions using a Windows program.

Evening 3

Using Parted Magic and Gparted LiveCDs (and LiveUSBs)

Gparted is a sophisticated graphical Disk Partitioning tool which runs under Linux. It is accessible using the Ubuntu LiveCD and as a separate LiveCD download from the Gparted site. It is also incorporated into Parted Magic which is the preferred way to proceed although on some older systems the Ubuntu LiveCD may run when there are not enough resources for Parted Magic 3.0.

Parted Magic is a LiveCD which allows one to run not only the Gparted Partition Manager but also gives internet access via Firefox and it contains a number of other utilities. There is a simple file manager accessible via icons for all the drives with a simple text editor to allow one to make modifications to configuration files. There are also a number of recovery utilities which I have not used and require a lot of care, experience and background reading.

There is a section in the next part which explains more fully how to create and run an Ubuntu LiveCD or LiveUSB as well as the information on the sites mentioned here.

Once you have downloaded the LiveCD image and made the LiveCD (or LiveUSB) you need to insert in and start/restart the computer to boot into it. Some computers require you to hold down or press a key to give you a menu of boot choices, the best place to find this information is in your computers user manual or the manufactures website. Common keys to try - Toshiba, IBM and others: press F12 while booting to get to the boot menu and choose CD-ROM or your USB drive. HP, Asus and others: press TAB key while booting and select CD-ROM or your USB drive from the boot menu. HP press F9 or F12 while booting to get to the boot menu and select. The options usually flash up on the screen at the start of the boot process but you do not usually have time to catch it that time!

Older machines will need you to enter the BIOS (Basic Input Output System) often also called CMOS and change the boot order. The most common way to enter the BIOS is to press the DELETE key when the computer is first booted (this seems to be becoming standard). On other systems it could be a different key, or combination of keys like ESC, F1, F2 (Toshiba), F9 (HP) F10, Ctrl-Esc, Alt-Esc, Ctrl-Alt-Esc, Ctrl-Alt-Enter, Ins or even others. You might have to press, press and hold, or press multiple times. The best way to find out the details of that is to look in the users manual or search the manufactures website. Tip: If your computer is a new computer and you are unsure of what key to press when the computer is booting, try pressing and holding one or more keys the keyboard. This will cause a stuck key error, which may allow you to enter the BIOS setup. Once in the BIOS setup you then have to navigate the very basic menus using the instructions at the bottom of the screen until you find the Boot order and change it so that the CD is first - it is rare (and dangerous ) to have a USB boot option here. Then exit saving your change. (you may want to change back after you have finished experimenting as it is easy to leave a CD in the drive).

Gparted is fairly self obvious to use but there are some cautions - to quote: "If you are not very advanced at using Linux or Microsoft Windows, DO NOT MOVE the beginning of your Windows System partition. Repositioning only the endpoint of the partition will minimize the chance of problems and errors. Shrinking an NTFS file system (the most likely one for your Windows system disk) and its partition is a safe operation for GParted, but moving a large partition has proven to be fatal in too many cases. Moving large partitions with GParted also proves to be slower than just backing up the data and creating a new partition instead. It is otherwise easy to shrink partitions, add new partitions with various file systems and in the case of Linux set up the mount points.

There is a good example of how to Reduce the size of a Windows Partition to make space for a Linux system on the Parted Magic Web site.

Note Vista and Windows 7/8 have built in utilities to reduce their own partition which you must use - if you use Gparted or almost any other partition manager you will have to use the recovery CD (if you have one) to rescue your system - see http://www.howtogeek.com/howto/windows-vista/using-gparted-to-resize-your-windows-vista-partition for details of what to do.

Planning Partitioning for Windows with an eye to a future install of Ubuntu Linux

How to Check the Existing Partitioning on the machine

Reducing the size of the existing Windows partition to make space for either just a data partition or for linux partitions is the one activity where there is a finite risk of damage to the Windows system. This is an activity one does not want to repeat so one needs to get it right first time. Adding and deleting partitions is a small risk compaired to shrinking or moving a partition when all the data has to be moved and the directory and file allocation tables all updated. Is it worth it if one is not switching to Linux? The answer is yes as the advantage is that one can reload the operating system without loss of data saved on the Data partition which can also be used for backups and the chances of surviving a malware attack are improved. The new Data partition is the place to store documents and pictures and the whole partition can be backed up periodically to an external drive. I have always made a data partition, sometimes more than one, as soon as I got a Windows machine long before I started the switch to Linux. Doing it when the machine is new and empty is the safest time.

Now we have to decide on how to partition our disk to make best use of the available space, whether just for an extra data partition for Windows or for a full dual boot system with Linux. Even planning for a dual boot system is not too difficult as most laptops have at least a 40 Gbyte drive these days and desktops should never be a problem. Repeating what we said above - a standard hard drive can have a maximum of four primary partitions, or up to three primary and a single extended partition. Windows needs a primary partition to be the boot drive with the operating system and it is normally the first partition on the first drive in the system. An extended partition is just a 'container' for any number of logical partitions.

Linux is capable of booting from a logical partition, so shrinking the primary partition with holds the Windows systems and creating a new extended partition in the remaining space is the best option and affords the opportunity of adding one or more logical partitions for data and a Linux installation in the future. A full dual boot installation with Linux will be the most challenging use of the space so it is best to consider that from the start so we do not have to undo work in the future.

Windows XP needs at least 10 Gbytes by the time all the system restore points, updates and other junk is taken into account so it is sensible to allow about 12 - 15 Gbytes, I have 12 Gbytes on our laptop which is workable. You should also make sure you have several Gbytes free. Ubuntu Hardy Heron uses only 3 Gbytes when initially loaded but again grows with updates, applications etc so again it should have 12 - 15 Gbytes to allow for expansion. The linux-swap file will be another 1 Gbyte. This leaves about 10 Gbytes for a shared Data partition on a 40 Gbyte drive.

The following is a screen shot of Gparted for a laptop that I have just set up which had a 60 Gbyte drive. Both Windows XP service pack 3 and Ubuntu Linux have just been loaded and updated but are at the lower end of the size possible. In contrast my old laptop had a 40 Gbyte drive and after two and a half years Windows XP Professional system was using 9.3 Gbytes before loading the latest service pack. On another laptop Ubuntu Linux 8.04 is occupying 9.0 Gbytes after two years and I have equal sixed Linux and Windows partitions of 11.5 Gbytes. These figures are tiny compared to modern laptops.

Gparted screen

The order for the partitions is chosen to provide the maximum flexibility with the shared DATA Partition between the WINDOWS System Partition and The Linux Root Partition with the Linux-Swap Partition at the very top of the Extended Partition. This means that if you choose to return to only Windows or remove Windows completely you can just increase the size of the DATA partition to fill the empty space. If you do change the size of the Data partition copy it all to an external drive first. With larger hard drives I would split the extra 25% to each operating system and 50% to the shared area up to 20 Gbytes each for the operating systems. I now chose a NTFS format for the shared area as it can now be be read by everything, in the early days it was unreliable under Linux. When it comes to video processing when I would definitely use an NTFS partition as it can handle files over 4 Gbytes in size and on drives of over 160 Gbytes I have a separate partition for Video to reduce fragmentation problems. You can create the ext3 root partition and the swap partition but it is perhaps best to just leave an unallocated area at the top of the extended partition.

If you are just preparing for the future you can fill the space which would be used by Ubuntu by another Windows partition which I suggest is a NTFS one so that can be used for video files and would also be a suitable home if you do a WUBI install of Ubuntu from XP. Then when you come to install Ubuntu you could copy the contents to an external drive, delete the partition and be all set.

A further improvement long term when you come to install Ubuntu is to also create a separate partition for the /home directory. This is where all the user configuration and data files live and enables one to back that up separately and also to reinstall a new distribution of Ubuntu without losing and data and with minimum changes to the configuration of the programs. It is certainly well worth doing if you have a large disk or multiple disks. In the above scenario I would probably add the extra ext3/4 partition for /home directory between the Data and the Linux Root / partitions to give flexibility if it needs to grow. The balance in size depends on where one chooses to put the main data rather than 'settings', if it is only for settings it is best to be small and above the DATA partition, if it is going to be a multi-user machine almost entirely used under Ubuntu it needs to be bigger and probably below the DATA partition. I have covered Moving an Ubuntu Home Directory to a dedicated Partition below and one will see that it is not trivial and there are many advantages in getting it right first time.

Windows Restore Partitions

When you are looking at the Partition layout see if you can identify any Windows Restore Partitions and any other Partitions which the manufacturer of the machine has included for rebuilding purposes that are normally hidden from the user. It is now so complex to reinstall Windows that many manufacturers just provide an image of their original configuration when the machine leaves the factory in a hidden partition and some utilities to also make DVDs copies of this and sometimes also to make copies to DVD of their drivers and Windows system disks. Note them down as you may need to take them into account if and when you set up the Ubuntu system. In particular you will probably want to eventually customise the Ubuntu Boot loader so Windows restore options are also hidden to avoid any accidental reformats of your hard drive! If you have not made any DVDs do so as soon as possible and certainly before you make any changes to the partitions.

The Actual partitioning

All the planning is over and the time has come. I have said a lot of this before but will repeat it as it is important.


Summary of the Achievements in the first three evenings.

You have now finished the Windows section of this guide and if you just intend to continue with Windows you are all set with a system which has separation of Data and System for easy backup and you have all the main tools available.

If you want to continue the Road to Freedom it is time to evaluate and install Ubuntu Linux. This is covered in the remaining two evenings which are in Part 2 of the Road to Freedom - Base Camp

Home Pauline Howto Articles Uniquely NZ Small Firms Search
Copyright © Peter and Pauline Curtis
Layout revised: 11th June, 2015
Settings - opens in a new window or tab Link to W3C HTML5 Validator