Stack Exchange Network

Stack Exchange network consists of 175 Q&A communities including Stack Overflow, the largest, most trusted online community for developers to learn, share their knowledge, and build their careers.

Visit Stack Exchange

Questions tagged [dd]

dd is a traditional utility for binary data copies

0
votes
2answers
32 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
0answers
26 views

Flashing Debian Image on SD card Partition

I have an sd card with 2 Partitions. mmcblk0 is the disk and mmcblk0p1, mmcblk0p2 are the 2 partitions I have created. I am trying to flash the Debian OS on the Partition using the dd command. dd ...
0
votes
2answers
43 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
23 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
72 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 ...
1
vote
0answers
26 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
79 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
40 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
78 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
37 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
79 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
40 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
79 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
227 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
29 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
38 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 ...
0
votes
0answers
13 views

integrity check of uboot using dd

I just upgraded uboot using dd and it boot successfully : dd if=uboot_file of=/dev/mmcblk0 bs=512 The output is : 1360+1 records in 1360+1 records out I would like to read backup to ensure every ...
0
votes
1answer
115 views

grep for multiple elements of an array

I am trying to write a dd migration script that will do the following: read user input (max=4) into an array, called "array". the user will enter the logical volume names to be migrated. once each ...
1
vote
1answer
40 views

Bit banging with dd?

I need to change one byte at a well-known position of a binary file to a specific value, and am looking for a way to achieve that using command line tools. Constraints: I need to change one single ...
12
votes
2answers
2k views

Will dd if=/dev/zero of=/dev/sda wipe out a pre-existing partition table?

Will # dd if=/dev/zero of=/dev/sda wipe out a pre-existing partition table? Or is it the other way around, i.e, does # fdisk /dev/sda g (for GPT) wipe out the zeros written by /dev/zero?
1
vote
1answer
162 views

Mount an ext4 partition in another PC(Windows) at the same network in my Ubuntu Live?

Is there any way to mount an ext4 partition in another PC, running Windows, at the same network in my Ubuntu Live? My HD just died earlier today and I needed to use Live Distros until I get a new one....
2
votes
1answer
84 views

How can I move a single partition to another empty drive?

I've got a partition P1 (which contains my Linux OS) on a drive A. I've just gotten a completely new drive B (that is larger than partition P1 AND the entire drive A). I'd like to copy across the ...
1
vote
1answer
49 views

SD card img created with dd is all zeros [closed]

A computer illiterate family member asked me to recover photos from an SD card she used in her camera. She went to fetch them from her computer when it informed her that the device needed to be ...
1
vote
1answer
158 views

FIO reporting slow write speeds while DD reports fast ones

According to most disk benchmarks, sequential write speeds are typically very close to the read speeds. Mine are in the ~500MB/s range. $ dd if=/dev/zero of=tempfile bs=1M count=5120 conv=notrunc ...
0
votes
1answer
23 views

Unreadable block in multiblock reading on dd / ddrescue: How does it handle it?

Let's say that I set the block size of dd or ddrescue to 256K. A sector of flash drives usually has 512 bytes, a sector on optical data discs has 2048 bytes. Let's assume that in the next 256 KB, ...
1
vote
0answers
59 views

loop device not matching file size

I have a sparse backing file (NTFS) (made via dd seek=) that's a partial image of a damaged disk. The size as given by ls matches the original disk. However, when looping it, /proc/partitions shows it ...
0
votes
2answers
254 views

“dd” an image onto an sd-card from Ubuntu in Windows Subsystem for Linux

I have a bootable disk image file that I'd like to write onto an sd-card. However, I only have a Windows 10 machine available - it has the Windows Subsystem for Linux already installed, Ubuntu runs, ...
5
votes
1answer
92 views

System lags when doing large R/W operations on external disks

I am having some issues with system-wide latency/lagging when doing large disk imaging operations on an Ubuntu 18.04 system. Here's the system specs: Processor: Intel Core i7 (never near capacity on ...
18
votes
1answer
3k views

Why does piping `tar` into `dd` not stop until the disk is full?

I have a tar archive of a single disk image. The image inside this tar file is about 4GB in size. I pipe the output of tar xf into dd to write the disk image to an SD card. The diskdump never stops ...
1
vote
0answers
45 views

Cannot access mounted partition after using dd

I have used following command to create an image of mounted partition sda1: dd if=/dev/sda1 of=/dev/sdb1 'conv=noerror,sync' where sda1 is the one I want to "backup" and sdb1 is obviously target, ...
1
vote
0answers
39 views

When using TAB completion with dd command, options (like 'if' or 'of') disappear

When I type dd if= then hit TAB to complete, the file name is added, but the if= portion vanishes (and of= too, for that matter). So for example, instead of # dd if=input_file.iso of=/dev/sdb I get ...
0
votes
0answers
44 views

Why can't I mount array disks for dd?

When I have an USB disk recognized, I can do the 'dd' command and wipe data from the stick. I cannot do that with a SCSI disk from array such as NetApp. They don't seem to mount at all. The disk would ...
1
vote
1answer
39 views

df size of partition and dd-ed image with sparse flag does not match

The size of a partition is close to 2Gb and the actual used size is 1.5Gb, I am trying to make image of this partition using dd with conv=sparse flag enabled. The generated image by dd is of size 1....
2
votes
1answer
77 views

How to fill a device with zeros, without overwriting the bytes that are already zeros?

I have a USB flash drive usb 3, the reading speed is much more than the writing speed. Let's say that 99% of the flash memory is already full with zeros, and I would like to fill it with zeros until ...
1
vote
1answer
194 views

dd hanging & uninterruptible sleep (kernel quirk?)

So, this has been annoying me for years. This happens with more programs than just dd, but I find it happens very often with programs that involve raw filesystem manipulation. When I'm copying with ...
4
votes
3answers
389 views

Why does a gunzip to dd pipeline slow down at the end?

my command: gunzip -c serial2udp.image.gz | sudo dd of=/dev/mmcblk0 conv=fsync,notrunc status=progress bs=4M my output: 15930949632 bytes (16 GB, 15 GiB) copied, 1049 s, 15.2 MB/s 0+331128 ...
0
votes
1answer
380 views

How to change UUID after cloning a Mac HDD with `dd`?

After 1 day of googling and try&error I give up and ask for help. Long story short: I cloned internal HDD of my iMac (Mid 2011) to external SDD with dd command. Now I have two identical discs ...
2
votes
1answer
936 views

How to use dd if=/dev/mem in place of devmem ?

It seems like root@testbox:~# dd if=/dev/mem bs=1 count=4 skip=2149646336 | hd should be nearly equivalent to root@testbox:~# devmem 2149646336 32 But, while devmem works great, that dd invocation ...
0
votes
1answer
30 views

Moving an Linux OS image from a 4 GB flash drive to a hard drive

I have a small flash drive (4 GB) that has a stripped down version of Redhat Linux. I'm currently attempting to move this OS from the flash drive to a much bigger hard drive (500 GB) that is bootable. ...
0
votes
1answer
26 views

How can you replace a file on a raw device preserving filesystem integrity?

Say I have a Linux system and want to write to a raw device. But I want to replace a certain file on this device with a new version. Can this be accomplished? I think with dd you could maybe write the ...
1
vote
1answer
397 views

dd copy from an OS HDD to PCIe NVME SSD, SSD can't boot

Test 1: dd if=/dev/sdb of=/dev/sdc /dev/sdb is a bootable OS HDD, /dev/sdc is another HDD, after executed the above dd command, the /dev/sdc become bootable. Test 2: dd if=/dev/sdb of=/dev/sdc /...
-1
votes
1answer
32 views

Can I restore a Macintosh disk image using dd?

I have a clone of an entire Mac OS HDD that I created using dd, as: sudo dd if=/dev/sda of=/media/mint/backup/mac-backup.img I verified the integrity of the image at creation time using diff. Now I ...
1
vote
1answer
425 views

Why is fio seq_writes so much faster than dd?

I have a zfs server, where I ran a couple of dumb tests just for understanding, and it puzzles me. Context:- FreeBSD 11.2, ZFS with Compression enabled, SAS HDDs, RAIDz2, 768GB of memory. Both ...
1
vote
1answer
296 views

Creating a raw img file of linux system

I'm trying to backup a linux system to an IMG file that I can then boot and run in QEMU. NOTE: I have tested on Lubuntu and tiny core linux. The process I have followed is: I have 2 hard disks, ...
0
votes
1answer
80 views

dd copy a HDD to USB but fail to boot? [closed]

dd if=/dev/sdb of=/dev/sdc bs=10M /dev/sdb is a HDD with installed CentOS7 and able to boot. if /dev/sdc is another HDD, the dd copy works OK, /dev/sdc can boot without problem. if /dev/sdc is a ...
2
votes
1answer
83 views

dd completes implausibly quickly

I'm running dd to copy a 1.8 GB image onto an SD card for a Raspberry Pi. This copies at about ~400MB/s, which is much higher than the write speed the manufacturer says this card can do. I therefore ...
1
vote
0answers
28 views

Reset all files after reboot

I have a little question. It is possible to reset all files of the system to the saved one? I thought about saving state with dd to other disk, then create "man in the middle" so after boot it will ...
5
votes
1answer
580 views

What's the difference in these commands - cat piped to dd and just cat? [duplicate]

I'm curious to know the difference between these two commands in Linux: $ cat ./boot.bin ./kernel.bin /dev/zero | dd bs=512 count=2880 of=devos.img and $ cat ./boot.bin ./kernel.bin > devos.img
1
vote
0answers
100 views

Why can't dd write to /dev/ram0 on Core Linux?

I created an ext2 file-system on /dev/ram0 ramdisk, and mounted it at /mnt/ram. mkdir /mnt/ram mkext2fs /dev/ram0 sudo mount /dev/ram0 /mnt/ram -o rw Reading from ramdisk with dd works. dd if=/dev/...