dd is a traditional utility for binary data copies

learn more… | top users | synonyms

1
vote
1answer
24 views

Understanding sparse files, dd, seek, inode block structure

At work we use sparse files as part of out Oracle VM environment for the guest disk images. After some questions from a colleague (which have since been answered) I am left with more questions about ...
19
votes
4answers
5k 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, ...
-3
votes
1answer
21 views

why does does windows run checkdisk after I clone into a vm disk it using dd? [on hold]

I decided to create a vm image of one of the windows desktops using the following commands in ubuntu live cd. /dev/sda is the windows drive to backup. /dev/sdb is the extra drive to store the image. ...
4
votes
1answer
115 views

Use backup file from dd to restore hard disk and also extract files

I made regular complete backups of my hard disk (with all partitions) using dd tool as backup.img file. I have several such files. Now that my old hard disk died, how can I use backup.img file to ...
12
votes
2answers
605 views

dd: write to multiple disks?

I have 2 exactly same formatted, same size and same brand SD-cards. I would like to dd image to /dev/disk2 and to /dev/disk3 at the same time. Pseudocode sudo dd bs=1m ...
0
votes
1answer
33 views

Full system backup with dd include symlinks

I'm really new in unix and Linux and just tried to learn something. My question is how can I make full system image/backup with dd include symlinks? Is dd good or I should use another approach? Can ...
5
votes
4answers
3k 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 ...
1
vote
2answers
36 views

Can't clone hard disk with dd no space left

I am trying to move elementary OS from primary HDD to external HDD. So, I can boot elementary OS from external HDD and install Windows 10 on primary HDD. Hewbot on super user stackexchange suggested ...
0
votes
1answer
26 views

Sometimes syncing gets stuck with dd

Sometimes when I use dd then sync or use dd with conv=fsync, the syncing process gets stuck, but sometimes not, with exactly the same input and output targets and configuration. dd ...
13
votes
4answers
665 views

dd: multiple input files

I need to concatenate chunks from two files: if I needed concatenate whole files, I could simply do cat file1 file2 > output But I need to skip first 1MB from the first file, and I only want ...
2
votes
2answers
2k 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
12 views

How do I create an bootable UBCD-stick using FreeBSD?

I have an UltimateBootCD-image-file (iso) and I want to create a bootable usb-stick from it. I tried dd'in it, % dd bs=4M if=/path/to//ubcd.iso of=/dev/da0 && sync 103+1 records in 103+1 ...
93
votes
12answers
75k views

How do I know if dd is still working?

I've not used dd all that much, but so far it's not failed me yet. Right now, I've had a dd going for over 12 hours - I'm writing an image back to the disk it came from - and I'm getting a little ...
22
votes
3answers
31k views

How to dd a remote disk using SSH on local machine and save to a local disk

How can I create a backup of a remote disk using SSH on my local machine and save it to a local disk? I've tried the following: ssh hostname@my.ip.address "sudo dd if=/dev/sdX " | \ dd ...
1
vote
2answers
58 views

What's the POSIX way to read an exact number of bytes from a file?

Just hit this problem, and learned a lot from the chosen answer: Create random data with dd and get "partial read warning". Is the data after the warning now really random? Unfortunately ...
2
votes
2answers
54 views

Terminal: create bootable USB from iso

How can I create a bootable USB stick from an iso image? I thought dd should do the work, but so far I were unsuccesful. This is what I've tried: umount /dev/sdx deleted every partition on sdx ...
0
votes
1answer
41 views

Update Dell Latitude BIOS with “dd” command rather than “UNetbootin”

I'm doing these instructions. I cannot use UNetbootin, therefore I'm trying dd command instead: sudo dd if=~/Downloads/fdbasecd.iso of=/dev/sdc bs=10M After dd, the filesystem of bootable USB is ...
1
vote
3answers
373 views

Copy content from files X and Y to create file XY but XY content is all lowercase

What's the right command to copy the content from file X and File Y to create a new File XY with all letters being lowercase?
0
votes
0answers
42 views

Why does hdparm and dd show two completely different results?

I have an external hard drive (/dev/sdc1) mounted at /mount1 When running hdparm -tT /dev/sdc1 I get: /dev/sdc1: Timing cached reads: 2246 MB in 2.00 seconds = 1123.75 MB/sec Timing buffered ...
0
votes
3answers
45 views

Modifying a byte with bash, dd isn't working

I'm trying to modify a byte with bash, So I will write the bytes before the offset, then the byte to modify, and the rest of the file. But the following script doesn't work as expected Anyone ...
2
votes
2answers
43 views

Efficient Use of dd (buffer many blocks, process one at a time)

Given a file, I need to search for the number of blocks that matches an input block $templateBlock of certain size $blockSize. What is an efficient way to use dd to accomplish this task? The ...
4
votes
4answers
921 views

What is this dd if=/dev/zero of=/dev/sda do

Could someone help me understand what I got? dd if=/dev/zero of=/dev/sda bs=4096 count=4096 Q: Why specifically 4096 for count? dd if=/dev/zero of=/dev/sda bs=512 count=4096 seek=$(expr blockdev ...
0
votes
1answer
29 views

SSHD cloning - something special to keep in mind, compared to HDD?

The question is whether the fact the device is a hybrid disk has any (and what) importance when using dd or other such tools, or if all operations run the same as for a HDD. The context The device ...
0
votes
0answers
32 views

How to image a CentoS 7 i386 ISO to a USB device?

Usually if I want to image a CentOS 7 ISO (or any Linux ISO for that matter) to a USB device, I do this via dd as follows dd if=CentOS.iso of=/dev/sdX bs=8M However I've tried this method with a ...
9
votes
3answers
4k views

Are there alternatives for `dd`?

What other tools should I use to read and write files with truncation, seeking and skipping. dd's command line options seem inconvenient and foreign and I don't like choosing between slow, but precise ...
0
votes
1answer
47 views

Running dd. Why resource is busy?

I just formatted microSD card, and would like to run a dd command. Unfortunately dd command fails: $ sudo dd bs=1m if=2016-02-26-raspbian-jessie-lite.img of=/dev/rdisk2 dd: /dev/rdisk2: Resource busy ...
1
vote
1answer
22 views

How to clone an entire disk to a larger disk and then offload?

The title might be a bit confusing, so in detail: What I have done is clone a small 32GB flash module that had three partitions. I happened to have a 32GB USB lying around, so I thought it might just ...
3
votes
0answers
12 views

Looking for a way to backup/mirror a drive by swapping

I want to duplicate a drive. I am unable to hook up both the old and new drive at the same time (the old powerbrick died; so I have one powerbrick to swap between two drives). In years and years ...
1
vote
0answers
55 views

BASH dd problem

i am trying to learn bash and now im trying to do a script for burning isos. I made the number "4" command to make sure the variables were right. the message i get when i complete my program and ...
1
vote
2answers
33 views

Can I use dd to move my system to another partition?

Currently, my whole system is located at the end of my hdd. I'd like to move that data to the beginning and still have booting and other details working. dd seems to do exactly what I want (to copy ...
1
vote
0answers
56 views

how to copy a piece of a text file byte-by-byte to another text file? dd, head, or?

I need to grab the first lines of a long text file for some bugfixing on a smaller file (a Python script does not digest the large text file as intended). However, for the bugfixing to make any sense, ...
0
votes
3answers
80 views

dd show 'raw' progress while piping output

I am attempting to perform a specific dd operation and appending 'raw' data of the transfer to a log file which will be polled by something else, to provide a live view of the transfer on another ...
0
votes
1answer
18 views

Restore a disk from a snapshot in XEN 4.6

I created a snapshot with lvcreate -n snap01.vm01 -L 5G -s vg0/vm01.eclabs.de now I did some stuff on my disk i don't want to keep and want to revert it to the snapshot point. How do I restore ...
2
votes
0answers
16 views

confused about dd write speed and VFS page cache

After reading some articles on the Linux VFS page cache and the tunable parameters like dirty_ratio i was under the impression that page cache would operate as both read and write caching layer. But ...
1
vote
1answer
49 views

LVM devices not showing in initrd but working on boot [duplicate]

I am currently working on a custom initrd based on the CentOS 6.7 (2.6) kernel with the following modules loaded. The initrd is designed to backup files off a old RHEL system into memory, unmount the ...
1
vote
0answers
39 views

IOSTAT report doesn't match with DD benchmark

I am running a DD benchmark but the obtained results are not matching with the IOSTAT values. This is the DD sample: $ sudo dd bs=4096 count=690 if=/dev/zero of=/mnt/tmp/test oflag=dsync 690+0 ...
1
vote
1answer
39 views

Wipe files from an external hard drive but not empty space

I'm using the following command to wipe an external drive. sudo shred -v -z -n 1 /dev/sdb Is it possible to wipe an external drive of the files and not empty space? So it would overwrite where ...
0
votes
1answer
40 views

GDiskDump or DD to show partition names? [duplicate]

I have partition names like Data-HD, Yhteinen and W10. I do have lots of other partitions, but I want a little more assurance I am copying a right partition to a correct destination. I am quite ...
1
vote
2answers
173 views

8GB USB disk listed at only 512B or 10MB?

I made an Arch Linux ISO USB drive, and I'm trying to restore it using the directions from the Arch Linux wiki. After running: $ sudo dd count=1 bs=512 if=/dev/zero of=/dev/sde && sync ...
2
votes
1answer
50 views

Taking and restoring an image of partition with dd

I created a new partition on my server /dev/sda4 with a filesystem based on ext3. I mounted the new partition /dev/sda4 on /mnt/sda4/ and created an image with dd of the partition /dev/sda3. sda3 is ...
5
votes
2answers
466 views

How large is the img that dd creates?

This is the first time I use the dd command. I execute: dd if=/dev/sdb2 of=/mnt/sdc1/Hdd1.img bs=512 conv=noerror,sync Where the sdb is the destroyed hdd (size: 500 GB). I copying the partition ...
0
votes
0answers
52 views

ARM inforce IFC6540 not booting?

I created an image of the OS on the 64GB SD card by using dd. I did something like sudo dd if=./iforgot of=/media/usb/os/os.image I can't remember the exact stuff I wrote, but I do have the os.image ...
2
votes
1answer
55 views

Is there a way for a dd of a 80 GB hard drive to be minimal in size?

For backup reasons I need to use dd to copy a whole hard drive (including MBR, partitions,...). The hard drive is 80 GB in size where only 1.8 GB are used. The command I'm using is the following: dd ...
1
vote
0answers
22 views

Is it feasible to fill a ntfs partition/device pre install with zeroess?

In my question about copying with dd one of the commentors pointed out the method of filling the unused space with 0s. Is there a way for a dd of a 80 GB hard drive to be minimal in size? Now after ...
0
votes
0answers
43 views

dd process real vs. sys time

I have two quad core workstations. One is based on Intel Atom x86_64 architecture (WS1). Another one is based on armv7l architecture (WS2). Both are running 3.10 kernel version. Identical busybox dd ...
11
votes
4answers
4k 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 ...
14
votes
4answers
3k 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. ...
0
votes
4answers
173 views

MBR size is 440 bytes or 512 bytes

I remembered reading one question how would you back up the MBR of a disk. Two of the choices are dd if=/dev/sda of=/dev/sdb bs=512 count=1 dd if=/dev/sda of=/dev/sdb bs=440 count=1 and the ...
0
votes
0answers
19 views

Used dd on a pen drive (wrote Arch to it with Rufus) and now it's invisible

I ran dd if=/dev/zero of=/dev/sdc count=2048 on the pen drive. I can see the pen drive in the lsusb output, and dmesg says that it is 8 GB in size, but when I use, say, cfdisk, it says that there is ...
0
votes
2answers
43 views

dd count default

What is the count default in dd command if not specified ? dd if=/dev/mem bs=1k skip=768 instead of full form like dd if=/dev/mem bs=1k skip=768 count=50 I did not find an answer with Google.