Tagged Questions

dd is a traditional utility for binary data copies

learn more… | top users | synonyms

0
votes
0answers
19 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
110 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
26 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
32 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
36 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
20 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 ...
0
votes
3answers
39 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
30 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. ...
2
votes
0answers
73 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
37 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 ...
1
vote
1answer
53 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
24 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
20 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 ...
5
votes
3answers
393 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
77 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 ...
2
votes
2answers
97 views

How to parallelize dd?

I'm currently having trouble with dd invoked with a sparse file as input (if) and a file as output (of) with conv=sparse. dd seems to be using one core of the CPU (Intel(R) Core(TM) i7-3632QM CPU @ ...
4
votes
2answers
64 views

why do people use “notrunc” when making an ISO from a DVD?

There are many articles on the web that describe a command-line to make an ISO image from a DVD-Video disc like this: dd if=/dev/sr0 of=mydvd.iso conv=noerror,sync,notrunc I'd like to uderstand why ...
3
votes
1answer
97 views

Differences between dd in Mac OS X and Linux

When using Linux (Debian), I often use dd to copy a disk image to an SD card. I have written a script that throws an error if the device file specified in the "of" option is too large. This keeps me ...
2
votes
2answers
106 views

dd taking weeks

A few days ago, I got the message "Windows detected a hard disk problem". I got a new hard drive, and booted into Ubuntu using a live USB. I started cloning the failing disk using sudo dd ...
4
votes
1answer
40 views

dd, seek with one block size, write with another block size

Background Info: Copying some .bin files to an SD card (to be read by an embedded device, no filesystem) Commissioning the card requires some segments to be wiped (i.e. zero'd), and others to have ...
0
votes
1answer
84 views

Is it possible to use dd to clone only the part of the hard drive which is used?

if only 1/3 of a 300GB hard disk is used. Is it possible to use dd to clone the drive (but only the 100GB that is used)? dd if=/dev/sda of=clone.img
0
votes
0answers
59 views

GNU Guix usb-install freezes at GRUB after boot

I wanted to try out the GNU usb install that was released with Guix 0.7. The problem is that when I try to boot from the USB, it freezes, with the word GRUB and a flashing type line. I followed the ...
1
vote
2answers
127 views

how to use dd to fill drive with 1's

Filling a drive with /dev/urandom seems to be very slow, so I created a file filled with FF: dd if=/dev/zero ibs=1k count=1000 | tr "\000" "\377" >ff.bin I'd like to fill the drive with copies ...
0
votes
3answers
301 views

dd write vs read performance

I have recently done some performance tests on a new server (using dd) and wonder why read performance is so much worse than write performance? Shouldn't it be another way around? file size was in ...
3
votes
0answers
37 views

Is this a correct way to back up one big drive to two smaller ones?

I have a pre-fail drive, and while I'm waiting for replacement I am trying to do full back up to two smaller drives. Given that drive is 3TG and ones I have are 1.5 and 2TB, is this a correct way to ...
4
votes
1answer
262 views

Partially overwrote /dev/sda, can I recover anything?

I was messing around with my new hard drive, which only contains some personal files, and to check its write speed, I typed: sudo dd if=/dev/zero of=/dev/sda, /dev/sda/ being the new 2 TB connected to ...
11
votes
2answers
716 views

Is dd able to overwrite parts of a file?

I have a 1TB big file (disk-image from a damaged drive) and a 1.3MB small file (beginning of a disk-file). Using the contents of the small file, I want to overwrite portions of the big file. That is, ...
1
vote
1answer
79 views

How to use pv with dd?

I'm trying to use dd with pv to write an iso to a usb drive. I did: iso="myiso.iso"; dd if="$iso" bs=1M | pv --eta --size $(ls -l "$iso" | awk '{print $5}') --progress --bytes --rate --wait > ...
2
votes
2answers
251 views

dd to clone to smaller sdcard

One of my Raspberry Pi's is using a 4GB SDcard for the root/boot filesystem. As seen when mounted on another system: Disk /dev/sdc: 3904 MB, 3904897024 bytes 121 heads, 62 sectors/track, 1016 ...
1
vote
3answers
961 views

Full DD copy from hdd to hdd

UPDATE: 2 This seems a lot better than before (Thanks to Groxxda for the suggestions): sudo dd if=/dev/sdb bs=128K | pv -s 3000G | sudo dd of=/dev/sdc bs=128K ETA is about 9 hours for 3TB, whereas ...
2
votes
3answers
125 views

Why is dd running forever on a 8 GB drive

I have a filesystem handled by ZFS and it's about 8 GB. I tried to zero out the filesystem by running: dd if=/dev/zero of=/EMPTY bs=1M | true rm -f /EMPTY And normally on an ext4 filesystem, it ...
10
votes
5answers
645 views

Is it safe to take the drive image of the current working drive?

I have to backup my hard disk. I want to use dd and put the image on an external hdd. Can I do this using dd from the OS that resides on the hdd itself or do I have to boot from another device, for ...
1
vote
1answer
99 views

DD with a specific pattern

I was watching this Defcon video and around 4:30 he shows a custom pattern of drive wiping — the drive is filled with a constant text pattern. Whether he is joking or not, is this possible? How would ...
1
vote
3answers
423 views

1:1 copy with dd

I need to get a copy of an HDD that is a real 1:1, I mean not just the filesystem but also the geometry and the partition table and everything in between. if I'll just use dd if=/dev/sdb ...
1
vote
2answers
62 views

`dd` to specific location [closed]

dd is a great tool for copying and conversion. Is there any way by dd (or by any other way), to dump the first few bytes from a file to an unmounted partition? Something like this: dd if=hda2.pbr ...
3
votes
2answers
346 views

dd: 'bs', 'count' & 'seek'

I've read many guides and forum posts describing how to use dd, but one thing I've noticed is that people always use different values for the 'bs=', 'count=' and 'seek=' switches. Please can someone ...
3
votes
1answer
2k views

How to use SSH to make a dd copy of disk A from host B and save on disk B?

I want to make remote backups from disk A at will using SSH from computer B. I want to save the backups to disk B. How can I do this? I've tried using $ ssh hostname@my.ip.add.ress "sudo dd ...
1
vote
2answers
107 views

live dd over a mounted read-only root partiton

I'm trying to conceive a firmware update mechanism for a Linux-based embedded system without an additional initrd/initramfs/whatever. From within the running system which has a read-only mounted root ...
4
votes
3answers
129 views

Can I overwrite LUKS partition with it's decrypted content?

I have HDD with my data (partial backup of most important data available on other HDD), currently it's formatted as Ext4 over LVM over LUKS. I want to remove LUKS layer, but reformatting and data ...
2
votes
2answers
30 views

Backing up a partition

I am pretty new to linux. I mostly started learning after I purchased a couple of Raspberry Pis. I like to make backups of my images as I have often made the mistake of corrupting my data :). ...
3
votes
4answers
285 views

dd remove range of bytes

Given this file $ cat hello.txt hello doge world I would like to remove a range of bytes to end up with this $ cat hello.txt heorld I would like to do this with dd if possible. The reason is ...
-1
votes
2answers
79 views

How to unpack dd file on Windows? [closed]

Is it possible to unpack files created with linux dd tool on Windows? I have tried that tool http://www.chrysocome.net/dd, but it crashes under Windows 7. Any ideas?
0
votes
1answer
148 views

dd and rm -r commands

For me, the following commands do exactly the same thing: dd if=/dev/zero of=/dev/sd1 dd if=/dev/null of=/dev/sd1 rm -r /dev/sd1/* meaning, the result of their application is the same. Or least, ...
4
votes
1answer
181 views

What does this dd command do exactly?

I have the an embedded device with this SD card: [root@(none) ~]# busybox fdisk -l Disk /dev/mmcblk0: 3965 MB, 3965190144 bytes 4 heads, 16 sectors/track, 121008 cylinders Units = cylinders of 64 * ...
4
votes
1answer
174 views

Backup of a ubi file system with dd?

A have a root file system (file system - image containinf folder structure and content) on a flash drive. The flash drive uses UBI as the underlying file system file system - the way the data blocks ...
5
votes
1answer
616 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
733 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
233 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
813 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
894 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. ...