dd is a traditional utility for binary data copies

learn more… | top users | synonyms

1
vote
1answer
24 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 ...
5
votes
2answers
73 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 ...
0
votes
0answers
14 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
19 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
18 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 ...
2
votes
2answers
52 views

Interpreting dd Input/Output error

I tried to copy /dev/Storage/Storage (an LV under LVM) to an image file using a dd | pv | dd pipeline. dd reported an error, and I want to know whether dd finished copying my disk or stopped due to ...
0
votes
0answers
24 views

Backup full drive structure, skipping one partition content

I need to backup laptop drive. But in fact what matters is not data as in my data files kept on laptop but all systems, settings, lvm and in general whole disk structure - partitioning, UUIDs, LUKS ...
3
votes
3answers
97 views

Does dd copy everything, including all metadata and all “empty” blocks

Suddenly something was messed up with my partitions, or just one partition. I have a default Ubuntu installation, on a Kingston SSD, with the root file system encrypted with LUKS, (using AES I think). ...
2
votes
1answer
51 views

RAID mdadm virtual disk too small

sudo mdadm --build /dev/md0 --level=linear --raid-devices=3 /dev/loop0 /dev/sda1 /dev/sda2 After running the above command, /dev/md0 is smaller than /dev/loop0 + /dev/sda1 + /dev/sda2. Why is that ...
2
votes
1answer
36 views

using dd command for folder, but deleted items don't seem deleted [closed]

here is the image I used dd command to create a new floppy. First I tried it with a folder filled with naber.bin, test.bin, blabla.bin and boot.bin. And then i deleted all except boot.bin. ls -a ...
2
votes
3answers
84 views

How can I copy three partitions of my disk with a specific beginning and ending using dd?

Using the fdisk -l command I got the following answer: Device Boot Start End Blocks Id System /dev/sda1 * 2048 28266495 14132224 27 Hidden NTFS WinRE ...
24
votes
2answers
1k views

Patching a binary with dd

I have read this quote (below) several times, most recently here, and am continually puzzled at how dd can be used to patch anything let alone a compiler: The Unix system I used at school, 30 ...
3
votes
5answers
60 views

How one can re-read image with dd so it will match one you just wrote?

I have a ~1GB image that I'm writing to a 8GB SD card via the dd tool. I'd like to verify that it was written without corruption by reading it back and comparing its hash with original one. ...
1
vote
1answer
26 views

how to use dd to backup second linux hard drive from os x?

I have a MacBook with Linux installed on the primary hard drive. On an external USB 3.0 drive, I have OS X installed. The external drive has plenty of space so I would like to boot up OS X and make ...
4
votes
4answers
193 views

How can I convert two-valued text data to binary (bit-representation)

I have a text file with two (2) only possible characters (and maybe new lines \n). Example: ABBBAAAABBBBBABBABBBABBB (Size 24 bytes) How can I convert this to a binary file, meaning a bit ...
1
vote
0answers
40 views

osx - dd command behaving weirdly [duplicate]

I've been using dd for a couple of years now, most of the time successfully. I usually use it to dd Linux images to USB drives. My workflow doing so is as such: convert .iso image to a .img format ...
4
votes
1answer
53 views

How to write to an .img file with two different partitions?

I have been working on building a Linux based OS for Raspberry-pi using buildroot. I am generating the required empty .img file using "dd" and "fdisk" utilities. I am creating two empty partitions ...
4
votes
2answers
83 views

What is actually the speed reported by dd?

I always thought that when doing: dd if=/dev/sdx of=/dev/sdy the report which is displayed once the command finishes, such as: 79304319+0 records in 79304319+0 records out 40603811328 bytes (41 ...
1
vote
1answer
62 views

How to clone an MTPFS partition of a mounted Android phone?

Using mtpfs I've mounted a Samsung Galaxy S5 and I need to make an image of its root partition. I want to use dd or the like, but nothing seems to be able to detect/reference an MTP and/or FUSE ...
3
votes
1answer
51 views

Size difference between an iso file burnt to a cd and the file retrieved with dd

I have an iso file (foo.iso) that I burnt to a dvd with the command : growisofs -dvd-compat -Z /dev/cdrom=foo.iso I then tried the command dd if=/dev/cdrom of=foo2.iso However, foo2.iso is ...
1
vote
1answer
116 views

cant run dd command on android device

The main objective is to send a splited file to an android and join it back up with a .sh script, the file is splited to 5MB parts but its total size is unknown (trying to make an universal script), ...
1
vote
0answers
56 views

Making an ISO of MBR + X amounts of partitions

I am trying to make an ISO of a Windows Backup disc that I "burned" to my microSD card, which I did in desperation due to lack of HDD storage at the time. Now I want to get it out of there and onto ...
0
votes
1answer
43 views

Hard Disk Clone Image Size

I've created an image backup for HDDA (partition) from HostA and saved on HostB ssh -c blowfish user@ip-or-hostname "dd if=/dev/sda1 | gzip -1 -" | dd of=sda1.gz conv=sync,noerror The HDD size is ...
3
votes
1answer
154 views

dd shows a random number of records in/out [duplicate]

I'm writing some images back to block devices, with dd, and getting very strange output I've never seen before. # xz -dc goren.img.xz | dd bs=1M of=/dev/storage2/goren 35+2475166 records in ...
2
votes
0answers
28 views

Can't figure out what all these sd drives are

So I created a WindowsXP install using an NTFS drive in VMPlayer and now I want to make an image of it using dd. Here is the diskpart info from Windows: Then I use Kali as a live-cd and I find like ...
0
votes
2answers
88 views

Writing ISO file to USB

I need to write a windows7 iso file on my usb stick. I had been used to this task. I usually either use the dd tool, or unetbootin. Surprisingly both don't work today. With dd I did the following : ...
3
votes
1answer
40 views

How to inspect the raw contents of a partition?

I'm trying to see the contents in raw bytes of a dummy partition /dev/sda3, which I've made to be 100MiB through gparted. I want to test writing and reading on that partition. Is there a tool that ...
9
votes
4answers
460 views

How to pad a file to a desired size?

I have a file that I want to pad until it reaches 16 MiB (16777216 bytes). Currently it is 16515072 bytes. The difference is 262144 bytes. How do I pad it? This doesn't seem to be working: cp ...
2
votes
4answers
163 views

Change only one bit in a file

I have to test a hash function and I want to change only a single bit of a specific file. I tried with the dd command. That works, but I can only change a whole byte and not just a bit. sudo dd ...
0
votes
0answers
40 views

What are the [internal] steps involved in making USB drive 'bootable'?

Whenever I have to install a new Linux distro, I create a bootable USB from the distro image using some specialized program like UNetBootin. Recently, I tried to do for Fedora using 'dd' command, but ...
2
votes
1answer
87 views

Syntax When Combining dd and pv

I am a linux newbie; so, sorry if this is obvious to you... sudo dd if=/dev/sda bs=64k | pv --size 1.5t | dd of=/dev/sdb Does the block size for dd go on the left side of this after the input as ...
1
vote
0answers
414 views

USB Stick recognized but not mountable

I have a USB Stick which is recognized by my laptop but there is no partition to mount. The device is listed in /dev/ as sdb but no partition /dev/sdb1. fdisk -l also displays nothing about /dev/sdb. ...
1
vote
0answers
99 views

Overwritten superblock and dd backup files recovery

Good day, yesterday I tried to extend my swap partition ('cause suspend/hibernation didn't work) and I needed to decrease size of my debian linux disk (I don't ever remember if it was ext2/et3 or ...
0
votes
1answer
29 views

How to image certain portions of hard drive only

I have a failed hard drive which I need to extract data from. My dd kung fu is failing me right now. I know that the drive is failing at sector 60515007 to 60517093 (512b per sector), and multiple ...
4
votes
4answers
459 views

How to fill a file with a stream from /dev/urandom with a specified number of lines ?

I am trying to fill a file with a sequence of random 0 and 1s with a user-defined number of lines and number of characters per line. the first step is to get a random stream of 0 and 1s: cat ...
2
votes
1answer
95 views

How can I cross compile the dd linux tool for arm?

I need to cross-compile a full version of dd because my device only has a busybox one that doesn't support many options. Where do I get the source for it? I've been looking on the kernel repo online ...
8
votes
5answers
847 views

Why specify block size when copying devices of a finite size?

In online tutorials it is often suggested to use the following command to copy a CDROM to an iso image: $ dd if=/dev/dvd of=foobar.iso bs=2048 Why must the byte size be specified? I notice that in ...
0
votes
1answer
199 views

extract number of bytes out of a file

Is it possible to extract a few number of bytes out of a file using dd ? The file is located on a secondary drive. I apologize if this is a simple question however I'm no pro at command line.
1
vote
1answer
92 views

dd'ing SDD, decreasing write speed

My hard drive is a SanDisk SSD. The drive is new. I've booted into ArchLinux Live System, with the intention of preparing the hard drive for full disk encryption. I've noticed a significant drop of ...
4
votes
2answers
234 views

How to delete part of a binary file without copying

I need to delete the first 2 bytes of a 6MB file. However, this is an embedded Linux with only 32 Mbytes RAM and less than 1 MB free flash memory. I tried using dd, as: 1 - # dd bs=1 skip=2 ...
3
votes
0answers
53 views

Have I destroyed data on drive?

I stupidly ran the following command on an external ext4 USB disk, typing /dev/sdb instead of /dev/sda which was the new disk I was setting up: dd if=/dev/zero of=/dev/sda bs=512 count=100 These ...
-1
votes
2answers
282 views

How to create a new partitioning table on SD card from the command line ? [closed]

I have tried to mount a SD card on Linux Mint, I have found the right device file and tried: mount -t vfat /dev/sdb /mnt/zauberportal ,but it failed and I tried some variations like different types of ...
1
vote
2answers
36 views

MBR and data on pendrive

I have a pendrive (/dev/sdd). I ran fdisk -l and that shows me the drive and its partitions. After that I did: dd if=/dev/zero of=/dev/sdd bs=512 count=1 I deleted the MBR (so the partitions ...
0
votes
2answers
34 views

Cloning a drive larger than your own

I made this nice backup system to turn drives into vdi's and put them on our network share. Then the next day my boss walks in with 20 new machines to replace our old ones, they have 2TB drives. How ...
0
votes
1answer
95 views

HD clone using LZ4 and DD fails

I've been cloning complete HDD images to restore OS crashes using DD and GZIP for a while now using dd if=/dev/sda | gzip > img.gz and gzip img.gz | dd of=/dev/sda This always working fine, but ...
3
votes
1answer
286 views

Why is dd so slow with a bs of 100M [closed]

I just tried to overwrite a fast ssd using dd. Using the ubuntu boot image I typed in: dd if=/dev/zero of=/dev/sda bs=100M error writing '/dev/sda': No space left on device blah blah 256 GB copied, ...
1
vote
0answers
173 views

RedHat machine will not boot when video card is removed

I "inherited" RH 6.4 on a computer with an nVidia video card. I took the image and dd'd it to another computer that has the same hardware. By design, the second computer will be headless. This ...
5
votes
2answers
419 views

dd writes to CF with delay

I have an old 64MB CF card which I use in my laptop(kernel 2.6.38) with CardBus adapter. If I write a 64MB image to this CF card, then the write speed is more than 200MB/s: T42 ~ # fdisk -lu Disk ...
2
votes
2answers
251 views

Multiple passes of wiping disk with `dd`

I want to use dd to overwrite a disk multiple times to destroy data beyond recovery. I know I could use dd if=/dev/zero/ of=/dev/sdx/ to do a pass with zeros, or dd if=/dev/null/ of=/dev/sdx/ to ...
1
vote
1answer
40 views

Can the BS option cause data inconsistency with dd?

I have a laptop partition (truecrypt) backed up with dd since it's impossible to back it up with anything else but do a raw bit by bit copy like: dd if=/dev/sda of=imagefile.img I can of course ...