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

1
vote
1answer
39 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
46 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 ...
1
vote
0answers
20 views

dd command is initiating bios with read direction in device-mapper target

I setup a block level device-mapper target, and when I am writing to it using the following dd command: dd if=/dev/zero of=/dev/mapper/mytarget bs=4096 count=5 I have observed that there are a lot ...
0
votes
1answer
67 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
44 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
69 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
31 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
45 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
128 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
61 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 ...
1
vote
1answer
54 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
67 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
33 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
47 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
45 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
102 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
91 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
31 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
80 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
50 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
104 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
42 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
175 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
42 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
93 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
697 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
39 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
48 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
16 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
260 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
43 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
3k 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
209 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
178 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
59 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
333 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
28 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
62 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 ...
1
vote
2answers
506 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
120 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
46 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
42 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 ...
1
vote
1answer
46 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....
5
votes
1answer
123 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
326 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
572 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
650 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
1k 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 ...