Duplicate a hard drive using DD(linux tool)

View previous topic View next topic Go down

Duplicate a hard drive using DD(linux tool)

Post by sunt on Tue Mar 25, 2014 5:06 pm

Image windows/linux drives with "DD" tool.

Commands:
[to list drives] sudo fdisk -l
[copy drive "a" to drive "b"] sudo dd if=/dev/sda of=/dev/sdc


sudo fdisk -l to list drives and see if they look similar
avatar
sunt

Number of posts : 121
Registration date : 2008-11-14

View user profile

Back to top Go down

Re: Duplicate a hard drive using DD(linux tool)

Post by sunt on Mon Feb 23, 2015 2:05 pm

http://askubuntu.com/questions/215505/how-do-you-monitor-the-progress-of-dd

Install pv and put it between input / output only dd commands.

Note: you cannot use it when you already started dd.

From the package description:
pv - Pipe Viewer - is a terminal-based tool for monitoring the progress of data through a pipeline. It can be inserted into any normal pipeline between two processes to give a visual indication of how quickly data is passing through, how long it has taken, how near to completion it is, and an estimate of how long it will be until completion.

Installation
sudo apt-get install pv
Example
dd if=/dev/urandom | pv | dd of=/dev/null
Output
1,74MB 0:00:09 [ 198kB/s] [      <=>                               ]
You could specify the approximate size with the --size if you want a time estimation.

Other uses
You can also use it to output to stdout:

pv /home/user/bigfile.iso | md5sum
Output
50,2MB 0:00:06 [8,66MB/s] [=======>         ] 49% ETA 0:00:06
Note that in this case, pv recognizes the size automatically.
avatar
sunt

Number of posts : 121
Registration date : 2008-11-14

View user profile

Back to top Go down

View previous topic View next topic Back to top

- Similar topics

 
Permissions in this forum:
You cannot reply to topics in this forum