Weblog entry #34 for simonw

Windows XP moving a laptop to a bigger disk
Posted by simonw on Wed 8 Feb 2006 at 18:44
Tags: none.
Migrated the MDs laptop to a bigger hard disk today. No convenient box with enough spare space, or 100Mbps network bits and bobs to hand, so I decided to use the USB drive.

Boot Ubuntu LiveCD, with a large external disk drive plugged in. Unmount all the disks.

dd if=/dev/hda of=/dev/sda

This command destroyed the preexisting NTFS file system on the external USB drive, but then the LiveCD didn't support writing to NTFS. Wonder if the newer one does?

Note output carefully.

Power off and swap hard drives.

Boot Ubuntu from LiveCD and calculate "xxxx" the number of 4096 blocks transferred in the original dd using the calculator application.

dd bs=4096 count=xxxx if=/dev/sda of=/dev/hda

Booted the laptop into XP, it detected new hardware (what the hell, guess it might have a better driver than the one it just booted with) and requests a reboot. Then logged in and viewed the properties of the drive, on rescanning the volumes it detects that the disk is bigger than the partition table, and resets it. I was a tad worried that copying the partition table might lead to a drive with only the first 30GB accessible.

Booted the GParted LiveCD 0.2 (I'm sure Ubuntu LiveCD would probably have worked as well) to extend the partition to fill the now enlarged disks.

Boot XP, which does a disk check on boot, and the job was done.

Not sure how I would have done the job without the external hard disk, as I'm not sure any of the network filesystems would have written a 30GB disk image readily. Probably have to spool it over a TCP connection with rsh or ssh.

This kind of copy use to be very risky, because of the way OSes use to handle the bad blocks on disk drives, but these days that is all hidden from us (thankfully).

I wonder how Windows Admins would do it, they'd probably buy Partition Magic, and Norton Ghost.

 

User Login

Username:

Password:

[ Advanced Login ]

Register Account

Quick Site Search