Questions tagged [dd]

dd is a traditional utility for binary data copies

Filter by
Sorted by
Tagged with
0
votes
0answers
20 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
34 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
votes
0answers
43 views

improve dd & tr speed on an Android device/shell

How to improve the speed of this command? tr '\0' '\377' < /dev/zero | dd of=/path/one Note that I'm executing on an android device. I have also tried to achieve the same thing with some scripts, ...
1
vote
0answers
43 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
38 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
994 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
31 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
29 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
64 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
23 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 ...
1
vote
1answer
30 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
48 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
60 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
30 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
16 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
48 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
72 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
41 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
31 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
33 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
26 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
57 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
304 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
47 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
578 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
118 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
114 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
79 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
231 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
544 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
75 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
284 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
160 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
42 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
93 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
49 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
231 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
121 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 ...
2
votes
0answers
54 views

md5sum of partition and img do not match

I booted Ubuntu on a live USB and ran: dd if=/dev/sda1 of=/mnt/usb/backup.img bs=30M oflag=sync I then performed a comparison (using 'md5sum') of the above input partition and output img, but they ...
0
votes
2answers
85 views

dd has damaged the root drive

Im using linux debian and tried to use this command sudo dd if=/dev/zero of=/dev/sdb on a usb drive, but I accidentally typed /devsdb whithout / char, and suddenly the OS turned of. As I turn it on it ...
0
votes
1answer
60 views

dd of=/dev/sdc stopped working until reboot

I use sudo dd if=file.iso of=/dev/sdc bs=1M && sync to copy yocto iso images to a flash drive. This usually works all the time without issue. Today it stopped working correctly it usually ...
1
vote
1answer
157 views

How can gnu_ddrescue be resumed to wipe a hard disk? [closed]

Hard drives (non-SSD) are generally wiped with the command dd if=/dev/urandom of=/dev/sdX conv=fsync status=progress. Since power outages do occur, this lends to restarting the wipe process multiple ...
11
votes
4answers
2k views

Why does writing random data using dd result in disk partitions?

Prior to running the dd command, the command lsblk returned the output below: NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT sda 8:0 0 931.5G 0 disk The ...
0
votes
2answers
45 views

How does the OS know which type of flash memory we are using

If for example I clear the contents of my SD card with command dd if=/dev/zero of=/dev/sdX , I'm guessing this completely wipes (sets to zero) every single content on the card? partitions, file system,...
2
votes
2answers
487 views

compressing and decompressing dd image - zstd instead of gzip

Earlier I was using fsarchiver to create compressed partition image. Due to some weird behavior I am choosing to replace it with dd. However, I like how fsarchiver compressed with zstd. So, I ...
0
votes
0answers
80 views

Did this dd command run too fast? [duplicate]

Usually people want to speed dd up but I want to slow it down, because I think there is something fishy going on with its speed. sudo dd if=hannah-montana-linux-amd64.iso of=/dev/sdb1 bs=512k 5988+...
0
votes
1answer
128 views

terminal flashing causing sd card to be unreadable

I am currently trying to flash my SD card, but keeps getting this error that the sd cards unreadable, I tried using etcher and dd, and it keeps doing it? I am trying to flash https://www.home-...
1
vote
2answers
2k views

How to get value of a memory address using command?

At the memory address, 0x7fffffffeb58 of a program lies a value, I want to find out the value of the address. Is there a way to get the value just by using commands? I've tried dd but to no avail.
0
votes
0answers
82 views

Cache behavior in dd command

I am performing some dd outputs and running in parallel vmstat: With no direct write (i.e. via cache) $ dd if=/dev/urandom of=somefile.txt bs=1M count=200 200+0 records in 200+0 records out ...
1
vote
1answer
58 views

Can recover data from disk but not from image of same disk?

So I'm creating this training scenario whereby participants have to take an image of a broken disk, loop mount and recover the data. It's supposed to be fairly basic, but I've come accross this weird ...