Just how can I make use of DD to move information from an old drive to a new drive?

I am updating the inner SATA disk drive on my laptop computer from a 40G drive to a 160G drive. I have a Linux/Ubuntu desktop computer which has a SATA card. I would in fact such as to do the very same point for a pair CentOS & FreeBSD boxes at the workplace, and also it appears this would certainly have the very same remedy.

I've listened to that I can make use of DD to mirror the 40G partition to the 160G drive, or that I can conserve the 40G partition as a photo on my neighborhood system, and afterwards replicate that 40G photo to the 160G drive.

Can any person define just how I may do this? Do I require any kind of various other energies, such as gparted

0
2019-05-04 20:17:45
Source Share
Answers: 5

One straightforward instance is this :

dd if=/dev/sda of=/dev/sdb

Yet if you have some unique demands, you actually need to read the manpage (male dd) or search on Google.

An additional suggestion can be making use of rsync (do not neglect to set the appropriate alternatives, like - az [plans the documents as opposed to duplicate one documents after an additional ] or - - numerical - ids [makes use of the uid/gid as opposed to names like "origin" ] and also possibly a few other). The link has several instances.

If the new HDD does not have dividings, you can make use of gparted or palimpset.

When you're unclear I would certainly layout the HDD and afterwards sync the information with rsync.

0
2019-05-08 09:08:38
Source

You asked just how to do it with dd, yet I had far better success piping the result of dump right into recover . Offered the resource ad1s1a and also the target ad2s1a :

$ mount /dev/ad2s1a /target
$ cd /target
$ dump -0Lauf - /dev/ad1s1a  | restore -rf -

I attempted this on FreeBSD, in fact I located it on the FreeBSD Forum

0
2019-05-08 08:55:38
Source

To merely replicate the partition, you can make use of dd if=/dev/srcDrive of=/dev/dstDrive or something similar to this. I would certainly recomend you to read its man page. Sorry I can not offer far more details, given that I'm at job now.

0
2019-05-08 05:22:07
Source

Your first job would certainly be to connect both disks to an existing Linux system or connect the new disk to the initial system.

You have to be really mindful given that it is really straightforward to replicate the empty disk in addition to the excellent disk!

To wind up with the boot fields and also all, you would certainly do something like :

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

Where hdx is your 40G disk and also hdy is your 160G disk. You will certainly see there are no partition numbers like /dev/hdx1. This duplicates the whole disk, partition details and also all.

Your new disk will certainly similar to the old disk, 40G alloted. It needs to boot right up when positioned back in your laptop computer. Hope you made use of LVM? Or else wish you did not make use of all the dividings? Surpassing this factor calls for a whole lot extra details.

An additional remedy is to unload each specific partition. This calls for a whole lot even more scenario recognition given that you will certainly require to recreate the boot details.

Every one of this is best made use of for cloning computer systems, not updating hard drives. It is better to recover to a new installment utilizing your back-ups.

0
2019-05-08 04:46:10
Source

Normally I would certainly recommend a remedy such as "link the 2nd disk drive making use of an exterior unit, boot from a linux CD, after that make use of a command such as dd if=/dev/sda of=/dev/sdb bs=1G, yet given that you intend to make use of the very same strategy for job, I have what might be a far better remedy.

Every one of my web servers and also laptop computers get imaged at the workplace making use of Clonezilla. There are 2 means of utilizing it ... among which makes use of a committed web server and also is possibly excessive for you, and also an additional which makes use of a boot CD and also exterior disk drive.

The suggestion is that you boot in with the Clonezilla CD and also have a largish (larger than the resource drive) exterior USB drive. Clonezilla strolls you via making a photo of the existing drive, after which you power down the equipment, change the drive, after that boot back right into Clonezilla, and also it strolls you via recovering the information.

This offers you the possibility to A) placed the photo on a larger drive, and also B) preserve a back-up of the information.

0
2019-05-08 03:49:26
Source