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

learn more… | top users | synonyms

5
votes
2answers
3k views

Why is GNU shred faster than dd when filling a drive with random data?

While securely erasing a hard drive before decommissioning I noticed, that dd if=/dev/urandom of=/dev/sda takes nearly a whole day, whereas shred -vf -n 1 /dev/sda only takes a couple of hours with ...
12
votes
4answers
27k views

How to create VHD disk image from a Linux live system?

Once more, I have to resort at the experts here at SuperUser, as my other sources (mainly Google ;-)) didn't prove very helpful... So basically, I would like to create a VHD image of a physical disk ...
2
votes
1answer
977 views

Linux DD command partition -to- partition

I just used the DD command to copy the contents of one partition over to another partition on another drive, like this: dd if=/dev/sda2 of=/dev/sdb2 bs=4096 conv=noerror sda2 partition was 66GB and ...
16
votes
4answers
30k views

Why does 'dd' not work for creating bootable USB?

Recently I wanted to create a bootable USB of Linux mint. I found that there was a lot of conflicting advice/experience about whether the 'dd' command could be used to create a bootable USB. I decided ...
3
votes
4answers
4k views

Windows XP virtual machine hangs in VirtualBox

What i want to do: I'm trying to virtualise 2 different physical Windows XP systems which reside on one hard drive each to VirtualBox under Windows 7. What I did (once per drive): From a Linux ...
2
votes
1answer
286 views

Getting position of track and sector in 'dd'-created floppy image

I got some floppy images (original DOS 6.22 und FreeDOS 1.44 MB boot disks) created using the *nix ddcommand that work fine when used in a virtual environment. Now I want to understand the structure ...
0
votes
0answers
240 views

Clone Image Without Empty Blocks

I've been using dd if/mnt/sda1/images/$1 of=/dev/$2 to clone some embedded images for compact flashes. I used to only be using one brand of CFs, but, now I have two of them (both 2g, but obviously ...
1
vote
1answer
299 views

Copy existing Ubuntu drive to partition on new hard drive

I have a new laptop with two partitions, one is currently loaded with Windows 7, the other is blank. I'm pretty familiar with using dd to backup/copy drives, but I'm wondering how I will deal with ...
1
vote
1answer
418 views

Do Linux swap partitions need to be cloned?

I'm in the process of cloning my hard disk in order to test some unstable software. One of the partitions is Linux-swap. From my understanding, it can be used by the os as additional ram. So this ...
3
votes
2answers
2k views

What is the difference between dd's direct and fsync options?

I would like to copy an image to a USB thumb drive. As I would like to get "real" speeds, and don't want to wait ages for the device to sync after copying the image, I would like to know which ...
1
vote
4answers
256 views

Can I dd from my current hard drive to another hard drive while running the OS

My initial thought is that this is a bad idea. But let's assume that I can't take a USB stick into my lab to run a live-Linux distro, and my computer has only 2-SATA ports. I have one 80GB SATA drive ...
1
vote
4answers
4k views

How to output file from the specified offset, but not “dd bs=1 skip=N”?

How to do thing like dd if=somefile bs=1 skip=1337 count=31337000, but efficiently, not using not 1-byte reads and writes? The solution is expected: To be simple (for non-simple I can write some ...
6
votes
1answer
2k views

Compressing a file in place - does “gzip -c file | dd of=file” really work?

In the question How can I compress a file on Linux in-place, without using additional disk space?, one answer proposes to simply use gzip -c file | dd of=file I tried it (on Debian Linux), and it ...
4
votes
1answer
684 views

Can you successfully clone a Mac OS X boot volume directly to another larger volume with ddrescue?

Can you clone a Mac OS X boot volume (specifically a "Mac OS Extended, Journaled" a.k.a. JHFS+ volume) directly to another, larger volume using ddrescue or even dd, and have the target volume end up ...
3
votes
1answer
399 views

Checking if any data exists on a presumably empty storage device

So, say you've completed a full pass of: dd if=/dev/zero of=/dev/sdX bs=1M Then, you'd like to make sure the destination has been really zeroed out (ignoring the confirmation messages from dd ...
0
votes
2answers
347 views

Copy just the 64 byte partition table using dd

Given: ===MBR INFO=== MBR SECTOR NAME BYTES code area 440(max. 446) disk signature (optional) 4 Usually nulls; 0x0000 2 Table of primary partitions 64(Four ...
1
vote
0answers
328 views

Is it possible to repair iso images incorrectly made with dd in OSX Snow Leopard?

About a year ago, I made rips of a bunch of my CD/DVD games and packed the originals away. The problem is that now I'm trying to use WinXP Pro on VirtualBox on OSX Snow Leopard to play these iso ...
1
vote
1answer
146 views

Multiple /dev entries for the floppy drive, can not write to drive

I have an old computer that I am trying to use to write to a floppy. It is running Ubuntu 10.10 and is a Dell. Every time I try to mount the floppy drive, it fails (probably because I don't know the ...
10
votes
3answers
15k views

How do I create an MBR on a USB stick using DD command line tool

Okay I'm trying to create a BOOTABLE Windows7 image on a USB key from a Mac running Lion. My image is .iso format. I tried: sudo dd if=/Users/myusername/Win7.iso of=/dev/disk1 bs=1m And this ...
1
vote
0answers
68 views

Maintaining peak IO potential with DD / CP

I wanted to copy a file (40 gig dataset) from a single drive to a dual disk raid-0 drive. I tried with CP and it sustained read - 4mb and write - 11 mb (doesn't make sense I know (must be the stripe ...
2
votes
1answer
851 views

What is the difference between ghost and dd?

When I back up from one hard drive to another with Ghost I can switch those hard drives at will and the computer doesn't seem to mind. When I back up HDD A onto HDD B with dd, HDD B performs slower ...
14
votes
5answers
12k views

Why is my /dev/random so slow when using dd?

I am trying to semi-securely erase a bunch of hard drives. The following is working at 20-50Mb/s dd if=/dev/zero of=/dev/sda But dd if=/dev/random of=/dev/sda seems not to work. Also when I ...
1
vote
1answer
134 views

how to recover my hard drive…put an iso image on it with dd

I did the following: dd if=some.iso of=/dev/sda Or some such craziness. How should I recover from this? Gparted, etc..., didn't help out, deleting partition etc... Whenever I try to install a ...
6
votes
1answer
3k views

dd_rescue vs dcfldd vs dd

What are the main differences between dd_rescue, dcfldd, and dd? In what situations would you use one over the other? Why are there three different yet simliar programs?
0
votes
1answer
11k views

How to copy an ISO image onto USB with dd

The last paragraph says, The ISO image now uses a 'hybrid' system: it can also be copied onto an USB stick without formating it (using dd). Does anyone know how to do this?
1
vote
1answer
225 views

Can I use dd to clone two drives from two machines simultaneously?

To clarify, I have two machines: Machine1 and Machine2. Each machine has 2 disks (Machine1 has Disk1-1 and Disk1-2; simiarly, Machine2 has Disk2-1 and Disk2-2). Can I use 'dd' to clone Disk1-1 to ...
3
votes
2answers
7k views

Rescuing a hdd with bad sectors: dd vs gddrescue

Somewhere on the internets I read that gddrescue is superior to dd at least in terms of being able to distinguish between the amount of disk reads performed on a troubled sector. Is this really the ...
1
vote
1answer
285 views

Does `dd` on a device skip anything?

I wanted to achieve a system disk backup with an Ubuntu live CD. I used the following command: dd if=/dev/sda conv=sync,noerror bs=64K | gzip -c > /media/external/image.gz This seemed to work. ...
2
votes
2answers
1k views

Reading from the end of a drive with dd

How can I read from the end of a drive with dd? I thought about using size - to_read but I have no idea how to get the size in bytes.
7
votes
2answers
5k views

How can I mount a disk image?

I have a disk image myimage.disk which contains the partition table and a primary partition (i.e. a FAT32 filesystem). Think that as a USB pen image. I want to mount the primary partition to a local ...
4
votes
1answer
562 views

Trying to create an ISO of my bootable USB using the unix command: dd

i'm trying to create a (bootable) ISO (which i'll then burn to dvd) from the source being an bootable USB disk (it contains windows 7 and i've installed a number of PC's from it already). So i'm ...
4
votes
2answers
445 views

Recovering Ubuntu after filesystem was overwritten using dd

I had an Ubuntu installation on my laptop, on an encrypted LVM (this was /dev/sda1). I was planning to write an Arch Linux image to my USB drive (/dev/sdc1), following this guide - ...
0
votes
3answers
675 views

How can I copy my Mac's entire hard drive to an external hard drive?

I want to copy my entire hard drive to an external hard drive of equivalent size. I'm using a Mac, and I was thinking about booting Ubuntu so that I can use dd, but I'm not sure how to do that. If ...
2
votes
2answers
866 views

How to make a floppy image and overwrite the MBR

I am trying to make a floppy image with a working file system so that I can test a 2 stage boot loader. When I attempt to mount the floppy and then cp the second binary over to it, mount gets all ...
2
votes
0answers
319 views

Why does my disk ignore erase and write commands to some sectors?

I did an ATA secure erase on an SSD (with SystemRescueCD and hdparm). Some parts of the disk are reset to zero, but some parts are not. In particular, the MBR and the boot sector of a Windows Vista ...
1
vote
2answers
366 views

The 'real', 'user' and 'sys' description from time(1) differ when they shouldn't?

I read this SO question on 'real', 'user', and 'sys' descriptions and thought I'd play a little. Can someone explain why [root@lux ~]# time dd if=/dev/zero of=del.large bs=10K count=32768 32768+0 ...
0
votes
1answer
1k views

Mount part of a dd image as a truecrypt volume

I have a dd image of a full drive (as a file) that was using Truecrypt system encryption under windows. I want to mount the main partition from that image using Linux's Truecrypt. I am familiar with ...
4
votes
1answer
2k views

Using dd with bad blocks on a harddrive?

I'm looking to use dd to make a clone of failing harddrive. My concern is there will be bad blocks for surely. So my question is with dd will a bad block leave a gap the size of the selected ...
2
votes
1answer
2k views

How to do a hexdump of first track of HDD?

How would i do a hexdump in Ubuntu for the first track of a HDD? I am looking for a winhex-esque output if that makes sense. The first track has 63 sectors, each 512 bytes long. I tried dd ...
0
votes
1answer
921 views

How to wipe one sector with DD?

What is the dd command in Linux for securely wiping sector 62 of a hard drive. This sector lies in track zero, begins at offset 31744 and is 512 bytes long. I'd like to know how to wipe it over 1000 ...
1
vote
1answer
846 views

How to make a partition if I have a partition.img file?

I have an Acer laptop I've been toying with, at some point I backed up the 'Acer recovery' hidden partition using dd. iirc I used a LiveCD and something like: dd if=/dev/sda1 of=/mnt/remote/acer.img ...
0
votes
1answer
3k views

osx sudo dd if=/dev/disk0 of=/dev/disk1

Am I doing this right? The process isn't very verbose I am upgrading my HDD, I have a larger external drive I want inside my macbook. I want to copy the contents and partitions of my internal mac ...
5
votes
1answer
3k views

Can I resume an interrupted disk image done with dd?

I am going to reinstall my system and I want to backup it first. There is an 80 GB HDD with Ubuntu and 750 GB HDD on which I want to put image. So, I run a live CD and use dd to transfer my sda to ...
0
votes
1answer
2k views

How to boot dd image in QEMU?

I created an image of my Debian Squeeze running on a Sheevaplug using dd if=/dev/sda of=plug_SD-karte.img (sda is the SD card plugged into another computer). Now I want to emulate the Sheevaplug. I ...
2
votes
4answers
257 views

Can I copy the Macintosh HD to migrate my data to a new Mac?

I want to get a new Mac. Can I simply dd a disk image from my older mac's hdd to the new Mac with a bigger HDD (this will be further partitioned, but the old osx drive will fit within one OS X-style ...
2
votes
1answer
174 views

cleanup after “dd” operation

I'm using dd with "excl" option. If interrupted with CTRL+C "dd" leaves the the file it has created and not finished to write. I need to clean it up in such case with the trap INT. However, I don't ...
0
votes
1answer
2k views

How to create an image.dd file to be used in virtualbox?

I want to backup my Windows machine before I put Ubuntu on the hard drive instead. Following the instructions on the VirtualBox website it says to create an image.dd file using dd. I booted up from ...
12
votes
3answers
11k views

How to pad a file with “FF” using dd?

How to pad a file with 0xFF using dd? This command will pad the output file with zeroes until the file size reaches 100 KB: dd if=inputFile.bin ibs=1k count=100 of=paddedFile.bin conv=sync ...
2
votes
1answer
321 views

What number of bytes should I set the bs to in the dd command?

I have just created a usb boot disk so that I can install Fedora 14. I used the following which was successfully. However, I am left wondering what does the bs parameter actually does. I know it mean ...
2
votes
1answer
290 views

wipe disk with dd

I know we can wipe a hard disk using random data or zeros, but is it possible to wipe using a fixed string ? e.g. is this correct? dd if="string" of=/my/harddisk ... Also, does the options below ...