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.

210 questions
1
vote
3 answers

Large delay starting "dd" write in background in bash even when using nohup

I wrote a small script to print the memory usage during a large sequential write of a file. #!/bin/bash rm result echo 3 > /proc/sys/vm/drop_caches sync; echo start nohup time dd if=/dev/zero of=mem bs=1M count=2000 & for i in {1..200} do sleep…
yonggang
  • 43
  • 1
  • 6
1
vote
2 answers

Cloning a two partition HDD onto a smaller HDD and maintaining MBR

I have a hard disk(A) containing two partitions - A1 is a NTFS partition containing a windows OS, and A2 is an NTFS partition containing data. I want to copy both of these partitions onto a different, smaller hard disk(B) and have B be bootable (so…
Zxaos
  • 496
  • 3
  • 6
  • 18
1
vote
1 answer

Oracle 10g cannot start after cloning server with dd

I used dd to clone a x4100 server with Linux Red Hat. The hardware is identical for old and new servers. Then I changed IP address and host name. The newly restored server is up and running but Oracle gives following errors and cannot…
Ephieste
  • 31
  • 1
1
vote
2 answers

Copy a partition into a new image out of an existing dd image

How can I dd an image of a single partition out of a full-disk image? I know skip and count, but I am supposed to divide by bs, and since this is the first partition, it's start point is early in the image and dd says the number is not valid for…
jeffcook2150
  • 225
  • 1
  • 2
  • 7
1
vote
3 answers

Extracting Data from Raw Hard Drive Copy?

A while back something happened to my hard drive that wiped out the partition table and left my data unreadable. I had other uses for the drive, but I didn't want to give up on trying to recover the data, so I used dd to do a block copy of the…
user65237
1
vote
4 answers

Why dd finishes instantly when pipelining to cat?

I start bash on Cygwin and type: dd if=/dev/zero | cat /dev/null It finishes instantly. When I type: dd if=/dev/zero > /dev/null it runs as expected and I can issue killall -USR1 dd to see the progress. Why does the former invocation finishes…
agsamek
  • 321
  • 1
  • 3
  • 12
1
vote
2 answers

cloning with dd - is non-partitioned space considered the same as empty space within filesystem for resulting image size?

note: all = all that i've found All the "cloning with dd" information talks about how dd copies all the "empty space", but literally all writings seem to be responding to a situation where filesystems fill up the entire disk. What about the…
lkraav
  • 786
  • 1
  • 8
  • 22
1
vote
2 answers

How can I use dd to back up the whole disk from inside a linux-vserver guest?

I have a Linux-vserver guest I want to dump the whole disk of. I have no access to the host. I tried: dd if=/dev/hdv1 | gzip -c | ssh user@remote.host.net 'dd of=/path/to/file.img' bs=2048 but the result was: dd: opening `/dev/hdv1': No such file…
ria
  • 163
  • 1
  • 5
1
vote
4 answers

Best choice for off-site backup: dd vs tar

I have two 1TB single-partition hard disks configured as RAID1, of which I would like to make an off-site backup on a third disk, which I am still to buy. The idea is to store the backup at a relative's house, considerably far away from my place, in…
plok
  • 113
  • 1
  • 5
1
vote
1 answer

copying one virtual raid disk to another using dd

Using a Dell-Perc Raid controller in Ubuntu I have a virtual disk as a raid 0 array composed of 4 physical drives (1Tb SSDs). I would like to copy the virtual disk onto another virtual disk also raid 0 composed of 4 physical drives. I would like to…
haz
  • 111
  • 1
1
vote
1 answer

Thin-LVM readonly mode

I use this command to move data of one thin lv to another lv on separate server. dd if=/dev/vg/my-lv bs=24M | throttle -v -s 512 -w 2 -m 2000 | ssh -oStrictHostKeyChecking=no -i /var/my-ssh-keys/id_rsa -q root@destination-server-ip dd conv=sparse…
Jevin Gala
  • 59
  • 9
1
vote
2 answers

Using DD to clone a 600GB drive using SSH to remote location with only 60 GB of allocated data [server migration]

Please, excuse my horrible english. I'm triyng to find the way to clone a HDD server to a remote destination location, using SSH and, if possible, compress data on-the-fly to minimize unnecessary data transmission between them. The main objective is…
1
vote
2 answers

Why Linux "dd" is erroring with "no space left on device" while copying a single partition to a smaller device?

I'm trying to copy the single partition /dev/sda1 to /dev/sdc1, but I'm getting the error "no space left on device" and I honestly don't get why. I'm working on an Oracle Cloud Infrastructure (OCI) VM where /dev/sda is a 768 GB volume whose sda1…
1
vote
3 answers

Can't make good size image with the command DD

Need to make an image disk of my DD. This a is a 4to hard drive with 2 partitions (total used :1,7 TO). How to get an 1,7 TO correct image with the dd command ? Disque status with fdisk Used : dd if=/dev/sdq count=2399842303 of=/tmp/imagedisk.img…
1
vote
1 answer

Does it matter to partition something before dd?

Normally, to burn an ISO to a disk, let's say an ISO for installing Ubuntu, we dd to the /dev/sda, not to the partition like /dev/sda1, so in this case, where the target file is /dev/sda which is presumably the entire disk, does it make any sense to…
Guerlando OCs
  • 67
  • 1
  • 7