Questions tagged [dd]

A common Unix program whose primary purpose is the low-level copying and conversion of raw data.

145 questions with no upvoted or accepted answers
Filter by
Sorted by
Tagged with
8 votes
1 answer
703 views

dd always fails to write one partition on first try; succeeds on second

For a robotics project, I've assembled a make target that uses dd (actually dcfldd) to write a Raspbian Jessie image to SD card. This way, I can be assured that my environment is reproducible from ...
tsbertalan's user avatar
5 votes
0 answers
872 views

msys-1.0's dd on windows

msys-1.0 (MinGW) has an implementation of dd usable on windows (dd.exe) but windows does not have file representations of drives to use with dd. Or does it? Afaik dd operates on files. Is there a way ...
panny's user avatar
  • 665
5 votes
1 answer
7k views

How can I run dd as fast as possible?

I'm learning bash, and what with all the confusion around the many, many different ways there are to zero-write a drive or transfer data from/to one (shred vs dd vs pv vs cat vs tee and so on), I'm ...
Hashim Aziz's user avatar
  • 12.8k
4 votes
1 answer
866 views

dd an image, but only getting a fraction of the space on my SD card

I downloaded an image of Ubuntu Linaro. I then dd the image onto an SD card that is 32GB as follows: sudo dd bs=4M if=ubuntu-14.04-hdmi-z7010-20140611.img of=/dev/mmcblk0 Works fine, I can boot from ...
Ivan's user avatar
  • 153
4 votes
1 answer
267 views

Why is my 500GB hdd not readable after dd'ed on a different 500GB hdd?

Accidentally formatted an important external 500GB hdd yesterday. Not an SDD, 2.5". (Quick) formatting occured while installing windows xp on it. I had the wrong usb drive plugged in. ~600MB are ...
panny's user avatar
  • 665
2 votes
0 answers
659 views

Bad Superblock when mounting LVM SSD

I made a complete copy of my Fedora boot ssd using dd however the new drive does not boot correctly and is not mountable when connected via usb enclosure on a different machine. I get a bad superblock ...
Matthew Simmons's user avatar
2 votes
0 answers
438 views

Prevent filesystem caching on tmpfs

Suppose that I want to put a big file (or a bunch of files) into a TMPFS, for whatever reason. Using dd with various combinations of direct and nocache flags, whether I copy a file from disk or create ...
Mona the Monad's user avatar
2 votes
0 answers
478 views

Clone / Bit copy a DD-WRT router

I have an ASUS RT-AC68U running a very specific and fairly complex configuration which includes a /jffs filesystem. (The version of firmware is DD-WRT v3.0-r33525M kongac) Is there a straight-...
davidgo's user avatar
  • 70.8k
2 votes
1 answer
238 views

Why /home/.ecryptfs is missing inside dd image of LVM partition?

Disk Copy 2 month ago I backed up the 128G HDD of an old laptop with Ubuntu 16.04 on it, using dd: # sudo dd if=/dev/sda of=/media/victor/blackWD/ss9backup.img conv=noerror bs=128k status=progress ...
Sulliwane's user avatar
  • 121
2 votes
1 answer
169 views

Can't clone one SD to another with dd

I have: Broken 32GB micro SD card - cannot write anything to it despite trying to force with (hdparm -r0 /dev/sdc): EXT4-fs (sdc1): mounting ext3 file system using the ext4 subsystem EXT4-fs (sdc1): ...
Raprot's user avatar
  • 21
2 votes
2 answers
3k views

How to backup MBR with dd for Windows?

I am using dd for Windows to back up. I can back up partions on windows like this: dd if=\\.\g: of=x:\bottom_C_XP1.dd but when it comes to backing up master boot record of harddisk2 I cannot find ...
user1141649's user avatar
2 votes
1 answer
147 views

dd cannot write the last 24 kB of a disk

I have an old 320 GB laptop hard drive that I'm getting ready to sell (or donate). To prepare it, I'm using dd to write one pass of random data, then one pass of zeros: dd if=/dev/urandom of=/dev/sdb ...
smitelli's user avatar
  • 159
2 votes
0 answers
962 views

Can not mount copy of image file (ddrescue): "can't have a partition outside the disk"

I'm struggling for days now moving my old Windows XP installation to a new hard disk, because the old disk is failing. Long story short: I successfully created an image of the entire (failing) disk ...
MostlyHarmless's user avatar
2 votes
0 answers
3k views

Clonezilla Disk too Small when it isn't

I took a 320 gig hard drive, shrunk the partition for Windows to 40 gigabytes, and cloned the partition. I'm trying to restore onto a 250 gig drive. I keep getting either a failed partition table, or ...
Joseph's user avatar
  • 657
2 votes
2 answers
2k views

Can I clone a large hard drive (with little data on it) to a smaller hard drive (with no data on it) with “dd”? Is there a better way?

I recently got a new desktop, and two hard drives to go with it: a 128GB solid state drive, and a 750GB hybrid drive. I installed Windows to the hybrid drive, but have come to realize that it would ...
Austin R's user avatar
  • 121
2 votes
0 answers
137 views

dd backup produces bigger image file

I created a disk image with dd. The hard disk capacity is 2 GB. However, the image produced a 3.8 GB file. I used: dd if=/dev/mmcblk0 > /mnt/sd/disk0.img (where mmcblk0 is a microSD card, with 3 ...
stokastik's user avatar
2 votes
1 answer
251 views

Cloning a Windows partition through unix

my boot disk has chameleon installed with a linux partition and a second, empty partition that I would like to use with Windows7. Since you never know how much things will Win7 ruin when installing I ...
Jack's user avatar
  • 465
1 vote
0 answers
41 views

Reading tar tape with blocking factor 2048 on CentOS 7

I am trying to read a tar tape on CentOS 7 which was written on CentOS 5. I used blocking factor 2048. I can read tapes written with blocking factor 1024, but not 2048. Attempting to read the tape ...
John Varsik's user avatar
1 vote
1 answer
435 views

dd + gz = Even Worse /// Mount Valid Partition of Whole-Disk dd Image

I've got a 250G backup of a whole disk via dd, which was then piped to gz, thanks to the advice of one of my -genius- friends. Looks like the EFI boot partition was corrupted (pretty sure it's an ...
numonium's user avatar
1 vote
0 answers
658 views

Is it safe to use `dd conv=sparse` to migrate my system to a new SSD?

Back when HDDs were dominant, it's common to use the dd command to migrate system disks. But that creates a problem with SSDs: unused space from the source disk will also be written once, with either ...
Fred Qian's user avatar
  • 432
1 vote
1 answer
751 views

remove MBR of corrupted disk with 0 bytes

My Problem is that I have a external SSD drive which got corrupted and shows: Disk /dev/sdc: 0 sectors, 0 bytes And Problem reading disk in BasicMBRData::ReadMBRData()! Warning! Read error 22; ...
ilmio nome's user avatar
1 vote
0 answers
417 views

Unable to boot DD'd Windows 10 drive

NOTE: Already posted at https://unix.stackexchange.com/questions/657563/unable-to-boot-ddd-windows-10-drive . After no activity there for almost 5 days, and no option I have used in the past to move ...
user66001's user avatar
  • 1,247
1 vote
0 answers
8k views

Cloning a Windows 10 Hard Drive with dd

I'm migrating a Windows 10 install from a SATA 3 SSD to an NVMe drive for a friend. The plan was to image the drive, give the original disk back to my friend so he can use it in the meantime, and once ...
0x6A75616E's user avatar
1 vote
0 answers
598 views

How to mirror an NVME SSD onto another?

I'm not sure what the technical terms are for this, but I'm having the following problem: The internal SSD of my laptop died and set itself to readonly. It has all the recovery partitions and all that ...
Minix's user avatar
  • 145
1 vote
0 answers
564 views

SSD not working after cloning with dd

I was trying to clone a partition from my HDD hard drive to an SSD on another laptop. With dd I made a copy of the partition: dd if=/dev/sda3 of=/img.dd and then on the other laptop from a live cd I ...
Conde's user avatar
  • 121
1 vote
0 answers
626 views

MacOS: Create a raw (dd) Image of an APFS volume

I have a .sparsebundle and I would like to convert it to something that can be used outside of the apple bubble. APFS/HFS is supported by a bunch of tools, but sadly the image formats are not from ...
dsfsdfdsf23's user avatar
1 vote
0 answers
50 views

DD command speed

So the situation is: I've got an old Ipod 3g that's been jailbroken, and it's connected to my server, a windows machine, via ssh. The reason for that is that I want to make a copy of /dev/rdisk0 Ipod ...
forever_rainman's user avatar
1 vote
3 answers
1k views

USB Flash Drive not recognized after unsafe eject while dd was running

Wasn't thinking I'm going to end up here. What happened? I wanted to benchmark the speeds of a USB flash drive, which was USB 2.0. My system is Debian bullseye/sid 5.8.7-1. I used the same method ...
rel0adedd's user avatar
1 vote
0 answers
185 views

How to format `dd` speed units?

dd scales its reported speed (e.g. MB/s or kB/s), but I would like to enforce that it always use the same unit, e.g. B/s. How can I enforce that dd always prints the same units? Example usage: $ dd ...
tarabyte's user avatar
  • 2,323
1 vote
0 answers
586 views

Is it possible to create a bootable Windows drive with dd on WSL?

The title pretty much sums it up. I would like to copy my current Windows HDD to a blank SSD over SATA using the dd command in WSL. It's 2019, and I don't want to boot from an HDD anymore. Would this ...
mtonc's user avatar
  • 111
1 vote
0 answers
718 views

Compressing a DD image - caveats and optimal settings

I have a 30GB dd image of an SD card, and am using the 7-Zip command line to compress it. Are there any particular options I should enable or avoid when it comes to a dd image that, presumably, must ...
Hashim Aziz's user avatar
  • 12.8k
1 vote
2 answers
2k views

Can I recover a single partition with ddrescue?

I have a failed hdd (seagate 1Tb) with bad sector. I want to make an image of it with ddrescue. The problem is that I don't have a 1tb hdd to put the image on. The files that I have to rescue are ...
Psygno's user avatar
  • 21
1 vote
1 answer
682 views

dd not performing as expected in Cygwin

I am trying to backup an entire drive to an image file in Cygwin. $ dd if=/dev/sdc of=/cygdrive/i/Storage$/backups/2018-09-18.img conv=noerror,sync status=progress bs=1M 0+0 records in 0+0 records ...
user1023102's user avatar
1 vote
1 answer
1k views

How to securely erase HPA, DCO, and any bad sectors of a SCSI HDD

Does dd if=/dev/zero of =/dev/cciss/c0d0 bs=1M wipe over the HPA, DCO, and any bad sectors?
oshirowanen's user avatar
  • 1,730
1 vote
0 answers
641 views

dd a linux volume from windows

I'm booting Lubuntu from Windows 7 by installing Grub in the linux partition itself (and not the MBR), dumping the first 512 bytes of the linux partition on a linux.bin file and then booting linux.bin ...
mfloris's user avatar
  • 261
1 vote
2 answers
2k views

How to clone MicroSD Card Linux boot drive?

I have a Lubuntu installation booting from a MicroSD card. I want to clone the bootable MicroSD card so that I can restore it to another card if it fails at some stage in the future. Will the command ...
Ian M's user avatar
  • 181
1 vote
0 answers
157 views

Accidently dd a whole disk with Iso file. Can i recover it ?

Here is the story buddies : I dd'ed the wrong disk because of fdisk. By disconnecting an reconnecting Usb and External HDD fdisk did not refresh results. The consequence is as you can see : fdisk -...
Dreamxast Alexei's user avatar
1 vote
0 answers
160 views

image from androidphone via insecure adb to ubuntu pc fails via netcat (permission issue + broken pipe) - what is the reason?

I am using following tutorial to get an backup-image from my android phone (to recover lost pictures via photorec on ubuntu): https://www.packtpub.com/books/content/extracting-data-physically-dd I am ...
Bogotrax's user avatar
1 vote
1 answer
148 views

Copying an image via dd results sometimes in unbootable disk

I have the following setup of completely identical devices (Model and Revision are matching): Device A: OS fully installed, all required software installed. Device B: blank* disk Device C: blank* ...
DBX12's user avatar
  • 166
1 vote
2 answers
4k views

Ubuntu partition won't boot after cloning using dd

I have a Ubuntu 14.0.4 server. The goal is to have kickstart install 2 Ubuntu installations side by side dual-bootable. Ubuntu is installed OK on sdaX. I have used dd to clone this to sdaY. I have ...
Fort Ran's user avatar
1 vote
1 answer
621 views

Does shredding a hard disk drive decrease its lifetime and/or performance?

I'm trying to shred a 1TB hard disk drive with this command: dd if=/dev/zero of=/dev/sda bs=512 count="total sector number " But unfortunately, I'm interrupted twice because of power failure. So ...
TerminalOfLove's user avatar
1 vote
0 answers
252 views

Accessing files/directories in 'lost+found' following fsck of partially-dd'ed-over EXT4 filesystem

I'm trying to recover data from a 3TB EXT4 partition in an LVM setup of which I hosed the first ~1GB with dd and am having trouble accessing files which have been placed in lost+found due to ...
Ansel Pol's user avatar
1 vote
3 answers
5k views

Mount or open disk I backed up with dd

I used the command dd in order to generate a full copy of a disk (a SD card). Now I'm trying to retrieve the information that was stored in there, but I don't know how to read the contents of the file....
mrbolichi's user avatar
  • 123
1 vote
0 answers
750 views

Move HDD dd image to Raid-0 Fake Raid array

I recently robbed a spare 120Gb SSD from an old laptop with the intention to throw it in my desktop machine that had an existing SSD hdd of the same size. My goal was to make a dd copy of my existing ...
Eric Aho's user avatar
1 vote
0 answers
651 views

Install Remix Os to SSD drive using dd

I have successfully unlocked my Baytrail chromebook and I am able to run Remix Os from an USB stick. Now I would like to install it as the default operating system on the SSD. Knowing that Remix Os ...
alainsanguinetti's user avatar
1 vote
0 answers
132 views

Data recovery on flash drive showing incorrect size

I have a Kingston 32gb USB 3.0 flash drive that I need to recover data from. The problem is that the drive is now showing as 32.5kb of raw storage in Ubuntu (using gparted) and Windows is not ...
Michael Knechtel's user avatar
1 vote
1 answer
948 views

readom and dd are creating different ISO-Images

When I am making an ISO-Image from a disc, according to the MD5-Hash of the created file, there is a difference between the data. They also differ in size. Tested on two completely different devices. ...
M. Schmidt's user avatar
1 vote
0 answers
577 views

Can't boot from USB on MacBook Pro Retina

I downloaded the latest i386 netinst iso for Debian Jessie and have followed these instructions: http://www.ubuntu.com/download/desktop/create-a-usb-stick-on-mac-osx However, when I press alt/option ...
Carlos Liam's user avatar
1 vote
0 answers
321 views

Cannot mount western digital hard drive. Can I clone it?

I have a 1TB Western Digital USB3 external hard drive. Last day I dropped it and after that I was unable to mount it. The hard drive doesn't have a SATA connector but the circuit board translate from ...
Simone Gaiarin's user avatar
1 vote
1 answer
2k views

How to clone a bootable SD card to a little smaller card?

I have an 8G bootable SD card used for Raspberry Pi. Currently I bought an exactly same card, in order to clone the card. I have tried the following steps: Create an image from the old card: sudo ...
Timothy's user avatar
  • 215