Got a new 500 gig hard drive the other day to replace the 120 gigger I've had for long time. I knew it would be rough replacing my existing hard drive with another one thanks to my dual boot Windows XP and Ubuntu Gutsy configuration, but I wanted to do the deed to learn what was involved. I'm funny that way about computers.
The story that follows is primarily geared toward techies. Other readers may want to leave the entry now, heheh.
Tools used: Ubuntu Gutsy AMD 64-bit CD, Recovery is Possible Linux boot CD, Windows XP Pro original setup CD.
Both drives are SATA drives, and because of the way that the SATA controllers are physically placed on my motherboard, my old drive is seen by Linux as /dev/sda2, while my new drive was /dev/sda1. Since my motherboard BIOS has a setting for which hard drive to boot from, this is fine.
I started by adding the new drive into the system and booting up under Ubuntu. I ran gparted to partition the new drive. Since my original drive was initially formatted as a single NTFS partition, then I added Ubuntu on as a dual-boot, my first partition is the NTFS Windows partition, second partition is ext3 for Ubuntu, and then I have an extended partition with 2.5 gigs of Linux swap space. I mirrored this setup on the new drive, roughly matching the proportions of the NTFS and ext3 partitions but leaving 3 gigs for swap space.
I rebooted the system into Ubuntu Gutsy using the Live CD so I could manipulate file systems "from on high". I can't express how cool Live CDs are to me now. Anyway, I copied the old Windows and Ubuntu data to the proper new partitions using rsync. Here's where I blew it on the Windows side to start with, but more about that later.
I had the presence of mind after reading some other Ubuntu hard drive upgrade stories to find out the uuid of the new partitions and edit both the /boot/grub/menu.lst and /etc/fstab files on the new drive to update their uuid entries with the new partition information. Note for the future: Looking under /dev/[disk]/by-uuid/ you find links to the /dev/[partition] so you can figure out which uuid goes to what partition without guessing. Lost about an hour to guessing on those before I figured that one out.
I rebooted using the Recovery Is Possible (RIP) CD, which I now highly recommend in any Linux user's toolkit. I dropped to a command line from GRUB (type "c") and typed in "setup (hd0) (hd0,1)" to install GRUB into the new MBR and tell it to look at the second partition on the drive for boot information (remember Windows is on the first partition). That went fine.
Then I pulled the old hard drive out of the configuration and booted into Ubuntu Gutsy. Bada boom, bada bing.
Windows wasn't booting right yet, because I hadn't put system information on the Windows partition yet. DOH! So I booted up the Windows XP setup CD, told it to reformat the first partition, and let it start installing off the CD. There's a point partway through the XP installation where it restarts the system to boot from the hard drive and install more off the CD. This was where I pulled the CD out of the drive and booted instead into the RIP CD configuration, because at this point I know the Windows XP system information has been written. I also know that in the process, XP has overwritten the master boot record with its own boot information, so I redid the GRUB setup trick from the RIP CD again and rebooted into my Ubuntu Gutsy configuration. The Windows XP partition mounted as usual because I have it automount on startup in Ubuntu Gutsy, so I rsync'd files from the old Windows configuration to the new one, then rebooted the system into Windows XP. There have been a few hiccups with Windows, notably things like the desktop.ini files showing up all over the place because they aren't hidden anymore, and the recycle bin got corrupted, but overall things look like they're playing well. Why? rsync probably didn't keep Windows file attributes, my attempt at getting at the Windows admin password through an Ultimate Boot CD utility to boot into a Windows XP recovery console mangled some parts of the registry, or both. Either way, I'll probably copy old to new through Windows XP next time.
So the new drive's now running both my Windows XP and Ubuntu Gutsy configurations and I've pulled out the old drive to keep as a spare. The new drive's noticeably faster than the previous one, which is nice. Total time on the upgrade, including headscratching and booboo resolution was about a day. Total work time was probably about 8 hours, most of which was copying files hither and yon.
This exercise has shown me a few things. I have a much better understanding of Linux's hard drive "guts" and where in Ubuntu to look for device and boot configuration data. Ubuntu is easier to migrate than Windows XP. I don't think I have a use for the Ultimate Boot CD anymore, much as I used to like it. Recovery Is Possible is an excellent resource for Linux hard drive upgrades and recovery. Most importantly, though, I now know that I can rebuild my entire configuration from backups if there's a catastrophic meltdown. This last one makes me mighty happy, and I feel like my Ubuntu-fu is almost as good as my Windows-fu now. Am I going to get Vista-fu? I'll try not to for as long as possible. I'll just keep getting mo' better with Ubuntu.
The story that follows is primarily geared toward techies. Other readers may want to leave the entry now, heheh.
Tools used: Ubuntu Gutsy AMD 64-bit CD, Recovery is Possible Linux boot CD, Windows XP Pro original setup CD.
Both drives are SATA drives, and because of the way that the SATA controllers are physically placed on my motherboard, my old drive is seen by Linux as /dev/sda2, while my new drive was /dev/sda1. Since my motherboard BIOS has a setting for which hard drive to boot from, this is fine.
I started by adding the new drive into the system and booting up under Ubuntu. I ran gparted to partition the new drive. Since my original drive was initially formatted as a single NTFS partition, then I added Ubuntu on as a dual-boot, my first partition is the NTFS Windows partition, second partition is ext3 for Ubuntu, and then I have an extended partition with 2.5 gigs of Linux swap space. I mirrored this setup on the new drive, roughly matching the proportions of the NTFS and ext3 partitions but leaving 3 gigs for swap space.
I rebooted the system into Ubuntu Gutsy using the Live CD so I could manipulate file systems "from on high". I can't express how cool Live CDs are to me now. Anyway, I copied the old Windows and Ubuntu data to the proper new partitions using rsync. Here's where I blew it on the Windows side to start with, but more about that later.
I had the presence of mind after reading some other Ubuntu hard drive upgrade stories to find out the uuid of the new partitions and edit both the /boot/grub/menu.lst and /etc/fstab files on the new drive to update their uuid entries with the new partition information. Note for the future: Looking under /dev/[disk]/by-uuid/ you find links to the /dev/[partition] so you can figure out which uuid goes to what partition without guessing. Lost about an hour to guessing on those before I figured that one out.
I rebooted using the Recovery Is Possible (RIP) CD, which I now highly recommend in any Linux user's toolkit. I dropped to a command line from GRUB (type "c") and typed in "setup (hd0) (hd0,1)" to install GRUB into the new MBR and tell it to look at the second partition on the drive for boot information (remember Windows is on the first partition). That went fine.
Then I pulled the old hard drive out of the configuration and booted into Ubuntu Gutsy. Bada boom, bada bing.
Windows wasn't booting right yet, because I hadn't put system information on the Windows partition yet. DOH! So I booted up the Windows XP setup CD, told it to reformat the first partition, and let it start installing off the CD. There's a point partway through the XP installation where it restarts the system to boot from the hard drive and install more off the CD. This was where I pulled the CD out of the drive and booted instead into the RIP CD configuration, because at this point I know the Windows XP system information has been written. I also know that in the process, XP has overwritten the master boot record with its own boot information, so I redid the GRUB setup trick from the RIP CD again and rebooted into my Ubuntu Gutsy configuration. The Windows XP partition mounted as usual because I have it automount on startup in Ubuntu Gutsy, so I rsync'd files from the old Windows configuration to the new one, then rebooted the system into Windows XP. There have been a few hiccups with Windows, notably things like the desktop.ini files showing up all over the place because they aren't hidden anymore, and the recycle bin got corrupted, but overall things look like they're playing well. Why? rsync probably didn't keep Windows file attributes, my attempt at getting at the Windows admin password through an Ultimate Boot CD utility to boot into a Windows XP recovery console mangled some parts of the registry, or both. Either way, I'll probably copy old to new through Windows XP next time.
So the new drive's now running both my Windows XP and Ubuntu Gutsy configurations and I've pulled out the old drive to keep as a spare. The new drive's noticeably faster than the previous one, which is nice. Total time on the upgrade, including headscratching and booboo resolution was about a day. Total work time was probably about 8 hours, most of which was copying files hither and yon.
This exercise has shown me a few things. I have a much better understanding of Linux's hard drive "guts" and where in Ubuntu to look for device and boot configuration data. Ubuntu is easier to migrate than Windows XP. I don't think I have a use for the Ultimate Boot CD anymore, much as I used to like it. Recovery Is Possible is an excellent resource for Linux hard drive upgrades and recovery. Most importantly, though, I now know that I can rebuild my entire configuration from backups if there's a catastrophic meltdown. This last one makes me mighty happy, and I feel like my Ubuntu-fu is almost as good as my Windows-fu now. Am I going to get Vista-fu? I'll try not to for as long as possible. I'll just keep getting mo' better with Ubuntu.


Comments
Glad to hear that everything went well, and that the operation was successful!