dd is a traditional utility for binary data copies

learn more… | top users | synonyms

0
votes
0answers
5 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 ...
1
vote
2answers
46 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
46 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
34 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 ...
0
votes
0answers
27 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
34 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
40 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
811 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
25 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
24 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 ...
0
votes
1answer
42 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
19 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
54 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
30 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
52 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
77 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
14 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
45 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
34 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
36 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
36 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 ...
2
votes
1answer
38 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
458 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
41 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 ...
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 ...
2
votes
1answer
50 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 ...
0
votes
0answers
38 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 ...
0
votes
0answers
17 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
4answers
131 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
2answers
41 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.
1
vote
1answer
27 views

I/O Failure when overwriting entire disk

I'm trying to write random data over a partition on my local hard disk. I'm booted into a recovery live CD (Clonezilla) and have tried the following: $ dd if=/dev/urandom bs=1024 count=4 | base64 | \ ...
0
votes
1answer
70 views

Parallelize openssl as input to dd

I am using @tremby's great idea to fill a disk with random data. This involves piping openssl, which is encrypting a lot of zeros, to dd (bs=4M). I'm maxing out the single core on which this is ...
2
votes
1answer
46 views

Transfer content of LVM block device ensuring consistency - LVM snapshot?

I need to create off-site full backups of an LVM block device. Thinking the old dd over SSH method. To ensure I have a consistent backup, should I create an LVM snapshot first? So new changed blocks ...
5
votes
2answers
139 views

how to deallocate /dev/ram0

I have allocated /dev/ram0: dd if=/dev/zero of=/dev/ram0 bs=1M count=1024 Now I have 1Gb sitting in memory. How do I free up the allocated space ?
2
votes
2answers
101 views

How can I manipulate a partition table file without fdisk checking the validity of it?

I'm creating an image in memory (/tmp is a tmpfs): $ dd if=/dev/zero of=/tmp/sdcard.img bs=512 count=3147775 It's supposed to hold a partition table and the first 3 partitions of a device $ ...
0
votes
1answer
113 views

Using dd command to download mtd block

How to use dd command to download mtd block from embedded Linux-based device? # cat /proc/mtd dev: size erasesize name ... mtd3: 003a0000 00010000 "DRTI2" I need download mtd3 block, so dd ...
13
votes
2answers
854 views

Why do these duplicated SD cards have different sha1sums for their content?

I have a bunch of Class 10 UHS-1 SDHC SD cards from different manufacturers. They are all partitioned as follows $ sudo fdisk -l /dev/sdj Disk /dev/sdj: 14.9 GiB, 15931539456 bytes, 31116288 sectors ...
4
votes
2answers
71 views

Is `dd` really necessary to clone a disk? [duplicate]

Almost any tutorial will tell you that to clone a disk on the command line (say, to clone /dev/sda to /dev/sdb) you can use: dd if=/dev/sda of=/dev/sdb ...and some block size options... This reads ...
1
vote
1answer
160 views

dd, cat & openssl: block size & buffer size

Here it says that when using dd through dm-crypt to overwrite a block device, only the default dd block size should be used because dm-crypt's block size is the same (512 bytes), and increasing dd's ...
0
votes
2answers
149 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
32 views

Compare two files, while overriding second file's size

I am trying to verify a backup that I made using the following command: dd if=/dev/sda of=/dev/sdc2 I backed up the contents of /dev/sda (internal hard drive) to /dev/sdc2 (external backup drive, ...
1
vote
0answers
76 views

Restore errors: “bad header/extent: invalid magic - magic 1701”

I'm testing these instructions to restore a backup image to an Intel Edison from a previous .img image. The backup line was: dd if=/dev/mmcblk0 of=sd/ubilinux_image.img I removed a file (to see if ...
4
votes
2answers
113 views

Why is dd reading from and writing to the same disk?

I've been using dd in Linux to overwrite an external USB hard drive. When I use the default block size of 512 bytes, with this command: # dd if=/dev/zero of=/dev/sdb throughout the whole ...
1
vote
3answers
369 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
92 views

dd speedup by async reads/writes

I was copying an SSD to an identical one today: dd if=/dev/sda of=/dev/sdb bs=4M They were connected by a SATA cable. While stracing dd I noticed that it was doing the "naive" thing: read 4M from ...
4
votes
1answer
139 views

How does cat 'know' the optimum block size to use?

From reading this, it seems that when copying data to a different hard drive, cat automatically uses the optimum block size (or very near it). I wonder how it determines the optimum block size, and ...
2
votes
3answers
152 views

Using dd to clone a disk while mounted - risks?

I want to clone a hard disk using dd. Because I want to keep a process on the machine alive continuously, I would like to do this while the filesystem is still mounted. I understand this is not the ...
0
votes
1answer
33 views

How to recover a node/content from a tarfile that's been overwritten

Disclaimer: I'm not very good at writing questions, and mine is a very specific scenario. So I'm just going to jump straight into the situation: I was browsing my filesystem, and somehow managed to ...