When my 40 GB hda drive was starting to sound like a frog I bought a 80 GB to replace it with. hda had only 1 partition, hda1. On the new drive I made several partitions, but I made hda1 slightly over 40 GB. Next I plugged them both in, booted knoppix, su'd to root and gave the command: dd if=/dev/hda1 of=/dev/hdb1 while the new drive was the slave on the cable at hdb.
This leaves out the bootloader so I chrooted and ran lilo, but If you just have windows you need to swap the new drive to master, boot with winCD into recovery console and issue fixmbr. When you then bootup the hd it will probably run scandisk but should work.