LinuxDevCenter.com

oreilly.comSafari Books Online.Conferences.
Sign In/My Account | View Cart   

We've expanded our Linux news coverage and improved our search! Search for all things Linux across O'Reilly!

Search
Search Tips

advertisement


Listen Print Discuss Subscribe to Linux Subscribe to Newsletters

Creating a Dual-Boot Windows XP and Ubuntu Laptop

by Kevin Farnham
05/08/2006

Transforming an XP Laptop into a Dual-Boot XP/Ubuntu Linux System

Notebook computers are generally preloaded with Windows XP, but for those of us who do considerable work in the Linux environment, a Windows-only notebook is far from ideal. I worked with Unix on Windows packages such as Uwin and Cygwin for several years, but I finally decided I wanted a full Linux installation on my notebook.

I started with my aging Toshiba laptop (which had about 90 percent of its 30GB disk filled) and, without losing any data, turned it into a dual-boot XP/Ubuntu Linux system with a shared partition where many of my user files were accessible whether I was using XP or Ubuntu. This made the laptop much more versatile, which is ideal for a developer who works in Linux but must also work in Windows for certain applications or for Windows-based development. A few months later, the monitor on that machine gave out. I bought a new HP notebook and transformed it into a dual-boot XP/Ubuntu Linux system right away.

This article describes the steps I took to complete the dual-boot conversions.

Prerequisites: Disk Space and CDs

As you might expect, a dual-boot computer requires more disk space than a computer running just one operating system. I don't recommend performing an XP/Linux dual-boot conversion with a drive smaller than the 30 GB that my older notebook had. A system with 60+ GB of disk space is a more ideal starting point.

When reconfiguring operating systems on a hard drive, you must be able to boot the system using a CD that has appropriate tools for disk partitioning, file editing, etc. I used the System Rescue CD, a Gentoo Linux 2.4 Live CD with system utilities including QtParted, Grub, Lilo, archiving tools, editors, CD tools, Perl 5.8, CaptiveNtfs, and others. I downloaded the ISO image file using Windows and made my CD using Alex Feinman's excellent ISO Recorder.

I downloaded the installation ISO file for Ubuntu 5.10, "The Breezy Badger," at Ubuntu's download page. Again, I made the CD using ISO Recorder.

Windows Disk Preparations

If you're converting a Windows system you've used for some time, the disk may be nearly full, and the files will likely be scattered across it. To install Linux, you need to divide the disk into multiple partitions. One way to do this is to destructively repartition the entire disk, but then you have to reinstall Windows and all of your Windows software--not a pleasing prospect. A better solution is to resize the Windows NTFS partition, then add new partitions for Linux, Linux swap space, and a FAT32 shared partition.

Because my Toshiba notebook's disk was 90 percent full, the first thing I had to do was remove files. If you're in this situation, see how much space you can free up by:

  • Backing up all critical files (or performing a full system backup if you have capability to do that)
  • Removing Windows software you never use and never plan to use, using "Add or Remove Programs" in the Windows Control Panel or uninstalling programs that came with the software
  • Removing unneeded data files
  • Moving documents, data files, and project workspaces (for example, software development directories) that you can later store temporarily in the new shared partition to another computer
  • Emptying the Windows Recycle Bin

Doing all of these things decreased my Windows disk usage to 10 GB, leaving 18 GB free. However, the files were still scattered across the disk.

Before you can resize the NTFS partition, you must move all files to the "front" of the disk. You can see the locations of files on your disk by running the Windows Defragmenter utility. Go to Start->All Programs->Accessories->System Tools->Disk Defragmenter to launch the defragmenter. Figure 1 illustrates my disk usage after the defragmentation cycle completed.

disk usage after defragmenting
Figure 1. Notebook disk usage after running the Windows disk defragmenter

The files were not as completely packed into the "front" of the disk (the left side of the Defragmenter diagram) as I would have expected. A little research revealed that the Windows Defragmenter applies a less comprehensive defragmenting approach than is available in some commercial programs. I decided to rerun the Windows Defragmenter. After three more runs, my disk usage looked more like Figure 2.

disk usage after four defragmentations
Figure 2. Notebook disk usage after four Windows disk defragmenter runs

This looked adequate. More than half of the disk was available for my Linux installation, Linux swap, and the shared FAT32 partition.

One problem you may encounter in defragmenting a Windows disk using the Windows Defragmenter is "unmovable files" (the green bars) located in inconvenient locations (on the right side of the display, near the end of your disk). The two most common unmovable laptop files are the Windows operating system paging file (pagefile.sys) and the hibernation file (hiberfil.sys), which stores the system state when the XP operating system goes into "hibernate" mode. An easy solution is to temporarily remove these files, then reinstall them after you've resized the NTFS partition. If you need help with this, see my eQuickFixes.com blog entry "Moving the Unmovable: Windows Disk Defragmentation Strategies."

Pages: 1, 2, 3

Next Pagearrow




Tagged Articles

Post to del.icio.us

This article has been tagged:

linux

Articles that share the tag linux:

Managing Disk Space with LVM (74 tags)

Use Your Digital Camera with Linux (60 tags)

mdadm: A New Tool For Linux Software RAID Management (59 tags)

Asterisk: A Bare-Bones VoIP Example (43 tags)

View All

howto

Articles that share the tag howto:

Rolling with Ruby on Rails (258 tags)

From Weblog to CMS with WordPress (98 tags)

Top Ten Digital Photography Tips (92 tags)

Top Ten Mac OS X Tips for Unix Geeks (79 tags)

View All

ubuntu

Articles that share the tag ubuntu:

Creating a Dual-Boot Windows XP and Ubuntu Laptop (17 tags)

Use Your Digital Camera with Linux (5 tags)

View All

windows

Articles that share the tag windows:

Rolling with Ruby on Rails (57 tags)

Best Windows Admin Downloads (54 tags)

The Ultimate Free Windows Toolkit (31 tags)

Inside Samba: Windows Sharing for the Mac (28 tags)

Automating Windows Applications with Win32::OLE (27 tags)

View All

boot

Articles that share the tag boot:

Creating a Dual-Boot Windows XP and Ubuntu Laptop (10 tags)

Using Solaris SMF (5 tags)

View All

Sponsored Resources

  • Inside Lightroom
Advertisement
O'Reilly Media
© 2008, O'Reilly Media, Inc.
(707) 827-7000 / (800) 998-9938
All trademarks and registered trademarks appearing on oreilly.com are the property of their respective owners.
About O'Reilly
Privacy Policy
Contacts
Authors
Press Room
Jobs
User Groups
Academic Solutions
Newsletters
Writing for O'Reilly
RSS Feeds
Other O'Reilly Sites
O'Reilly Radar
Ignite
Tools of Change for Publishing
Digital Media
Inside iPhone
O'Reilly FYI
makezine.com
craftzine.com
hackszine.com
perl.com
xml.com
Sponsored Sites
Inside Aperture
Inside Lightroom
Inside Port 25
InsideRIA
java.net