Questions tagged [dd]

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

Filter by
Sorted by
Tagged with
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
0 votes
1 answer
889 views

Linux Disk Write-Speed varies with dd command

Why there is so much of disk-write difference while checking with dd command without bs and with bs dd if=/dev/zero of=/tmp/test.log count=100000000 100000000+0 records in 100000000+0 records out ...
Karn Kumar's user avatar
0 votes
2 answers
1k views

Can I use dd to the drive it's running from?

This question is the reverse of this question. Let's say I have an image file. example.img, stored in a server that is accessible with ssh, rsync, and wget (whichever works). Then you have a PC with ...
Rinaldo Jonathan's user avatar
52 votes
2 answers
11k views

dd is producing a 32 MB random file instead of 1 GB

I wanted to produce a 1 GB random file, so I used following command. dd if=/dev/urandom of=output bs=1G count=1 But instead every time I launch this command I get a 32 MB file: <11:58:40>$ dd ...
Trismegistos's user avatar
0 votes
1 answer
250 views

Creating image of CF card produces inconsistent results

A friend is trying to clone a CF card using the following linux command: sudo dd if=/dev/sdb of=card3.img bs=4M status=progress but each time, it is producing a different image. The first two cards ...
Hiccup's user avatar
  • 329
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
9k views

Cloning Hard drive to smaller SSD [duplicate]

I have a 146GB HDD in one of my servers that I want to replace with a 120GB SSD. Can I just clone the drive with dd and have it boot just fine? Are there any repurcussions to cloning to a smaller ...
cclloyd's user avatar
  • 752
0 votes
1 answer
1k views

can Linux dd copy a single file from an ext4 formatted partition to an NTFS partition?

1) I would like to copy a single file from Ubuntu 18.04's ext4-formatted partition to Window 10's NTFS-formatted partition without going through an intermediate FAT32 partition. Can the "dd" command ...
TimDaniels's user avatar
3 votes
2 answers
134 views

Linux and using dd

I just received a new workstation and installed RHEL 7 on it, added user accounts, and installed the apps. Before I turn this over to the users I would like to find a way to "image" the disk (user ...
dave's user avatar
  • 31
3 votes
2 answers
15k views

How do I shrink the partition of an img file made from dd?

I've copied the USB drive to an .img file using dd: dd if=/dev/sdc of=myimage.img I want to reduce the size of the partition in the image. I've tried several methods and always end up with a ...
MrMas's user avatar
  • 182
1 vote
2 answers
2k views

How to check for exit code of the ssh tunnel?

I have a command of the form: dd if=/my/block/device | ssh myuser@otherserver "gzip > file.gz" How to check if the ssh command failed due to connectivity problems? Thanks.
feeling_lonely's user avatar
0 votes
1 answer
277 views

Potential Error with MBR on disk image

I am concerned that the disk image I am looking at has been corrupted or created in error some how. (more specifically the formatting of the disk that the image captured) The highlighted section in ...
Chester_McLovin's user avatar
1 vote
2 answers
5k views

Why does Rufus call a .vhd file a DD Image?

I've noticed that the latest version of Rufus comes with a potentially useful extra option: Create a disk image of the selected device. However, in the resulting dialogue I get this: Rufus seems to ...
Hashim Aziz's user avatar
  • 12.8k
0 votes
1 answer
822 views

Full hard drive cloning with dd slows to a halt

I'm cloning a 1TB drive to another 1TB drive using the dd command on Ubuntu using a live USB. I've been monitoring progress by running in another terminal: sudo kill -USR1 $(pgrep ^dd) At first ...
Martin's user avatar
  • 1
2 votes
1 answer
4k views

How to create a image of a HDD without the unallocated space?

I need to convert this HDD containing a Windows installation to a *.vdi in order to create a bootable *.img WITHOUT the unallocated space. Device Boot Start End Sectors Size Id Type /...
maxwhere's user avatar
  • 133
1 vote
1 answer
322 views

Cloning an (almost broken) HDD via dd

I have a HDD of 1TB size, that is almost broken. Sometimes I am able to boot to windows, sometimes the computer freezes at the windows boot logo and sometimes I am able to use it for a certain period ...
user3469811's user avatar
2 votes
2 answers
4k views

How to write say first n bytes of a binary file at a specific HDD sector using Linux dd?

I have a VMWare Virtual machine Windows 10 & I have booted into Live Linux Mint. I just want to write say first n bytes of a binary file to a specific sector on the HDD using dd on Linux. For ...
rajeev's user avatar
  • 1,646
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
2k views

DD image smaller than drive copied

I took a backup of my server's OS disk through a live USB. Using the command: dd if=/dev/sda bs=512 count=(30 gb worth of sectors) conv=noerror,sync status=progress | gzip -c > /path/to/removable/...
Scu11y's user avatar
  • 13
5 votes
2 answers
2k views

Filling file with 0xFF gives C3BF in OSX

This command will fill the file with 0xff in Linux. dd if=/dev/zero ibs=1k count=100 | tr "\000" "\377" >paddedFile.bin When I run it in OSX, the results are different. $ dd if=/dev/zero ibs=1k ...
Synesso's user avatar
  • 561
0 votes
1 answer
2k views

Cloning a SSD to an ISO on a USB

I have a micro controller with an external SSD, running Ubunto, and I want to create a complete clone to a USB stick. Size isn't a problem. I have 60 gigs on my target and only 8 gigs of data. I ...
Nick Kuzmik Grimlock's user avatar
0 votes
1 answer
648 views

Recover files from corrupted sd [duplicate]

I messed up when trying to benchmark write speed on an sdcard with important files on it. sync; sudo dd if=/dev/zero of=/dev/sdb1 bs=1M count=1024; sync 1024+0 records in 1024+0 records out ...
Alessandro Jeanteur's user avatar
2 votes
1 answer
10k views

Is there a way to DD multiple partitions into one raw image file in such a way that it boots?

I have made great progress with my USB project so far, However I was wondering if there would be a way to DD multiple partitions into one Raw image file for redistribution. The following are the ...
RickwhoPrograms's user avatar
0 votes
2 answers
3k views

Read bytes from usb flash drive

I need a hex dump of a usb flash drive from the first few kilobytes. The flashdrive is fresh formatted with fat32 what i did is checking with lsblk where is my usb device and i got: sdb ...
Eisen's user avatar
  • 3
0 votes
1 answer
1k views

Is it possible to dd a file from within a VM to a physical disk on the host?

I'm trying to clone a physical external hard drive from drive A to B. Drives A and B are both 2TB large. I have a host Windows 10 PC with a Linux VM. I am first cloning from drive A (which shows up ...
user1118764's user avatar
-1 votes
2 answers
918 views

Will `dd` stop if input is larger than output? (output file is a partition)

I want to move one partition to another location on a hard drive, i.e. contents of sda1 to sda2, and then I want to boot from sda2. First of all, I don't know if that's gonna mess up some partition ...
simernes's user avatar
  • 165
0 votes
2 answers
212 views

Is it possible to fix MBR without user interaction?

I have a case in which a virus spreaded through an intranet, and rewrote the MBR of 12.000 machines. Now, I know how to manually repair an MBR, but I'm being asked to provide a solution to automate ...
ffflabs's user avatar
  • 101
0 votes
2 answers
377 views

How to pass the variable of the result of find command to dd

I'm trying to transfer CentOS.iso file to a USB flash drive using dd command by passing a variable which is a result of find command. I want to pass variable like this dd if=$isofile of=/dev/sdb ...
Tomas.R's user avatar
  • 195
1 vote
1 answer
1k views

DD on my main storage drive - How to recover data?

I accidentally used dd on my secondary hard drive while trying to write an install disk. The command was dd bs=4M if=foo.iso of=/dev/sdb Fortunately, I umounted the flash drive and not the hard ...
BabylFish's user avatar
0 votes
1 answer
2k views

How to detect end of file with dd?

I created a 10MB test file: dd if=/dev/zero of=file.txt count=1024 bs=10240 Then, I wrote the script below to copy this file in chunks. But looks like dd is not detecting the EOF and it always ...
feeling_lonely's user avatar
1 vote
2 answers
2k views

How can I limit the amount of memory used by dd?

I am using dd to transfer a large kernel core file (4GB ~ 12GB) in a crash kernel that has a small amount of memory available (~400MB). The problem is that dd may crash with OOM panic since it just ...
feeling_lonely's user avatar
0 votes
1 answer
196 views

Copying console output of dd to file as well as to console

I'm trying to image a hard drive using dd which is giving I/O errors. As a result I added the 'noerror' parameter, but I'd like to keep track of the errors in order to attempt recovery. My current ...
Ansel Pol's user avatar
2 votes
1 answer
8k views

Is the blocksize important when wiping a disk with dd and zeros

I used dd if=/dev/zero of=/dev/sda bs=4096 For wiping a disk. Can be the blocksize a security risk or is it just speeding the thing up. Sorry for my bad english
Emil Engler's user avatar
1 vote
1 answer
4k views

dd to copy only one partition of the iso to unallocated portion of hdd

My question is more generic in the context of dd/harddisk/iso-images. Below are the details. I have a live iso image which contains two partitions mounted as /dev/loop1p1 and /dev/loop1p2, and I have ...
Loves Probability's user avatar
1 vote
1 answer
222 views

How do I copy raw blocks on same disk using dd?

I want to move physical blocks from one part of a hard disk to another part of the same disk. I've tried using dd on macOS High Sierra, but no data is transferring. $ sudo dd if=/dev/disk2 bs=512k ...
Micah Røckstår Henning's user avatar
4 votes
1 answer
141 views

How can a file created by dd be bigger than the partition?

A teacher told that in my Unix course and I would like to know how a 10GB partition can handle a 1TB file ?
Henley n's user avatar
  • 142
10 votes
2 answers
4k views

Why you can't just "dd" CD Audio like an ordinary data CD?

My friend tried to export cdrom device over network using nbd server but we noticed that while it works for data CDs, audio CDs don't really behave the way ordinary data disks do. And I'm not talking ...
Lapsio's user avatar
  • 810
0 votes
1 answer
752 views

Will dd cause data corruption?

I managed to run commands like dd if=/dev/block/mmcblk0 to make a full backup of my android phone's internal storage, and pass the data directly to PC connecting through USB. But I worry that this ...
huhiha's user avatar
  • 13
0 votes
1 answer
177 views

bIssue mounting NAS dd image

I backed up my NAS HDD by using dd and now I am trying to mount the image in order to verify it. Using kpartx, I get following error: # kpartx -av 2018-02-23_dlink_nas.img add map loop0p1 (253:0): 0 ...
Cupora's user avatar
  • 1
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
0 votes
0 answers
470 views

0xc000000e after imaging windows 10 disk with dd

So, trying to upgrade to SSD, I mounted my old drive and the new SSD to a second system and copied the disk using dd for windows. After putting everything back, using either drive (old or new), I get ...
Gene Laisne's user avatar
0 votes
1 answer
197 views

Why won't bootable DVD image files burned on USB stock boot?

Suppose I have DVD iso file. As far as I understand, these non-hybrid iso files don't contain GPT or MBR ar the beginning, instead they have their own speciffic file system and some partition table. ...
Kristaps Čivkulis's user avatar
1 vote
0 answers
57 views

Backing up disk images to network shares with empty space removed? [duplicate]

I'd like to use dd to create some disk image backups to S3 buckets, however the extra space that's included from empty space is not tolerable. I have thought I could pass it through xz to compress out ...
ylluminate's user avatar
  • 1,199
4 votes
1 answer
2k views

How to start badblocks at a specified portion of the drive

While trying to dd the last few blocks of a 200GB Maxtor IDE hard drive, I run into the following error: $ dd if=/dev/zero of=/dev/sdc bs=4M status=progress 203901894656 bytes (204 GB, 190 GiB) ...
Hashim Aziz's user avatar
  • 12.8k
3 votes
1 answer
211 views

Use dd to continue wiping drive from where it last failed

I have a 200GB HDD that I was using dd to zero-write overnight. I woke up to the following output: $ dd if=/dev/zero of=/dev/sdc bs=4M status=progress 203901894656 bytes (204 GB, 190 GiB) copied, ...
Hashim Aziz's user avatar
  • 12.8k
0 votes
0 answers
105 views

How can I dd a VMware disk's contents to a FAT partition?

I haven't used dd to transfer data between filesystems with different formats before, and I thought I'd post what I have. I am trying to convert a virtual machine with the disk in files under the ...
Christos Hayward's user avatar
1 vote
1 answer
1k views

Recovering a swap partition

I accidentally wrote data to my swap partition using dd. Both the swap partition and the intended medium for writing to are 16GB in size, and I got confused. My PC seems unable to use the swap ...
Lara's user avatar
  • 133
0 votes
1 answer
97 views

Does an image backup need to end in .img?

I'm using pv on Cygwin to backup an SD card to an image. I'm using pv over dd primarily for the ETA percentage that it offers by default. pv /dev/sdc > /cygdrive/B/Users/Hashim/Desktop/SDBackup ...
Hashim Aziz's user avatar
  • 12.8k
42 votes
5 answers
11k views

Is there a method of getting a percentage on a DD in linux?

So here's what's happening. I started a backup of a drive on my server through a Linux live USB. I started copying the first drive with the dd command vanilla; just sudo dd if=/dev/sda of=/dev/...
user avatar
2 votes
1 answer
3k views

Determining the bs value for dd

I am using an external 1 TB WD hard drive with Advanced Format (4096 bytes sector size). What is the recommended value for the bs option in dd? Should I use dd bs=4096? And if I get this value "wrong" ...
Paul Haun's user avatar
  • 127

1 2 3
4
5
12