dd is a traditional utility for binary data copies

learn more… | top users | synonyms

0
votes
2answers
45 views

dd count default

What is the count default in dd command if not specified ? dd if=/dev/mem bs=1k skip=768 instead of full form like dd if=/dev/mem bs=1k skip=768 count=50 I did not find an answer with Google.
1
vote
1answer
44 views

I/O Failure when overwriting entire disk

I'm trying to write random data over a partition on my local hard disk. I'm booted into a recovery live CD (Clonezilla) and have tried the following: $ dd if=/dev/urandom bs=1024 count=4 | base64 | \ ...
0
votes
1answer
79 views

Parallelize openssl as input to dd

I am using @tremby's great idea to fill a disk with random data. This involves piping openssl, which is encrypting a lot of zeros, to dd (bs=4M). I'm maxing out the single core on which this is ...
2
votes
1answer
62 views

Transfer content of LVM block device ensuring consistency - LVM snapshot?

I need to create off-site full backups of an LVM block device. Thinking the old dd over SSH method. To ensure I have a consistent backup, should I create an LVM snapshot first? So new changed blocks ...
5
votes
2answers
225 views

how to deallocate /dev/ram0

I have allocated /dev/ram0: dd if=/dev/zero of=/dev/ram0 bs=1M count=1024 Now I have 1Gb sitting in memory. How do I free up the allocated space ?
2
votes
2answers
123 views

How can I manipulate a partition table file without fdisk checking the validity of it?

I'm creating an image in memory (/tmp is a tmpfs): $ dd if=/dev/zero of=/tmp/sdcard.img bs=512 count=3147775 It's supposed to hold a partition table and the first 3 partitions of a device $ ...
0
votes
1answer
162 views

Using dd command to download mtd block

How to use dd command to download mtd block from embedded Linux-based device? # cat /proc/mtd dev: size erasesize name ... mtd3: 003a0000 00010000 "DRTI2" I need download mtd3 block, so dd ...
13
votes
2answers
876 views

Why do these duplicated SD cards have different sha1sums for their content?

I have a bunch of Class 10 UHS-1 SDHC SD cards from different manufacturers. They are all partitioned as follows $ sudo fdisk -l /dev/sdj Disk /dev/sdj: 14.9 GiB, 15931539456 bytes, 31116288 sectors ...
4
votes
2answers
88 views

Is `dd` really necessary to clone a disk? [duplicate]

Almost any tutorial will tell you that to clone a disk on the command line (say, to clone /dev/sda to /dev/sdb) you can use: dd if=/dev/sda of=/dev/sdb ...and some block size options... This reads ...
1
vote
1answer
193 views

dd, cat & openssl: block size & buffer size

Here it says that when using dd through dm-crypt to overwrite a block device, only the default dd block size should be used because dm-crypt's block size is the same (512 bytes), and increasing dd's ...
1
vote
2answers
194 views

8GB USB disk listed at only 512B or 10MB?

I made an Arch Linux ISO USB drive, and I'm trying to restore it using the directions from the Arch Linux wiki. After running: $ sudo dd count=1 bs=512 if=/dev/zero of=/dev/sde && sync ...
2
votes
1answer
33 views

Compare two files, while overriding second file's size

I am trying to verify a backup that I made using the following command: dd if=/dev/sda of=/dev/sdc2 I backed up the contents of /dev/sda (internal hard drive) to /dev/sdc2 (external backup drive, ...
1
vote
0answers
98 views

Restore errors: “bad header/extent: invalid magic - magic 1701”

I'm testing these instructions to restore a backup image to an Intel Edison from a previous .img image. The backup line was: dd if=/dev/mmcblk0 of=sd/ubilinux_image.img I removed a file (to see if ...
4
votes
2answers
140 views

Why is dd reading from and writing to the same disk?

I've been using dd in Linux to overwrite an external USB hard drive. When I use the default block size of 512 bytes, with this command: # dd if=/dev/zero of=/dev/sdb throughout the whole operation,...
1
vote
3answers
378 views

Copy content from files X and Y to create file XY but XY content is all lowercase

What's the right command to copy the content from file X and File Y to create a new File XY with all letters being lowercase?
0
votes
0answers
124 views

dd speedup by async reads/writes

I was copying an SSD to an identical one today: dd if=/dev/sda of=/dev/sdb bs=4M They were connected by a SATA cable. While stracing dd I noticed that it was doing the "naive" thing: read 4M from ...
4
votes
1answer
169 views

How does cat 'know' the optimum block size to use?

From reading this, it seems that when copying data to a different hard drive, cat automatically uses the optimum block size (or very near it). I wonder how it determines the optimum block size, and ...
2
votes
3answers
238 views

Using dd to clone a disk while mounted - risks?

I want to clone a hard disk using dd. Because I want to keep a process on the machine alive continuously, I would like to do this while the filesystem is still mounted. I understand this is not the "...
0
votes
1answer
36 views

How to recover a node/content from a tarfile that's been overwritten

Disclaimer: I'm not very good at writing questions, and mine is a very specific scenario. So I'm just going to jump straight into the situation: I was browsing my filesystem, and somehow managed to ...
1
vote
1answer
64 views

Pretty print output of “kill -USR1”-ing dd

When dd is done it prints a three line summary about the number of read and written segments, the total size and average writing speed. While it does its work, dd is awfully quiet. Not too long ago (...
0
votes
1answer
96 views

USB key does not show up in /dev

We use a USB key system that are contain license files and are provided to unlock proprietary software that we used. The USB drives are small however and get lost easily, so I thought I'd clone them ...
4
votes
3answers
393 views

How do I DD over the network to an external HD?

I'm trying to clone a hard drive on my raspberry pi which is on the same network to an external harddrive of the computer I'm currently on. However I'm having issues piping the command correctly. I've ...
1
vote
2answers
80 views

Faster way to DD?

I am trying to DD a raw file to an SSD from a spin usb spin drive. I have tried compression (but it obviously has to expand before it can copy). I have watched the details of the arm7 gb ram device... ...
2
votes
1answer
377 views

How to fix BTRFS superblock error after resize/shrink (BTRFS: couldn't get super buffer head for bytenr 274877906944)

BTRFS RAID1 array with 2 500 GB hdds, no errors. This is the root filesystem, so there are 3 partitions on each drive: 1 = /boot (ext4), 2 = / (btrfs), 3 (swap) /boot is ext4 because upgrading the ...
11
votes
3answers
953 views

What does the two numbers mean respectively in dd's “a+b records” stats?

The first 2 lines in dd stats have the following format: a+b records in c+d records out Why 2 numeric values? What does this plus sign mean? It's usually a+0, but sometimes when I use bigger block ...
1
vote
1answer
110 views

How to prevent dd from freezing my system?

I want to fill the free space on my hard drive with a command like that : # dd if=/dev/zero of=z but it causes GNOME to freeze regularly for a few seconds. Even the mouse cursor is affected. How ...
0
votes
2answers
1k views

How to backup and restore to different hardware in Linux? [duplicate]

I am running Fedora 22 on a Dell Laptop. I plan on migrating to a desktop soon which will also run Fedora 22. What is the best way to go about backing up and restoring my laptop configuration to the ...
1
vote
1answer
41 views

Cloning and remounting sd card

I have a micro sd card that contains these partitions: Disk /dev/sdb: 29,7 GiB, 31914983424 bytes, 62333952 sectors Units: sectors of 1 * 512 = 512 bytes Sector size (logical/physical): 512 bytes / ...
0
votes
2answers
2k views

How to fix this I/O error on SD card?

EDIT: I tried with gparted, it didnt work. i found a SDFormatter, tool for windows that did the full erase. I have a SD card and want to install debian onto it. The dd process takes about 45 ...
1
vote
1answer
611 views

The dd command fails with an “Input/output” error while burning a USB stick

This question is somewhat related to the previous question I asked regarding the dd command, The dd command isn't appear to accomplish anything. I'm trying to burn the Ubuntu operating system ...
1
vote
3answers
102 views

The dd command isn't appear to accomplish anything [closed]

I'm currently trying to burn the Ubuntu operating system onto a USB flash drive of mine, so I can boot onto Ubuntu with my Chromebook. In order to do this, I executed the following dd command: sudo ...
2
votes
2answers
120 views

HDD cloning and non-matching checksums

I've been trying to clone a 1Tb HDD to a 1Tb SSD following the instructions here. I tried cloning it several times with both dd (painfully slow) and cat (far quicker) but when I came to do checksums ...
2
votes
1answer
169 views

Accidentally ejected sd card physically while dd

Full cat /proc/partitions + lsblk + fdisk -l output is here: http://pastebin.com/jYCCmwsU I just bought my new class10 16GB SDCard and I started to restore the Raspbian system for the Raspberry with ...
1
vote
2answers
451 views

HDD image file checksum does not match with device checksum

I have a 660297728 byte HDD image with MD5 hash f5a9d398e974617108d26c1654fe7bcb: root@T42# ls -l image -rw-rw-r-- 1 noc noc 660297728 Sep 29 19:00 image root@T42# md5sum image ...
0
votes
1answer
123 views

How can I zero the unused blocks on my filesystem in order to minimize the compressed disk image size? [duplicate]

If I dd my disk and compress the image with lzma or lzo the image is still big. The partition is 10GB used, 90GB available. But the image still around 20GB. I believe that is because I have copied ...
0
votes
1answer
108 views

change tape on the fly script

I have to write 17 Tb to tape: ssh some_host 'tar -cz /' | dd bs=20b of=/dev/tape of course 17 Tb doesn't fit to one tape so I need automatically change it when "no room" error occurs. I have ...
1
vote
2answers
81 views

How to redirect dd to pv? [duplicate]

This is my dd command which I need to modify: dd if=/tmp/nfs/image.dd of=/dev/sda bs=16k Now I would like to use pv to limit the speed of copying from NFS server. How can I achieve that? I know ...
1
vote
2answers
245 views

Can I mount a partition from a full drive image? [duplicate]

Note: While I agree that this question basically is a duplicate of the above question, I feel @alienth's answer (below) is more concise, so I suggest you take a look at it before going to the other ...
0
votes
2answers
176 views

Why is my dd slow when the blocksize is small?

According to articles on the web, mount with nobarrier will speed the disk up: Write small blocks of data to img (with barrier): SLOW # dd if=/dev/zero of=xfs.img bs=1024 count=20000 # mkfs.xfs xfs....
-1
votes
2answers
114 views

How do I Capture dd command output

I have a test script, which is used to estimate the filesize for a particular oracle export dumpfile. Content of the script is: mknod exp.pipe p dd if=exp.pipe of=/dev/null bs=1024 & exp ...
8
votes
5answers
2k views

How to ignore write errors while zeroing a disk?

Say you want to zero-out a failing hard disk. You want to overwrite as much as possible with zeros. What you don't want is: the process aborts on the first write-error. How to do that? AFAICS, plain ...
5
votes
2answers
124 views

Creating a large file with random content: short-cut by copying?

Assume I want to create a large encrypted drive stored in a file using cryptsetup, the first step is to create a random file, assume this should be of size 3T: dd if=/dev/urandom of=$FILE bs=1G count=...
2
votes
2answers
766 views

restore dd cloned sd card (No space left on device)

I used this command sudo dd bs=4M if=/dev/sdb1 | gzip > /home/username/image`date +%d%m%y`.gz to clone my 32gb sd card (there was linux installed for odroid U3) now I have tried to restore it on ...
94
votes
19answers
16k views

What is the fastest way to send massive amounts of data between two computers?

This is a situation I am frequently in: I have a source server with a 320GB hard-drive inside of it, and 16GB of ram (exact specs available here, but as this is an issue I run into frequently on ...
1
vote
1answer
48 views

DD to a bigger partition

So I made a backup of /dev/sda1 (NTFS) using: sudo dd if=/dev/sda1 conv=sync,noerror bs=64K | gzip -c >/media/My\ Book/backup/Root20131215 In the meantime I increased the size of /dev/sda1 to ...
3
votes
1answer
577 views

Can I uncompress a zip file containing a disk image and then save that to an SD card all in one step?

I am under the following restrictions: I have a 1.0 GB .zip file on my computer which contains one file, a disk image of raspbian. When uncompressed, this file is 3.2 GB large and named 2015-11-21-...
5
votes
2answers
996 views

Is it better to use cat, dd, pv or another procedure to copy a CD/DVD?

Background I'm copying some data CDs/DVDs to ISO files to use them later without the need of them in the drive. I'm looking on the Net for procedures and I found a lot: Use of cat to copy a medium:...
0
votes
0answers
65 views

testdisk foremost dd photorec after math help needed

Did i ask this question in the wrong place the first time? http://superuser.com/questions/957845/how-can-i-efficiently-view-validate-delete-1m-files-from-data-recovery I made such a long post about ...
0
votes
1answer
44 views

Broken disk size after incomplete dd operation

Once I was writing an ISO image into my USB disk using dd, I mistakenly pulled it out, and now it has only 10 MB of size. The correct size is 32 GB. Note that this smaller size is for the whole USB ...
1
vote
0answers
71 views

Write shrunken .img file to device file

I have a backup image of a device file /dev/sda3 that I created using: dd if=/dev/sda3 of=~/sda3.img. The image is very large, so I have re-sized it to remove empty space. My question is can I ...