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
Join us in building a kind, collaborative learning community via our updated Code of Conduct.

Questions tagged [dd]

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

4
votes
2answers
656 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
44 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
34 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
69 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
19 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
14 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
30 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
47 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
55 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
62 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
47 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
36 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
64 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
49 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
73 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
20 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
185 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
0answers
62 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
35 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
84 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
338 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
66 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
69 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
0answers
153 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
229 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
194 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
81 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
29 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
264 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
96 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, ...
0
votes
0answers
43 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 ...
1
vote
1answer
55 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 ...
0
votes
1answer
91 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 ...
0
votes
0answers
24 views

Accidentally used “sudo dd” on Ubuntu to nuke my entire Windows partition, how should I attempt to recover the data? [duplicate]

I had installed Ubuntu on my Windows 7 PC. I was following some tutorial that required sudo dd, but I misused it and caused my PC to hang follow the application of sudo dd. After hanging for about ...
43
votes
5answers
6k 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/...
1
vote
1answer
90 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" ...
0
votes
2answers
194 views

Partitions at the beginning and end of drive and migration to smaller SSD

I need to migrate one 256GB HDD to 240GB SSD, but EFI partition is at the very end of my HDD. I already did backup: sudo dd if=/dev/sda of=backup.img but I can't put this image to my SSD drive, ...
0
votes
0answers
35 views

Is it possible to restore data on harddrive after overwriting it with the DD command?

I used the dd command to back up my home partition to a 2 TB hard drive thinking that it would add the HOME folder to my hard drive. sudo dd if=/dev/sda2 of=/dev/sdc where sda2 is HOME and sdc is ...
0
votes
0answers
50 views

Errors writing to hard drive

I'm wiping a hard drive similar to the one described here with the same capacity. I received an Input/output error message from dd when wiping one partition, after which it seemed to not even try to ...
1
vote
1answer
414 views

How to clone entire VeraCrypt encrypted system drive and mount it later on Windows 10 to copy selected files?

I'm doing a fresh install of Windows and I need to make a copy of all files in my system drive so I can restore them later. I want to clone entire drive with dd tool (I'm going to use clonezilla). ...
2
votes
0answers
141 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-...
2
votes
2answers
67 views

Wiping a disk in parts

I need to wipe a hard drive before I give it away, but I want the ability to do so in portions so that I can stop and resume at various points in the middle. For instance, if it will take 24 hours to ...
2
votes
1answer
119 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 ...
3
votes
1answer
225 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 ...
0
votes
0answers
79 views

unetbootin failed to write Debian live system to the USB drive successfully

I have a usb drive in which I managed to write a hybrid xubuntu image using dd. Now, that I have decided to boot Debian live usb, and used to format the drive using 'EaseUS Partition Manager', then ...
1
vote
1answer
46 views

Does the different partitions occupy the space of the hard disk with a order?

Let's say the disk has the position from 0 to 4049 MB. if the size of partition 1 is 50 MB, so it took the position from 0 to 49? My assumption comes from the following story: I am trying to back ...
1
vote
1answer
143 views

Device names in MSYS2 dd

Which is the equivalent of: dd if=/dev/sda ... dd if=/dev/sda1 ... for dd.exe in MSYS2 in coreutils Does Chrysocome syntax apply?
1
vote
1answer
823 views

dd Copy partition image file into disk image file

I am creating a disk image and copy a mbr on it: dd if=/dev/zero bs=2M count=256 > ./hd.img dd if=mbr.bin of=hd.img conv=notrunc sfdisk --force ./hd.img < partitions.sfdisk where partitions....
4
votes
3answers
522 views

Wrong dd command on main drive - How to recover data?

Okay, something annoyingly stupid happened. I wanted to copy an Arch Linux ISO file to my USB thumb drive, but was in a rush, and accidentally entered my main drive as the of parameter. Here are the ...