Questions tagged [dd]

dd is a common Unix program whose primary purpose is the low-level copying and conversion of raw data.

it will "convert and copy a file". It is used to copy a specified number of bytes or blocks, performing on-the-fly byte order conversions, as well as more esoteric EBCDIC to ASCII conversions. It can also be used to copy regions of raw device files, for example backing up the boot sector of a hard disk, or to read fixed amounts of data from special files like /dev/zero or /dev/random.

480 questions
830
votes
21 answers

How do you monitor the progress of dd?

dd is a wonder. It lets you duplicate a hard drive to another, completely zero a hard drive, etc. But once you launch a dd command, there's nothing to tell you of its progress. It just sits there at the cursor until the command finally finishes. So…
James
  • 16,746
  • 5
  • 23
  • 37
168
votes
9 answers

Mount single partition from image of entire disk (device)

I made an image of my entire disk with dd if=/dev/sda of=/media/external_media/sda.img Now the problem is I'd like to mount an ext4 filesystem that was on that disk but mount -t ext4 -o loop /media/external_media/sda.img /media/sda_image obviously…
Nicola Feltrin
  • 1,703
  • 3
  • 11
  • 14
113
votes
8 answers

Moving entire Linux installation to another drive

I have Ubuntu 14.04 with a lot of packages and work-related stuff that I am very happy with it. It is installed on my main SSD drive which is a 120GB one (I had chosen "/" when I installed Ubuntu, so I believe everything should be on this drive). It…
Dumbo
  • 1,882
  • 5
  • 25
  • 35
80
votes
11 answers

How would I speed up a full disk dd?

I am doing a dd on two identical drives with this command: dd if=/dev/sda of=/dev/sdb bs=4096 Both hard drives are the exact same model number, and both have 1TB of storage space. /dev/sda uses a blocksize of 4096. /dev/sda is a local drive and…
Kaz Wolfe
  • 33,802
  • 20
  • 111
  • 168
76
votes
1 answer

What's the difference between ddrescue, gddrescue, and dd_rescue?

The dd command is commonly used to make image backups of a drive or partition. However, it performs poorly if the source drive is unreliable or failing. I read that ddrescue/dd_rescue is a good tool to use to recover an image from a bad drive, since…
Mechanical snail
  • 5,325
  • 3
  • 28
  • 40
54
votes
5 answers

What does the command name "dd" stand for?

I'm using dd to copy an image onto a USB. But what does dd stand for? I understand its use, but not what the name dd actually means, or is an acronym for. It doesn't even say in the man page.
john smith
  • 2,963
  • 10
  • 37
  • 53
48
votes
13 answers

How to clone to a smaller harddisk?

How to clone a harddisk to a smaller sized one. Clonezilla is great but it doesn't support such functionality. Also dd and PartImage don't support this demand. rsync will not copy the MBR since an MBR is not a file. I need to clone a HDD not to…
Maythux
  • 82,867
  • 54
  • 239
  • 271
39
votes
2 answers

Does "dd" command without parameter or input/output redirection do anything?

I typed in dd in bash and ran it without double checking. Will this do anything to my system? I just executed dd by itself. Was trying to backup a Raspberry Pi device, which I managed to do using dd. Just stupidly input and execute dd by itself…
Tom Tat
  • 429
  • 1
  • 4
  • 4
38
votes
2 answers

fallocate vs dd for swapfile?

I'm wondering what the difference is between creating a swapfile with fallocate -l 1G /swapfile and dd if=/dev/zero of=/swapfile bs=1024 count=1024 both seem to work fine, but does one have an advantage over the other? The only thing I could…
NerdOfLinux
  • 3,728
  • 7
  • 29
  • 55
36
votes
6 answers

Accidentally did dd /dev/sda

I written an ISO image to my hard disk using sudo dd if=image.iso of=/dev/sda. I meant /dev/sdc, and now running sudo fdisk -l returns only one partition on /dev/sda while there is supposed to be 6. Is it possible to recover my data? I didn't shut…
Baaing Cow
  • 479
  • 1
  • 4
  • 11
32
votes
4 answers

How can I know how long `dd` cloning will take?

I have to dd a couple of 1TB hard drives. They are taking several hours to clone and I was wondering if there was any way possible of knowing how fast they are going, how much they have done and how long will they take to copy the rest. All I can…
Luis Alvarado
  • 209,003
  • 167
  • 543
  • 707
28
votes
5 answers

Creating a large size file in less time

I want to create a large file ~10G filled with zeros and random values. I have tried using: dd if=/dev/urandom of=10Gfile bs=5G count=10 It creates a file of about 2Gb and exits with a exit status '0'. I fail to understand why? I also tried…
egeek
  • 381
  • 1
  • 3
  • 3
28
votes
5 answers

is 'dd' command taking too long?

I set up dd to clone a smaller system 40.00GB hard drive (/dev/sda) to a new bigger 111.00GB one connected via a USB reader (dev/sdb) and Its been going for two hours now. The activity meter on the new hard drive shows it's doing something. But the…
user101351
28
votes
5 answers

"Re-size" the .img for smaller SD-card. How to SHRINK a bootable SD card image

Context I have a 16 GB SD card with a Linux based OS for a Raspberry Pi. Most of the space is empty. I want to share the SD .img with other people but if I use the command dd if=/dev/sdXX of=/home/user123/SD.img it will create a 16 GB image. Too…
Leos313
  • 1,826
  • 3
  • 18
  • 31
27
votes
4 answers

How to mount sd-card image created with dd?

I have created an image of my Raspberry Pi SD-card using dd: sudo dd if=/dev/sdf of=/home/myusername/raspberry-backup-2014-04-10.img The SD-card includes two partitions (one vfat, one ext4) which are automatically mounted when I plug the card…
MrD
  • 723
  • 1
  • 7
  • 14
1
2 3
31 32