Quantcast
Channel: How can I use DD to migrate data from an old drive to a new drive? - Unix & Linux Stack Exchange
Viewing all articles
Browse latest Browse all 8

Answer by Stephen Jazdzewski for How can I use DD to migrate data from an old drive to a new drive?

$
0
0

Your first task would be to connect both disks to an existing Linux system or connect the new disk to the original system.

You must be very careful since it is very simple to copy the blank disk on top of the good disk!

To end up with the boot sectors and all, you would do something like:

dd if=/dev/hdx of=/dev/hdy

Where hdx is your 40G disk and hdy is your 160G disk. You will notice there are no partition numbers like /dev/hdx1. This copies the entire disk, partition info and all.

Your new disk will just like the old disk, 40G allocated. It should boot right up when placed back in your laptop. Hope you used LVM? Otherwise hope you did not use all the partitions? Getting past this point requires a lot more info.

Another solution is to dump each individual partition. This requires a lot more situation awareness since you will need to recreate the boot information.

All of this is best used for cloning computers, not upgrading hard disks. It is much better to restore to a new installation using your backups.


Viewing all articles
Browse latest Browse all 8

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>