Stack Exchange Network

Stack Exchange network consists of 174 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]

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

0
votes
0answers
34 views

How would I flip every bit on my hard drive and what consequences would it have? [on hold]

If I took a disk and connected it to my linux machine, then I'd do something like dd if=/dev/sda1 bs=1M | flip | dd of=/dev/sda1 where flip is a (to me) unknown utility that flips each bit in the ...
0
votes
1answer
47 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 ...
0
votes
2answers
55 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 ...
1
vote
1answer
49 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 ...
0
votes
1answer
46 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 ...
3
votes
2answers
58 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 ...
0
votes
1answer
119 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 ...
0
votes
0answers
21 views

Where are my thumb drives?

I have Ubuntu on Bash on Windows and I would like to use dd to clone an SD card. On a Raspberry Pi, I would enter: sudo dd if=/dev/sda of=/dev/sdb bs=32768 But /dev/sda and /dev/sdb don't exist in ...
0
votes
2answers
40 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.
0
votes
1answer
78 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 ...
0
votes
2answers
65 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 ...
0
votes
1answer
48 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 ...
3
votes
0answers
64 views

Does `dd if=/dev/sr0` read ALL bytes?

I downloaded some linux-distro.iso to a Linux PC and burned it on a disc. This disc was closed automagically. I put this disc into a Windows PC... no available space left and the number of used bytes ...
1
vote
1answer
56 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 /...
1
vote
1answer
61 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 ...
0
votes
2answers
50 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 ...
1
vote
1answer
75 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 ...
1
vote
1answer
144 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/...
0
votes
0answers
35 views

internal storage data recovery after flashing rom

i forgot take a backup my project's source code before flashing rom. It was in my phone's internal storage. So i refered this guide to take my phone's storage data as raw file: https://howtorecover....
4
votes
2answers
731 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 ...
0
votes
1answer
64 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 ...
0
votes
1answer
50 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 ...
1
vote
1answer
107 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 ...
0
votes
0answers
27 views

Live USB boots into emergency mode after being DD'ed from source USB

I have a Live red hat 7 USB that I made, and I dd'ed the first 5 gigs of it into a .raw.gz that I then zcatted to the new USB. The new USB boots, however for some reason it is booting into emergency ...
0
votes
0answers
17 views

Live RHEL 7 USB Slow after being Cloned using DD command.

So I have a Live USB that I made ( meaning the USB itself is the running OS), and I just used DD to copy the entire drive; essentially Mirror it to the new Formatted Empty USB. I am wondering why the ...
0
votes
2answers
49 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 ...
0
votes
1answer
53 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 ...
-1
votes
2answers
72 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 ...
0
votes
2answers
70 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 ...
0
votes
2answers
55 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 ...
0
votes
1answer
39 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 ...
0
votes
1answer
189 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 ...
0
votes
0answers
37 views

Accidentally wiped user account by disabling parental controls - Is all my Data gone?

With important exams coming up I decided to embrace the #nosurf movement and wanted to lock down my iMac to not spend all my time lurking on reddit. So I had set up an admin account for my girlfriend ...
0
votes
0answers
50 views

Creating a bootable flashdrive

I am trying create a live persistent bootable flashdrive (4GB) with dd command. I used dd if=[pathto.iso] of=/dev/sdb, and the operation finished successfully. After this I needed to add a files ...
1
vote
2answers
96 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 ...
0
votes
1answer
21 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 ...
1
vote
1answer
584 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
0
votes
1answer
268 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 ...
1
vote
1answer
41 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 ...
4
votes
1answer
89 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 ?
4
votes
2answers
575 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 ...
0
votes
1answer
89 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 ...
0
votes
1answer
91 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 ...
0
votes
1answer
239 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?
0
votes
0answers
274 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 ...
0
votes
0answers
292 views

backup windows drive with a bitlocker partition from linux? (without encryption key/recovery key)

I recently borrowed a laptop with some caveats (e.g. upgrade windows 7 -> 10). But because the laptop couldn't be trusted with (had multiple trojans, and goodness knows what's more), I'm thinking ...
0
votes
1answer
94 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. ...
1
vote
0answers
31 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 ...
3
votes
1answer
371 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) ...
3
votes
1answer
109 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, ...