My laptop hard drive was faulty so I requested and just received a new one. Now, I need to migrate my data over. This task seems easier said than done. The two drives are the same size, so I figure dd
should work but I haven't seen explicit instructions on what exactly to do, and I'm scared for my data experimenting.
My setup is that these drives are 500gb and internal so I can only have one connected at a time. About 250gb on the hard drive is used. I have two partitions on the drive: a boot partition (50 megs), and a logical partition containing root (20gb), swap (8gb), home (435 gb). and reinstalling the operating system (gentoo) is not an option due to the fact that my bandwidth is severely limited right now. The only vehicle I have is an external USB hard drive with about 400gb capacity. I'm currently booted off of an ubuntu livecd in order to do the transfer.
- Should I use dd to just copy the input drive into a file on the external HD? Or will this also try to allocate all the free space and thus not fit?
- Will zipping everything a la
dd if=/dev/sda bs=100M | gzip -c > /media/ext/image.img
fix that issue? - Should I use dd to copy the /boot and / partition to a file on the external HD, and just copy my /home directory as files?
- Will either of these options leave me in trouble with booting and/or grub or something on the new drive?
Thanks!
Mala