Upgrade to a new hard drive, Dual Boot to Linux, and Not Reinstall Anything

by Michael (michael@code4life.com)

My laptop is a year old and the hard drive, although not full, doesn't have enough space to dual boot Windows and Linux. So, I'm going to solve two problems at once. I'm going from 60gb (why was I so cheap) to 120gb (why am I still so cheap). In the process I'll be going from a single os on a single partition to multiple OSes on multiple partitions. There will be four partitions in total:
  1. 1 partition for the existing Vista (or XP) partition
  2. 1 partition for a new Ubuntu installation
  3. 1 small partition for Ubuntu's swap drive
  4. 1 large partition accessible from both os. It'll mainly be for images, documents, music, etc...

Shrink Vista partition

We're going to take an image of the current drive and map it to the new drive. The old drive has one partition containing everything (Vista, programs, and media). Vista will get a much smaller partition on the new drive--just enough for the os and program files. So, the first step is to shrink the drive as much as possible.
  1. run disk cleanup--no need to copy temporary and deleted files
  2. Uninstall unused programs
  3. Move media (images, music, docs, etc.) to an external drive. The media will be moved to a shared partition so both Ubuntu and Vista have access.

Create Images

Download Acronis True Image 11 Home to create an image of the old drive. It comes with a free 15 day trial. I used it for just one day. It's a great product, and I'll probably buy it for routine backups.
  1. Create a backup of the old drive. Save the backup to an external drive if available, and _don't_ do a sector-by-sector backup (that'll backup the blank space too).
  2. Create an Acronis startup cd. We'll boot from the disk and restore the Vista image to the new drive.
Download a Ubuntu linux install CD. I went with the 64bit version for AMD and Intel chips.

Setup the New Drive

  1. Install the new drive
  2. Use the Linux install disk we created--pop it in and reboot. It's a painless install. It found drivers for everything--the intel wireless card, blue tooth antenna, trackpad, video card, sound card, etc, and my laptop sleeps and wakes.
  3. During the install we create the four partitions:
    1. Ubuntu Partition (25gb)
    2. Ubuntu Swap Disk (3gb, which is more than enough for the 2gb of ram. I've only used 100mb so far.)
    3. Vista Partition (35gb)
    4. Media Partition (50gb)
  4. Boot with the Acronis start-up cd and restore the Vista image on the third partition. Don't restore the MBA (the boot record). We don't want to overwrite the Linux boot record. We'll customize Ubuntu's boot loader to dual boot Vista.

Customize Ubuntu's Boot Menu

Reboot. Right now the hard drive doesn't know there's another os, and you'll go straight to Ubuntu. We need to tell the boot menu about Vista. Run the command:

$ sudo gedit /boot/grub/menu.lst


Add an entry for Vista. Remember, partitions start at index 0. If you created the partitions as in step 5 then Vista is on the third partition, therefore add the following lines to the bottom of the file:



title Windows Vista
root (hd0,2)
chainloader     +1

What does it mean?

title Option shown in the boot menu
root The drive and partition of the os. (hdx,y) x=drive, y=partition
chainloader     Start loading from the first sector of the partition

The Old Drive

Here's a simple way to use the old drive.

Back

Add a comment:

Name (optional)

 
Back