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

learn more… | top users | synonyms

4
votes
2answers
3k 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
199 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
133 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
1k 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
405 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
403 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
228 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
2k 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
406 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
276 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 ...
3
votes
2answers
271 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
287 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
755 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
95 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
373 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
777 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
301 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
3answers
1k 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
3k 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: ...
3
votes
2answers
136 views

How to echo output of multiple commands into md5sum?

Okay so I have a somewhat large file (~200 meg) that I need to regularly hash to see if it has changed. The catch is that there are two small fields in this file which must be ignored as they may ...
2
votes
1answer
378 views

fdisk, dd, and the Rapsberry pi

I was trying to wipe my 4GB SD card which acts as the hard drive for the Raspberry Pi, so I went into Mac OS X Disk Utility* and Erased the entire disk, and specified that the whole disk be one big ...
0
votes
1answer
876 views

SD Card interpreted as wrong size

I used dd to write a 2GB image to an 8GB SD card; gparted now sees it as a 2GB SD card and I can't figure out how to format it for 8GB again. ddalso sees it as a 2GB SD card when trying to format it ...
-1
votes
1answer
305 views

USB key not responding when inserted

I just attempted to create a USB key for Chrome OS. I followed the instructions found here. This is what I did: 1- Downloaded a .zip version of the build. 2- Extracted the .zip file which gave me a ...
2
votes
1answer
759 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 ...
3
votes
2answers
625 views

How to write file into another

I have an empty file (only zeroes are in it) of size 9,0KB and I need to write another file (with size 1,1KB) to it, but the first file must not lose its size or the rest of its contents. So if the ...
3
votes
1answer
128 views

reasons for a dd image of an almost-empty drive not be small after gzip

i just cleaned a 50GB partition with dd if=/dev/zero of=/dev/sda1 then added some data to it (actually installed a linux distro) some 3Gb on ext4. and decided to make a image. dd if=/dev/sda1 | ...
2
votes
2answers
392 views

How does mdraid resync work?

I have two drives in a mirror (linux sw raid/mdadm); one drive somehow left the mirror in the past and its content is now several days old. At this moment, I'm using degraded mirror (with one drive ...
1
vote
0answers
516 views

Use dd to backup disk image within an OpenVZ container

I want to use dd to backup the disk of an OpenVZ VPS in addition to traditional cold tar backups. Because I may need to migrate to a different VPS provider. From end user point of view, OpenVZ ...
3
votes
3answers
3k views

Moving /boot and MBR to a new drive

I have a CentOS 6 server with two hard drives in it. My old 3TB drive has been giving me some issues so I'm moving things over to a new drive. Because my / and /home partition are managed by a LVM ...
3
votes
2answers
255 views

Is it safe to only partially restore a disk image with dd?

I have saved my whole hard-disk with dd to an image file. The hard-disk contained some primary partitions formatted with ntfs, swap and ext4. I did it this way: dd if=/dev/sda | ssh user@fastmachine ...
3
votes
2answers
359 views

how to create ISO and hide certain files

I am a newbie here and my apologies if I am posting a question which has been answered many times in a another thread. I did my homework find some relevant information But could not. Thanks for ...
4
votes
1answer
99 views

Error(?) in output of the dd command

When I run the following command: dd if=/dev/sda of=output bs=512 count=1 In the middle of the output, I see this text: GRUB ^@Geom^@Hard Disk^@Read^@ Error^M What does it mean?
3
votes
1answer
175 views

How to enlarge existing file to specific size

I have hdd.img file, which I user as HDD for my virtual machine, but it's size is too small, how can I enlarge it? There is one method, something like: dd if=/dev/zero ds=10GB count=8 >> ...
1
vote
1answer
249 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?
2
votes
1answer
130 views

dd is crashing after a few hours of transfer

I am trying to clone a external hardrive ( 1.5T ) to a second one ( 3T ) with dd. I am working on Unix and want to create a disk image. Here is the command I am using : dd if=/dev/disk1 ...
8
votes
1answer
188 views

How to re-size partitions in a complete hard drive image?

I have taken a complete image of a hard drive using: dd if=/dev/sda of=/home/user/harddriveimg bs=4M It would seem to me, that I should be able to re-size the partitions within it after suitably ...
2
votes
1answer
176 views

Using dd to cause an error in memory

The command dd if=/dev/mem of=/dev/null seek=16k bs=4k count=1 is used to test erroect injection for edac. Why? As far as I know, dd is simply copying data from those devices to somewhere else. What ...
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 ...
1
vote
1answer
346 views

Read/write access on raw NTFS image

I backed up an entire 32GB NTFS partition to a raw image with with dd. The file-system on the partition in accessible under Debian after mounting with: $ sudo mount -o ro,loop ...
1
vote
2answers
525 views

Writing data on particular sectors or blocks

Not sure if it's better suited for superuser of serverfault boards, let me know. I have a drive which I repartitioned with fdisk. Initially there was only one big partition, now there are a number ...
2
votes
1answer
2k views

VBoxManage: Error: Can't be used as the requested device

I used the soluton from this thread but always i get VirtualBox error: The medium 'lvol.vmdk' can't be used as the requested device type (0x80004005) I've tried all controllers SATA, SCSI, IDE and ...
2
votes
3answers
842 views

Why does dd change the filesystem on the external disk?

I took out a 250 GB SATA disk from my netbook, filled it with zeroes with dd and connected it to my laptop via the usb adapter. It's correctly detected by fdisk: Disk /dev/sdb: 250.1 GB, 250059350016 ...
4
votes
2answers
574 views

Help with unzipping a .dd.gz, possibly corrupted

I recieved this file that I was told was a copy of a hard drive (or disk). The file is "sheeva-mem.dd.gz". I tried to unzip the file in a linux Fedora machine. This yielded "unexpected end of file". ...
7
votes
3answers
1k views

Create a Random ISO Image Using dd

I would like to create a ISO file for testing optical drives with the method mentioned here. I want to create an ISO file filled with random data, so I can burn it to a CD, read it back and compare ...
2
votes
3answers
1k views

How to clone linux installation onto an external harddisk?

I see a lot of dd related questions, but could not find answers to the following. If question/answers already exist, please point to them, then flag to close, delete or merge. Can a working linux ...
5
votes
2answers
3k views

Unpack files and directories from an image created by dd?

I created an image of an NTFS partition using dd. I wonder if I can unload/unpack the files and directories in the image to any partition whose size is larger than the image size, so that I can ...
2
votes
2answers
2k views

Check integrity of a dd backup

I just made a backup of an entire hard drive (50GB) over ssh via: dd if=/dev/hda | buffer -s 64k -S 10m | ssh myuser@myhost "cat > ~/image.img" What's now the best way to check the integrity of ...
6
votes
1answer
2k views

dd: writing '/dev/null': No space left on device

I am reading a 550MB file into /dev/null and I am getting dd: writing '/dev/null': No space left on device I was surprised. I thought /dev/null is a black hole where you can send as much as you ...
6
votes
2answers
577 views

Why did dd create a different uuid?

root@debian:/home/tiger# dd if=/dev/sda of=/dev/sdb bs=10240k 11447+1 records in 11447+1 records out 120034123776 bytes (120 GB) copied, 4729.59 s, 25.4 MB/s root@debian:/home/tiger# blkid ...
3
votes
3answers
444 views

from a sparse file to a block device over the network

If I have a sparse file representing a block device, then how can I efficiently restore the file over a network? Ideally, I'd use rsync -S host:file /dev/sdb, but rsync won't write to block devices. ...