Questions tagged [dd]

dd is a traditional utility for binary data copies

Filter by
Sorted by
Tagged with
6
votes
1answer
82 views

Has 'sync' been proved to be necessary when writing to a block device with 'dd'?

Every time I've written a file to an empty raw block device, e.g. # dd if=image.iso of=/dev/sdb status=progress I've never used any type of sync (i.e. sync; conv=fsync; conv=fdatasync; oflag=sync; ...
2
votes
1answer
65 views

How to reset a flash drive murdered by dd

I have a 64GB flash drive onto which I've previously dd'ed a Debian installation. I'd like to do this again (dd a complete Debian install from my machine onto the flash drive) but I've run into some ...
0
votes
0answers
22 views

Flashing an SD-card using the tsv descriptor file

ST uses a tsv file to describe the content of an sd-card. For example: #Opt Id Name Type IP Offset Binary - 0x01 fsbl1-boot Binary none 0x0 tf-a-...
2
votes
2answers
57 views

dd command to get data of specific range

In the dd command, we can use skip to skip n byte in a file. From nth byte to end of file is copied. But I want to copy binary data from 1228 to 1331 only. How do I achieve this with dd on Linux?
0
votes
1answer
44 views

Looking for a graphical dialog program that I can use for my bash script

I am trying to write a DD frontend in bash, and I was looking for a simple to use dialog program. I have used things like zenity before, but it was not complex enough for my needs. All I need is some ...
0
votes
3answers
36 views

Why am I getting an error message when trying to “wipe” my micro-sd card using dd command? [closed]

Purpose: wipe entire sd card, not just 'delete' Command:(umounted) "sudo dd if=/dev/urandom of=/dev/sda bs=8192" dd: error writing '/dev/sda': No space left on device 118139+0 records in 118138+0 ...
0
votes
1answer
34 views

How do you have granular control of dd?

I have a MicroSD card that is 64GB in size. I wrote an image to it that is 16GB in size with this: $ sudo dd if=my_image.img of=/dev/sdb bs=4M 3798+1 records in 3798+1 records out 15931539456 bytes (...
1
vote
1answer
19 views

Understanding iostat block measurements

I am trying to understand how data is written to the disk. I'm writing data with dd using various block sizes, but it looks like the disk is always getting hit with the same size blocks, according to ...
-2
votes
1answer
52 views

Will adding data to a hdd that already has data on it using the “dd” command overwrite the pre-existing data?

Will adding data to a hdd that already has data on it, by using the "dd" command, overwrite that pre-existing data? I do NOT want to overwrite any data. Data is being copied over from 1 hdd to another ...
0
votes
0answers
8 views

sg_xcopy to copy LBA of one device to another device

Hello I am trying to send an XCOPY request to copy LBA 0x1008 of my device. [root@dqaj222 ~]# sg_xcopy count=0x1008 if=/dev/sds of=/dev/sdu verbose=2 id_usage=disable --on_dst=/dev/sdu sg_xcopy: on-...
1
vote
0answers
17 views

Command to DD Write Only if Different?

I usually keep image based backups of certain computer drives that I generally create with a dd command piped into gzip (or similar). To restore a backup I simply reverse the process. Works great ...
1
vote
2answers
58 views

Show speed of dd on Solaris

I'm quite familiar with Linux, just now starting to learn Solaris. To benchmark a filesystem on Linux, I might use dd: dd if=/dev/zero of=/mnt/nas11/temp bs=1M count=1000 conv=fdatasync 1000+0 ...
0
votes
1answer
45 views

What is the difference between using “of=/dev/sdX” and “of=/dev/sdXY” in dd

First of all, this question is NOT the duplicate of this one, which compares lower-case "sdx" with mixed-case "sdX". Back to the question. If I have a formatted memory stick which is composed of only ...
0
votes
0answers
24 views

DWM broken after dd on Arch Linux

I have been trying to take a backup/copy of my GPT disk on one computer and then restore it on another. When I start the new computer, it seems as though the Arch Linux part of it is running fine, ...
1
vote
0answers
40 views

Piping Backups through Compression and Encryption

I am trying to backup a disk image of a local system to a remote system, in a way I can automate by bash script at a later point. Backing up and restoring was going well until I introduced encryption, ...
1
vote
0answers
46 views

Issue in following dd command

I'm new with this so bear with me... I have this command : tr '\\0' '\\377' < /dev/zero | dd bs=4096 count=1484095 of=/path/one Output: 1+1484094 records in 1+1484094 records out 8412124 bytes ...
0
votes
1answer
92 views

Difference between of=/dev/sdx and of=/dev/sdX when using dd command on Debian 10 Live USB

I am using a Mac, booting in efi mode a Debian 10 live usb that I created. In live mode, I am attempting to create a FreeBSD install usb by downloading it and dd’ing it to another usb stick. Before ...
9
votes
2answers
1k views

Is dd if=/dev/urandom of=/dev/mem safe?

What exactly does this do? I don't understand how you could access base memory with this...seems kinda weird. Is it safe? dd if=/dev/urandom of=/dev/mem
1
vote
0answers
44 views

Fast way to create virtual disks?

I want to create virtual 500GB ext4 disks on external usb disks and samba/nfs shares. For test purposes, I first tried with a 1GB file using the following commands. sudo dd if=/dev/zero of=/mnt/...
2
votes
0answers
32 views

dd measurement question

I am wrestling with some perceived performance issues on a 3-node HPE Apollo cluster running Linux. (The cluster supports a backup application.) These are very $$ servers. In our setup each node ...
2
votes
1answer
74 views

dd if=/dev/zero leaves drive contents in-tact? Bad USB stick?

I thought I could nuke all partitions of a drive by using dd if=/dev/zero of=/dev/sdX. In the past this has always worked for me, but in this case it is not working as expected. #check the partitions ...
0
votes
0answers
24 views

USB stick with hidden capacity?

While using dd on my USB drive, the USB drive accidentally got unplugged. The max capacity is 8GB, and 5GB had been written to it. Now, when I try to reformat the USB drive or even remove all ...
2
votes
1answer
32 views

How should I go about safely checking if performing dd on /dev/random is going to block?

I'm developing a shell script that only uses /dev/random in the following manner: dd if=/dev/random of=%{outputFile} count=512 bs=1 2>/dev/null I explicitly do not want to use /dev/urandom, even ...
0
votes
2answers
54 views

dd command - can it show record size when reading from tape

I have data on tape with a variable block size. when reading these tapes I can use tcopy /dev/st0 (for example) to show the record size as it reads from tape. Ultimately I copy the data from tape ...
-1
votes
1answer
62 views

Is dd on OS X the same as the UNIX version?

Although I considered asking this question in apple.stackexchange, my gut tells me the 'NIX crowd is more likely to produce a better response. In what ways is the dd (OS X version) command any ...
2
votes
2answers
31 views

Does dd change any data if `if` and `of` already have the same contents

I was gonna copy a partition to another partition using dd (dd if=/dev/arch_data/root of=/dev/sdd3), and it worked. But then I accidentally re-ran the same command again, and it takes a while so I hit ...
2
votes
0answers
17 views

Avoid pipeline stalls from write caching to usb drive

I have the following process I use for backups: btrfs send snapshots/home-2016-06-04 | zstd --verbose -T4 - | gpg --batch --passphrase-file /tmp/secret --compress-algo none --symmetric - > /mnt/...
2
votes
0answers
68 views

dd copied UUID - How to make GRUB2 find the correct partition?

Using Grub2 on Ubuntu LTS Xenial On sda1, I dd the partition to sdb1(which already has GRUB2 on the MBR) with sudo dd if=/dev/sda1 of=/dev/sdb1 bs=1M. I found that it also copied the UUID. So, both /...
1
vote
1answer
99 views

Burning a Linux Ubuntu bootable USB with dd

I am installing Linux on a machine and got the Ubuntu 18.04 LTS image. I formatted a 32 GB Sandisk drive on macOS with MS-DOS (FAT) format and GUID Partition Map scheme. I found the name of the disk ...
0
votes
2answers
46 views

Slow disk write speed

i installed new debian 9.8 server for DB application.it has two disk and running on vCenter 6.0. First write disk write speed 100-120 Mb/sec suddenly after for while disk write speed decrease ...
0
votes
2answers
38 views

Backup using dd reformatted disk from ntfs to ext4. Can I recover any of the files? [duplicate]

I accidentally started a backup from /dev/sda3 my root partition that is formatted as ext4 to my backup hard drive dev/sdb2 which was formatted as NTFS. I did this using the dd command: dd if=dev/...
0
votes
0answers
34 views

New CF memory card not empty (random pattern instead of zeros)

I recently bought a 16 GB "Sandisk Ultra" Compact Flash card for my camera. I always do some testing on new storage devices before starting normal use: first some scanning, then maybe a copy of the ...
2
votes
0answers
27 views

Is there a reason to use dd if I don't use any extra parameters? [duplicate]

I often use dd when I for example want to copy an image to a usb drive. I only do dd if=infile of=/dev/sdb. Is there any advantage to this over < infile > /dev/sdb? And is this the exact same as ...
1
vote
2answers
68 views

Resume DD on creating a disk ISO?

I'm trying to create a full disk ISO image of a 250GB HDD but I had to cancel the operation about 80% of the way through, it'd taken nearly 16 hours to get to this point and I'd rather not have to ...
1
vote
1answer
363 views

dd: No space left on device

I was restoring a backup of my Raspberry Pi on a new micro SD card. The original card was 16Gb and the destination card was 16Gb, too. However, during the transfer dd complained that there isn't any ...
1
vote
0answers
48 views

How to wipe a partition quickly with value zero? [duplicate]

I want to wipe a partition quickly.I search the answer in website. such as: dd if=/dev/zero of=/dev/sda1 bs=16M count=96 shred -v -z -n 1 /dev/sda1 But: All the commandline,will overwrite with ...
0
votes
1answer
1k views

dd command oflag direct and sync flags

I have the below shell script and I wonder whether oflag's direct does the sync automatically or it is explicitly required dd bs=10M oflag=direct,sync of=ofile.bin Also what is the difference in ...
0
votes
1answer
197 views

Can I restore a Grub installation using dd?

I have a dual boot system with this partition layout: # fdisk -l Disk /dev/sda: 596.2 GiB, 640135028736 bytes, 1250263728 sectors Disk model: SAMSUNG HM640JJ Units: sectors of 1 * 512 = 512 bytes ...
3
votes
2answers
141 views

dd doesn't overwrite the disk

I am running Ubuntu 18.04.1 in a Virtual Machine (VMWare) on a Windows host. I am trying to zero out an entire SD card using dd. This is part of the process I use to release embedded Linux to the ...
0
votes
1answer
115 views

connected old scsi disk via IDE->USB adapter, recognized in syslog but not fdisk?

I have an old hard disk I'm trying to check for data and format before recycling/donating. I'm using an IDE to USB adapter to connect the disk to my linux laptop. In my syslog I see the following ...
0
votes
0answers
292 views

Reading and writing NAND flash with dd

I have an embedded device and I'd like to backup the NAND flash. From the openwrt wiki I gathered that dd is not a suitable option for dumping. You can use dd, but the dump will be garbled. However, ...
1
vote
2answers
875 views

Create an image of the partition (only the used space)

I have a partition sdb1 of size 3.3 GB. From 3.3 GB only 1.9 GB is used and 1.2 GB is an empty space. I want to create an image of this partition. But I want the image to only have the used space i.e. ...
0
votes
1answer
80 views

In LINUX: Using dd to transfer shrunk partitions on a 2TB HDD to a 500GB SSD

A source HDA (2TB mechanical HDD) has 5 partitions on it (GPT) that used to occupy the entire capacity of the 2TB HDA. The Operating System resident on the source drive is Windows 10. Since the ...
2
votes
1answer
391 views

How to dd a local disk unto a remote disk?

I have a local machine that needs be migrated to remote disk. How can I do it with dd? I know local format for command dd if=/dev/sdx of=/dev/sdx count=x bs=x But how to do it via ssh direct from ...
1
vote
1answer
233 views

Why does replacing drive with a dd clone cause machine to hang at boot?

I have a home-brew media server based on a 800MHz Intel Atom with two big LVM drives and Debian 9 on a 250GB 2.5" drive. The latter is showing bad blocks, so I am intending to replace it. I booted ...
-1
votes
2answers
44 views

Data recovery after dd on a sda partition

I had installed opensuse in UEFI mode in my computer but having a legacy Windows so it did not appear in boot menu. Following a weird tutorial on the internet I dd the Windows partition of my sda. I ...
0
votes
2answers
121 views

What is the default behaviour when we mount filesystem with `nodev` option?

I read this in "RH413 Red Hat Server Hardening" course that we mount the filesystems with nodev which then does not allow the special files/devices to be mounted from it. However, it did not show an ...
0
votes
2answers
50 views

Why can't I create a bootable Win7 flash by simply dd'ing the .iso to /dev/sd*?

It so happens that I need to install Win7 on a PC with a brand new blank HDD (the old one failed). I have the needed .iso file (on my Android tablet) and the only place I can stuff a USB flash into ...
0
votes
1answer
244 views

What does dd write, when it encounters a input/output error?

I have a drive that's on the verge of failing (C5 a C6 are triggered) so I decided to make another backup while I still can. For that, I'm using dd to another drive of the exact same model. As ...
0
votes
2answers
131 views

cloning a linux image using dd

If I wish to clone my Linux image using the dd utility, I can do for example dd if=/dev/SDX of=/dev/SDY, where SDX is the internal memory device where the Linux image is stored, and SDY is the ...