dd is a traditional utility for binary data copies

learn more… | top users | synonyms

5
votes
1answer
695 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, ...
2
votes
4answers
899 views

Why is writing SLOW on raw device, and FAST on filesystem (USB key)?

I have a USB key (PQI U822V-Speedy 32G) that I am trying to benchmark quick'n'dirty on Linux. I'm testing write bandwith. dd on raw partition I created a partition starting at sector 2048, then did ...
3
votes
3answers
251 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 ...
6
votes
2answers
954 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 ...
11
votes
3answers
978 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. ...
2
votes
1answer
110 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, which works with large files? dd works when I move the file contents towards the right, but not if I move the contents ...
2
votes
1answer
49 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
330 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
94 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
129 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 ...
1
vote
1answer
201 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 ...
2
votes
2answers
296 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
34 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
2k 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. ...
1
vote
1answer
131 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
585 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. ...
2
votes
2answers
1k 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
4k 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
107 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
656 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 ...
3
votes
1answer
129 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 ...
5
votes
1answer
131 views

Partitions same size but different block [closed]

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 ...
1
vote
0answers
170 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
156 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
34 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
39 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
96 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
253 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 ...
1
vote
1answer
132 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
335 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. ...
1
vote
2answers
666 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
4k 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
338 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 ...
6
votes
1answer
184 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 ...
2
votes
1answer
2k 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
610 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 ...
4
votes
2answers
596 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
1answer
298 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 ...
5
votes
3answers
4k 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 ...
0
votes
2answers
608 views

Restore using dd will not boot

My current HDD is failing and I've backed it up using dd. After restoring the images onto a new HDD, also using dd, the new system will not boot. It goes through the BIOS initialization, then screen ...
5
votes
1answer
432 views

Why can't I simply dd an installation iso to a bootable partition on an USB flash drive?

I have a copy of the Slackware 64 bit dvd installation iso. I've burned this image to a dvd and used it to properly install the distro. I wanted to try also having this image available on a usb flash ...
5
votes
2answers
524 views

How do I refresh the magnetic state on a disks with backups?

I have a couple of large disks with backup/archive material on them. They're ext4. Regarding the ones of those that will be stored for a couple of years without reading the whole disc again I've been ...
7
votes
4answers
337 views

Protecting Devices from dd and fdisk Commands

I'm wondering if there is some way to prevent certain certain devices from becoming the output file of the dd command and the target of the fdisk command. I'm currently using the two operations to set ...
5
votes
2answers
1k views

Linux/GParted can see partition table but dd bs=512 count=1 can't

I have an MBR formatted sd card and when connect to a Linux machine (xubuntu 12.04) it can mount a partition and parse the file system (as can GParted). However, when I try to read the MBR from the ...
2
votes
2answers
118 views

How should I format a USB prior to writing an ISO to it?

I found these Debian EeePC HowToInstallUsingStandardInstaller instructions at the Debian Wiki, stating that I can install an ISO to a USB using this: dd if=debian-*-netinst.iso of=/dev/sdX Do I ...
1
vote
2answers
663 views

Can I use dd to make an ISO of a DVD that is only as large as the data on the DVD?

I am starting to make backups of my movie DVDs at home. I am using DD to make ISO images of my DVD as follows: dd if=/dev/dvd of=~/dvd/abc.iso However, even though the content of the DVD is only, ...
2
votes
2answers
1k views

How to use DD to clone a partition off a disk image?

I have a disk image, it's a "whole" disk image, e.g., contains multiple partitions, and I want to clone just one of them (not the first one..) onto a partition on an external drive with multiple ...
1
vote
3answers
401 views

Why does this work: “cp image.bin /dev/mapper/loop0p1”?

Why does this work? cp image.bin /dev/mapper/loop0p1 image.bin is a partition image. I have tried it and works, but why? Shouldn't a dd be used?
3
votes
4answers
2k views

Fast Way to Randomize HD?

I've read about how to make hard drives secure for encryption, and one of the steps is to write random bits to the drive, in order to make the encrypted data indistinguishable from the rest of the ...
1
vote
2answers
4k views

How do I resize a disk image device?

I'm trying to reduce the size of a backup drive image. Original disk had these partitions: Model: ST916082 1A (scsi) Disk /dev/sde: 160GB Sector size (logical/physical): 512B/512B Partition Table: ...