dd is an utility which is primarily used for low-level copying of data from storage devices.

learn more… | top users | synonyms

4
votes
1answer
30 views

Backup of a ubi file system with dd?

A have a root file system (file system - image containinf folder structure and content) on a flash drive. The flash drive uses UBI as the underlying file system file system - the way the data blocks ...
5
votes
1answer
62 views

Writing raw images safely to USB sticks

Trying lots of different linux, on all kinds of hardware I find my self typing commands like this quite often: sudo dd if=xubuntu-13.10-desktop-amd64.iso of=/dev/sdc bs=10240 Needless to say, ...
1
vote
1answer
211 views

Copy MBR and boot partition to a smaller disk

I'm using a 32GB SD card for my raspberry pi. I have successfully transferred the operating system (Archlinux ARM) to a usb harddrive. Which means that I only need the boot partition on the SD card. ...
3
votes
2answers
73 views

Create random data with dd and get “partial read warning”. Is the data after the warning now really random?

I create a 1TB file with random data with dd if=/dev/urandom of=file bs=1M count=1000000. Now I check with kill -SIGUSR1 <PID> the progress and get the following: 691581+0 Datensätze ein ...
2
votes
4answers
102 views

Why is dd so slow on raw device, so fast on filesystem (writing on USB key)?

I have a USB key that I am trying to benchmark quick'n'dirty on Linux. dd on raw partition I'm testing write bandwith. I created a partition starting at sector 2048, then did a 4 GB sequential ...
10
votes
3answers
349 views

Read the middle of a large file

I have a 1 TB file. I would like to read from byte 12345678901 to byte 19876543212 and put that on standard output on a machine with 100 MB RAM. I can easily write a perl script that does this. ...
3
votes
3answers
122 views

how do I do this: dd if=coolstuff.iso of=(ssh kev@mypi )

the card reader on my laptop doesn't want to work. can I use dd (or some other tool) to write an image to a networked disk. I am trying to replace one raspberry pi distro with another. The SD card ...
20
votes
5answers
12k views

Best way to remove bytes from the start of a file?

Today I had to remove the first 1131 bytes from an 800MB mixed text / binary file, a filtered subversion dump I'm hacking for a new repository. What's the best way to do this? To start with I tried ...
2
votes
1answer
36 views

Equivalent of memmove on files: copy a range of bytes to an earlier position

What is an equivalent of memmove on files with the same input and output file? dd works when I move the file contents towards the right, but not if I move the contents left, since there's no handling ...
2
votes
1answer
36 views

dd command lost partition

When I used to image my USB, I used the dd command and saved that image to my Hard Disk my USB = sdb1 (4 GB) My partation = sda5 (775 GB free space) dd if=/dev/sdb1 of=/dev/sda5 operation ...
0
votes
2answers
77 views

How to write an alias function to make dd show progress bar?

According to this article, by replacing: $ dd if=/dev/sda of=/dev/sdb [additional options] with: $ pv -tpreb /dev/sda | dd of=/dev/sdb [additional options] one can augment the default dd ...
1
vote
2answers
42 views

dd command: Finding read/write throughput of a flash/SD?

I am running petalinux from sd card. And trying to find data copying rate from Sd card and from QSPI flash that is there on the Xilinx Zynq board. As suggested here , I am doing like this: ...
2
votes
1answer
38 views

How use tune2fs in with dd?

In this tutorial is written To regain unique UUIDs, use tune2fs /dev/sdbX -U random on every partition. Ok, but how can I use it with this command? dd if=/dev/sda of=/dev/sdb bs=4096 ...
5
votes
1answer
75 views

Partitions same size but different block

I tried to backup my partition using dd on another disk and I created a partition of the same size. When I finished the copy I had problems mounting the partition since I got bad geometry: block ...
6
votes
2answers
3k views

Use `dd` to cut file end part

There is probably simple trick to do this, but I can't figure from man page. How do I cut last 1MB from file with undetermined size for example, by using dd?
47
votes
7answers
6k views

dd vs cat — is dd still relevant these days?

I recently realized we can use cat as much as dd, and it's actually faster than dd I know that dd was useful in dealing with tapes where block size actually mattered in correctness, not just ...
1
vote
1answer
79 views

Why does a disk clone using dd take up more space on the target than the source image?

I'm doing some Android development on Ubuntu 11.10. I'm building a set of SD card and eMMC card Android images using a Bash script. Due to Android's idiosyncrasies, I have several file system images ...
10
votes
3answers
737 views

saving data from a failing drive

An external 3½" HDD seems to be in danger of failing — it's making ticking sounds when idle. I've acquired a replacement drive, and want to know the best strategy to get the data off of the dubious ...
2
votes
2answers
95 views

How to backup a running system?

I have a running Linux system, and I'd like to have a full backup of it using dd, which, in my limited knowledge is the only tool every system has. The distro doesn't matter mainly because I should ...
1
vote
0answers
29 views

For what are disk signatures being used for by GNU/Linux (distributions) / grub?

I am talking about disk signatures in context of the MBR. The area from 441 to 445 bytes. For what does the GNU/Linux kernel, GNU/Linux distributions usually use disk signatures for? I only found ...
1
vote
1answer
46 views

How to change the disk signature of a raw image?

I am talking about disk signatures in context of the MBR. The area from 440 to 444 bytes. Let's say I got a bootable raw image (bootable in a virtual machine). How can I set the disk signature to a ...
1
vote
1answer
119 views

SSH remote backup script

I am trying to backup a remote server to my machine. I am trying something like ssh user@ip "dd if=/dev/sda" | dd of=~/backup.img But that obviously doesn't work. Other variants that don't work. ...
16
votes
3answers
1k views

How can you trim files using the command line?

What is the console equivalent of the following Python code: target = file("disk", "w") # create a file target.seek(2*1024*1024*1024) # skip to 2 GB target.write("\0") target.close() Maybe some ...
2
votes
1answer
564 views

Copying a working Linux instead of installing a new one [duplicate]

It is possible to move an installed Linux from one drive to another or from one disk to another by two methods: dd command which copies sector by sector including boot sector cp command, and then ...
2
votes
2answers
229 views

How to clean journals in ext3/ext4 filesystem? [closed]

Some preamble: I'm taking bitwise copy of disk devices (via dd command) from twin hosts (i.e. with the same virtualized hardware layout and software packages, but with different history of usage). To ...
6
votes
4answers
384 views

'seek' argument in command dd

Can some explain me what is happening in the following lines? dd if=/dev/urandom bs=4096 seek=7 count=2 of=file_with_holes especially seek part is not clear Man pages says : seek=BLOCKS ...
1
vote
2answers
39 views

Debian: Create compressed Harddrive for copy

On my Debian system I have a box with certain configuration settings that I like but I've had to change them continuously. There have been times that I've gotten into a some-what irreversible ...
0
votes
0answers
100 views

How to restore a DD image file in my primary disk on new debian server

I have a dedicated Debian server at Online.net and I want to change the server by a more powerful (always Debian OS). For that, I have made an image on my old hard disk with this command: dd ...
38
votes
8answers
17k views

dd: How do I know if it's still working?

I've not used dd all that much, but so far it's not failed me yet. Right now, I've had a dd going for over 12 hours - I'm writing an image back to the disk it came from - and I'm getting a little ...
3
votes
1answer
70 views

dd can't see partition but cfdisk and GParted can

I am working with an external HDD and trying to backup a logical partition within an extended partition using dd like this: sudo dd if=/dev/sdb6 of=partition6.dd it returns: dd: opening ...
3
votes
2answers
3k views

Why can't I copy my DVD with dd?

I tried dd, dd_rescue and ddrescue, all failed. I thought these tools bypass the filesystem and make a bitwise copy. dd is fooled, it finishes but just produces a small file and states it's finished. ...
1
vote
0answers
76 views

dd primary partition slow transfer rate

Can someone explain me why if backup ,using dd, a primary partition to a primary partition on other disk the transfer rate (MB/s) is significantly slower compared to the the rate I have if the ...
0
votes
3answers
111 views

bit-wise complement with dd?

When secure erasing a disk, how can I do a "bit-wise complement" with dd? (or with other UNIX tools?)
1
vote
1answer
30 views

Backup 'empty' parts of disk drive

I have a USB drive which has around 7MB of 'empty' space at its beginning. The first partition in MBR starts at 8225kB, according to Parted. How can I back up this space using something like dd? ...
1
vote
1answer
33 views

dd behavior, default writing and partitions

I am confused about the behavior of dd. Say we have some SD card called /dev/foo and this card has partitions /dev/foop0 and /dev/foop1. Using dd, I can set the of argument to /dev/foo and dd won't ...
2
votes
2answers
56 views

Backing up a partition: doesn't reflect the status properly

With an intent to check how backing up files/filesystems works, I created 3 part itions sda9, sda10 and sda11. Please see the structure below. (Please ignore sda10 for now as I have already run ...
3
votes
1answer
132 views

Attempt to test corruption of ZFS filesystem using dd fails

I'm trying to test error detection and recovery on a system with recently installed ZFS. I deliberately overwrite the start of one of the disks with dd but can't force any errors to be detected. Can ...
14
votes
4answers
4k views

What does dd stand for?

I know very well what the command does, but man dd, info dd tell me: 'Convert and copy a file', as does GNU Coreutils. Google says its an abbreviation of everything between medicine and bad webchat ...
1
vote
1answer
227 views

Stripping null byte blocks with a sparse file?

I've created a sparse file with dd. How do I copy contents of another file there, leaving all the zero blocks unallocated?
1
vote
1answer
90 views

Filesystem not showing correct size in Mac OSX

I installed a new HDD and transferred my old data to it by using dd on my old HDD and then dd again to the new HDD. However, when booting from the new HDD, it does not recognize the new, larger disk ...
1
vote
2answers
109 views

Hard disk drive disappeared

Yesterday I performed a hard-reset while Linux was booting. This led to a hard issue with the HDD (UNC while recovering journal). I had to use ddrescue instead of dd because dd crashed on I/O error. ...
4
votes
2answers
302 views

How to take sha-1, sha-256 or MD5 of CDs / DVDs?

I just tried burning both a Debian CD and a Debian DVD from their .iso files and I've got a weird behavior: the checksum of the CD is correct but the one of the DVD ain't. Here's what working: ...
1
vote
2answers
237 views

How to write to SD card with dd command?

Having some trouble with writing to my SD card, burning NOOBS (New Out Of Box Software) software to my SD card for Raspberry Pi. Attempted to use the following command as root: # dd bs=1M ...
4
votes
2answers
2k views

Benchmark ssd on linux: How to measure the same things as crystaldiskmark does in windows

I want to benchmark a ssd (possibly with encrypted filesystems) and compare it to benchmarks done by crystaldiskmark on windows. So how can I measure approximately the same things as ...
0
votes
3answers
126 views

DD and Free Space

I have a partition (/dev/sda1) of 10 GB. Also have "dd" file of another 7 GB partition ( /dev/sdb1). When I execute the command as: dd if=sdb1.dd of=/dev/sda1 then everything goes fine but I ...
5
votes
1answer
103 views

Deploying filesystem images onto a partition of arbitrary size

I would like to establish a deployment process for Ubuntu machines based on root FS images. I would like to restore the image onto a simply-formatted hard drive (I can completely erase the disk during ...
1
vote
1answer
895 views

passing dd skip|seek offset as hexadecimal

# dd if=2013-Aug-uptime.csv bs=1 count=1 skip=3 2> /dev/null d # dd if=2013-Aug-uptime.csv bs=1 count=1 skip=0x3 2> /dev/null f Why the second command outputs a different value? Is it ...
2
votes
2answers
287 views

Adding null bytes to a file using dd

I have an img file which I had cloned from a disk of my RISC PC using dd: dd if=/dev/hdb of=RISCPC.IMG The size around 2GB. I want to add 512 null bytes to the start and end of the file. What's ...
1
vote
1answer
193 views

dd outputting: “function not implemented” when trying to write to /dev/sg11

I'm trying to use the following command: dd if=/dev/urandom of=/dev/sg11 bs=16K count=1 But when executing it, I get the following error: dd: writing `/dev/sg11': Function not implemented When I ...
3
votes
3answers
1k views

Force dd not to cache or not to read from cache

I'm working on an embedded system with the busybox version of dd. I'm trying to test an erase to the drive from some outside utility, however dd does not read from the disc again after the erase, but ...