dd is a traditional utility for binary data copies

learn more… | top users | synonyms

3
votes
1answer
51 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
26 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
41 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
35 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
5answers
258 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 ...
1
vote
4answers
76 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
28 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
40 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
127 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
54 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
24 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
359 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 ...
1
vote
1answer
55 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
620 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
161 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
59 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
126 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
48 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
102 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
25 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
31 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
50 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
158 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
91 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
396 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
153 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
36 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 ...
3
votes
3answers
86 views

Resuming a DD of an entire disk

I'm overwriting my hard drive with random data using the good old dd: dd if=/dev/urandom of=/dev/disk/by-uuid/etc bs=512 It's a 2TB array and my MacBook (running Linux, ok?) can only write data at ...
12
votes
2answers
581 views

Why does dd from /dev/urandom stops early? [duplicate]

On my current linux system (debian jessie amd64), I am getting different behavior for dd using /dev/urandom (/dev/random behavior is properly documented). If I naively want 1G of random data: $ dd ...
3
votes
3answers
189 views

How to inspect the contents of /dev/sdt?

I have what I hope is not a huge problem, but could end up being a very large problem. For some context, I mistakenly ran this command on my 27'' iMac: sudo dd if=ubuntu-rescue.img of=/dev/sdt ...
0
votes
0answers
42 views

Why dd reads from output device?

While dding a CentOS 7 x86_64 DVD image to a USB drive (sdb), I monitored the progress with iostat. It kept alternating between mostly writing to the USB drive: Device: tps kB_read/s ...
0
votes
1answer
84 views

What does “dd” stand for? [duplicate]

What does dd stand for? I've always referred to it colloquially as "Disk Destroyer", but what are the "official" words that make up the acronym/command? According to this link and this link it could ...
0
votes
1answer
104 views

Delete labelled partition non interactively with one command

I know about fdisk and parted, but I was not able to figure out an non interactive way to delete a labelled partition. I imagine something like <command> <action> /dev/disk/by-label/LABEL ...
1
vote
1answer
59 views

From a sparse file to a block device

I have a system image sparse file which actual size is only a few MBs but the "apparent size" is about 1GB. I'm trying to write it to a block device efficiently (without the holes). Here are some ...
3
votes
1answer
224 views

losetup /dev/loop0 disappears after some time

at the moment I do some tests with loop devices on Linux/Ubuntu. In a small test script I have the following commands: #!/bin/sh rm testfile.x dd if=/dev/zero of=testfile.x bs=1M count=1200 losetup ...
0
votes
0answers
109 views

how to write dd command to replace backup image of root partition?

I have installed rhel6.5 in my pc. After that I have changed some configurations in file system. now I have taken backup image of /dev/sda1 which is a root partition of 15gb in size using the command ...
8
votes
3answers
163 views

How can `dd` be used to right-shift data blocks?

Consider a 100MB raw block device as a simple example. That is 204800 blocks of 512 bytes each for a total of 102760448 bytes. The challenge is to shift the first 98MB (200704 blocks) so there is a ...
3
votes
0answers
64 views

Hard Drive reporting all 1's after parted

So I have a 3TB hard drive /dev/sdc that I am trying to create a partition on. Before this point, I had the issues described below, I transfered the drive to a Windows 7 computer and created a GPT on ...
1
vote
3answers
82 views

Software RAID10 setup writes small files extremely slowly, is this normal?

I have a software RAID-10 setup on Linux 3.16.6-203.fc20.x86_64, with 1.2 metadata and the default chunk size (512K): $ cat /proc/mdstat md0 : active raid10 sdc1[4] sdb1[0] sdd1[2] sde1[3] ...
1
vote
1answer
118 views

mounting partition images made with dd

is there a way to mount and access a single partition on any mountpoint in my filesystem or must I use disk images and mount with offset? I made a partiton image with dd bs=4M if=/dev/sdb1 ...
1
vote
0answers
60 views

dd over smb to reformat ntfs as ext3

I've been told it's possible to use dd to reformat a portion of a Windows share drive from NTFS to ext3. I'd like to do this to be able to preserve permissions when using rsync for backups, but I ...
1
vote
3answers
77 views

Can I backup a 1TB drive onto a 750GB drive?

I want to backup a larger harddrive (1000GB), but sadly, I only have a smaller harddrive (750GB) available. In this particular case, I do not want to copy over the files, I want to backup the ...
1
vote
1answer
93 views

Can I use dd to quickly resilver a ZFS mirror disk?

My ZFS pool consists of two mirrored disks. I have two more disks which I plan to use for rotating offsite backups. The first backup disk was added to the zpool and has nearly completed resilvering. ...
4
votes
1answer
248 views

Write the same file multiple times to one file using dd

I am trying to create large dummy files on a drive using dd. I am currently doing this: #!/bin/bash writeFile(){ #$1 - destination directory/filename, $2 - source filepath $3 - blocksize, $4 - ...
1
vote
1answer
69 views

hexedit: change number of columns (bytes per line)

I am using hexedit to show/edit disk MBR (512 Bytes, copied with dd). When I open the file, hexedit displays the file as 9 columns, 4 bytes per column (36 bytes per line). That is very unfortunate. I ...
2
votes
1answer
1k views

What does the command pkill -USR1 -n -x dd mean exactly?

I am using dd to do a network transfer of a disk image to an sd card on my BeagleBone. Using pkill -USR1 -n -x dd in an ssh connection to this BeagleBone gives me a status update of the transfer ...
1
vote
2answers
61 views

How can I see processes being run by another instance of root on my Beaglebone

I am installing a Raspbian Linux image onto an sd card inserted into my BeagleBone Black. I will use this later in my Raspberry Pi. To do this, I am using the dd command from my MacBook Pro (via ...
3
votes
1answer
79 views

How to make dd fail if it invalid skip value is specified?

When I invoke dd with an invalid value for skip it prints an error message and does nothing, but doesn't return with a value different from 0, e.g. $ cd /tmp $ mkdir xy $ cd xy $ truncate -s 2M ...
6
votes
3answers
430 views

Why is dd not protected against writing on the active disk ?

I use dd a lot. I live in a contant fear of making a mistake one day, for example writing on sda (computer disk) instead of sdb (USB disk) and then erasing everything I have on my computer. I know dd ...
2
votes
3answers
1k views

can 'dd' be used to clone to a smaller HDD, knowing that partitions will need editing?

I've used dd to clone disks like this: dd if=/dev/sdb of=/dev/sda bs=4096 conv=notrunc,noerror,sync And it's always worked fine. Any and all docs on 'dd' take pains to remind you that the target ...