Questions tagged [dd]

This command is used to do low level copying of data.

Convert and copy a file, write disk headers, boot records, create a boot floppy. dd can make an exact clone of an (unmounted) disk, this will include all blank space so the output destination must be at least as large as the input.

For more info refer to the manpage.

202 questions
226
votes
29 answers

Using DD for disk cloning

There's been a number of questions regarding disk cloning tools and dd has been suggested at least once. I've already considered using dd myself, mainly because ease of use, and that it's readily available on pretty much all bootable Linux…
falstro
  • 2,675
  • 3
  • 18
  • 10
86
votes
2 answers

Does the "bs" option in "dd" really improve the speed?

Every now and then, I'm told that to increase the speed of a "dd" I should carefully choose a proper "block size". Even here, on ServerFault, someone else wrote that "...the optimum block size is hardware dependent..." (iain) or "...the perfect size…
Damiano Verzulli
  • 3,948
  • 1
  • 20
  • 30
51
votes
7 answers

dd on entire disk, but do not want empty portion

I have a disk, say /dev/sda. Here is fdisk -l: Disk /dev/sda: 64.0 GB, 64023257088 bytes 255 heads, 63 sectors/track, 7783 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size (logical/physical): 512 bytes / 512 bytes I/O size…
Jonathan Henson
  • 889
  • 2
  • 10
  • 16
28
votes
9 answers

How to set up disk cloning with dd, netcat and ssh tunnel?

I would like to copy stuff in bulk (reimage disk using dd) with netcat from host A to B via ssh encrypted channel on Linux. What commands should I type on both ends?
Evgeny
  • 599
  • 3
  • 10
  • 17
21
votes
3 answers

Securely wipe an entire Linux server with itself

I have remote ssh access and root access. I do not have physical access. I'm not looking for solutions involving booting into anything, I want to do this from what is currently running. OS is SL6. Is there a way to load everything needed into RAM,…
cat pants
  • 2,139
  • 10
  • 33
  • 44
16
votes
4 answers

Wipe is very slow. Too little entropy?

I have to hand off a Laptop including its hard disc. Since it was not encrypted I wanted to wipe it at least quickly. I know this is not optimal on SSD, but I thought better than just plain readable. Now I am running wipe of a live USB stick and it…
user857990
  • 287
  • 3
  • 13
15
votes
6 answers

Moving a Logical Volume directly from one server to another over the network?

I have a KVM host machine with several VMs on it. Each VM uses a Logical Volume on the host. I need to copy the LVs to another host machine. Normally, I would use something like: dd if=/the/logical-volume of=/some/path/machine.dd To turn the LV…
Nick
  • 4,433
  • 29
  • 67
  • 95
13
votes
2 answers

create image of a USB drive without unallocated partition

I have 8GB USB drive attached to my system which looks like this: [root@host]# fdisk -l /dev/sdb Disk /dev/sdb: 8462 MB, 8462008320 bytes 255 heads, 63 sectors/track, 1028 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Sector size…
modest
  • 231
  • 1
  • 2
  • 4
13
votes
1 answer

combine partitions to one disk image

I have 3 images. Each image was done by cloning (by dd) a partition (these partitions formatted using ext3 file system). One partition is boot-able with GRUB1 (CentOS) How can I combine them to one disk image? (I can copy the partitions images using…
Dima
  • 485
  • 3
  • 7
  • 15
12
votes
6 answers

/dev/zero equivalent in windows?

I am trying to use the windows version of dd to copy a RHEL iso to a USB stick. However, I wanted to zero out the drive first to ensure there is no filesystem on it before writing it out. Is there an equivalent of /dev/zero in windows that I can use…
Matthew
  • 2,666
  • 8
  • 32
  • 50
12
votes
2 answers

Is it possible to restore disk image to a different size hard disk

recently I made a backup 120 GB disk image using dd: dd if=/dev/sda of=backup.img Now I have a new 320 GB hard disk and want to restore that backup image to that new disk. Will running dd if=backup.img of=/dev/sdb do what I want? Will I be able to…
9
votes
3 answers

Why is Clonezilla faster than dd?

On my SSD imaging (Source and Destination are 2 SSDs) I get 12GBpm using CloneZilla while with dd I get only 5GBpm. What makes Clonezilla so much faster than dd?
Lelouch Lamperouge
  • 193
  • 1
  • 1
  • 4
9
votes
2 answers

How can I split a drive image created with 'dd' into separate files for each partition?

I created an image of a failing drive with: dd if=/dev/sde of=/mnt/image001.dd The drive had only two partitions: Device Boot Start End Blocks Id System /dev/sde1 * 1 13 102400 7 …
Joe A
  • 190
  • 1
  • 9
8
votes
6 answers

Break up a dd image into multiple files

I'm doing some data recovery from a hard disk. The disk has about 300GB of data on it, but I lack another hard drive that has 300GB of free space. I have three HDs, with 150, 40, and 120 GB free. For the creation of the first chunk, I was…
lfaraone
  • 1,581
  • 2
  • 17
  • 22
8
votes
2 answers

How to mount dd image of digital ocean?

I have created a dd image of /dev/vda using the following command: ssh root@1.2.3.4 "dd if=/dev/vda" | dd of=/home/backup/vda.img and I can't mount it on my local Ubuntu server where I transferred it. I get this in dmesg | tail : [763158.222159]…
Debrian
  • 154
  • 2
  • 12
1
2 3
13 14