Old: 80 Gb Maxtor IDE old and suffering from overheating damage. Makes the "thunk" of a slowly dying head swing-arm. Occaisionally locks the puter up, sometimes fails to read entirely. Disk has the following partitions: 47 Gb FAT32 WinXp (for the missus), 1 Gb SWAP, 5 GB / Ext2 and a 24 Gb /home EXT2
New: Bought a 250 Gb Maxtor.
Method: in Ubuntu, using a terminal, "dd" and Gparted.
Originally, I formatted the new hard drive as such (using gparted):
100Gb Fat32
1 Gb SWAP
10Gb / Ext3
121Gb /home Ext3
This became, as you may or may not know, hdb. I then began to use the dd command:
sudo dd if=/dev/hda1 of=/dev/hdb1
I didn't realize nor anticipate there would be a problem until I had done them all (quite a timely process).
After some quick math, I found "dd" had copied them over + left me a little gift! If hda1 was say 90% full, then it made sure the new partition was as well. ie: hda1 was only 47Gb, but ws 90% full. I formatted (as you can see above) hdb1 for 100Gb, yet it was still 90% full after the copy...
I couldn't find any help on the topic. Asked one of my favorite forums, got a direction to head, but not an answer. That's actually the point where I did the math and found the %'s. So, now, I've done it this way and it worked fine:
deleted all partitions from hdb1.
create and format hdb1 to the exact specifications of hda1 using gparted (same file system ame size, location as far as I could see, shouldn't matter).
then I used dd
sudo dd if=/dev/hda1 of=/dev/hdb1
which worked exactly right, copying the partition over with perfection in size and quality.
Then resized hdb1 to the desired size using gparted.
repeat this for any additional partitions.
Yeah, maybe a little over complicated, but it worked like a charm that way. Just thought I should share. When I get to it, I'll post how changing the new hard drive from slave to master went and how well reinstalling GRUB will go.
In case you don't know, copying the MBR over is a bad idea unless you have an exact same new hard drive with the exact same geometry. Otherwise, there could be flags, permissions and address problems within the drive.
The best way is to slave the new drive(maybe not the best, but the way I do it), copy over from the old, put the new one as master and install GRUB/LILO (whatever bootloader you like).

Help



Back to top









