Questions tagged [dd]

dd is a traditional utility for binary data copies

Filter by
Sorted by
Tagged with
3
votes
1answer
393 views

alternative to 'dd' which doesn't truncate the file

Does anyone know an alternative for 'dd', which won't truncate the file, without using: conv=notrunc. Adding conv=notrunc isn't supported via busybox/toybox due to limited amount of space. For ...
0
votes
0answers
74 views

copying content using dd

I just copied the content of a 4 TB hard drive (NTFS partition) to a span of 2 drives (LVM) 5TB ext4 partition. I copied it using dd if=/dev/input of=/dev/output/. Everything work perfectly except ...
1
vote
2answers
588 views

How can I tell whether dd is done erasing my hard drive?

I'm using dd to overwrite my hard drive with zeros (before I recycle my laptop). Several minutes into running, the visual display was replaced with a black background and a flashing cursor in the top ...
3
votes
1answer
559 views

Self extracting scripts: tar -xO and dd

I am working with a script that is a self extracting script. It's a script to install packages on a QNAP NAS. It has some scripting at the start which extracts the rest of the file. Here it goes: ...
0
votes
2answers
135 views

can't find windows after cloning to hd using dd command

Ok. Here's what happened. I have a laptop with 500GB HD. I had installed windows 7 on it. i had 5 partitions on it. all four partitions were ntfs and one was ext4 for installing kali linux. I had a ...
4
votes
1answer
1k views

How do I interpret the output of dd when the option status=progress is chosen?

The dd manual page is very limited on this: ` status=LEVEL The LEVEL of information to print to stderr; 'none' suppresses everything but error messages, 'noxfer' ...
1
vote
1answer
497 views

Can growisofs or dd be forced to erase a CD-R?

I need to securely erase a CD without marks of intentional data loss (can't scratch or break it), so I was wondering: how could I use growisofs or dd to burn all non burned spaces in the disk to ...
1
vote
0answers
169 views

What does dd do when not enough free space

I just made backup of SD card with dd command: dd if=/dev/mmcblk0 of=backup.img bs=64k When I started copying, Gnome Files said that there is just 8.5GB of free space from total 400GB. I forgot that ...
0
votes
1answer
230 views

Why “records in” is different than “records out” in dd command output

I'm trying to wipe a USB flash drive of 256 MB using the dd command. I entered this command: dd if=/dev/zero of=/dev/sdb and I got this output: 499713+0 records in 499712+0 records out Why there ...
2
votes
1answer
543 views

How to dd an image and save it to tftp without saving into local machine?

I want dd an image and save it to remote using tftp for example I'm trying to do "dd if=/dev/mtd2" | save it to tftp server. the direction of the file I have used in that code is wrong I'm trying my ...
5
votes
2answers
947 views

How to prevent dd's progress from being meaningless on Linux?

When running dd command to copy an ISO on Linux, I get a single progress print that stays open for a long time (many minutes). Then another at the end. The problem seems to be that a very large cache ...
2
votes
1answer
1k views

Can't run dd from /dev/zero to new added hard disk /dev/sdb on CentOS 7

Now the hard disk is 10GB. Added new hard disk with 16GB size. dev/zero information: fdisk -l /dev/zero Disk /dev/zero: 0 MB, 0 bytes, 0 sectors Units = sectors of 1 * 512 = 512 bytes Sector size (...
1
vote
1answer
154 views

Partitioning SSD for multiple OS's

I installed a SanDisk 240GB SSD. My old HDD will now be my storage. I've partitioned the SSD into 4 roughly 55GB partitions. I've also done a pvcreate, vgcreate, and an lvcreate for each partition ...
2
votes
1answer
177 views

Blindly dd'ing faulty drive to new drive

I have a faulty 320GB drive which has reading errors in samish GB positions but the exact positions vary. I am ok with probability of errors, this is out of question here. First of all I was ...
23
votes
5answers
5k views

On-the-fly stream compression that doesn't spill over into hardware resources?

I have 200 GB free disk space, 16 GB of RAM (of which ~1 GB is occupied by the desktop and kernel) and 6 GB of swap. I have a 240 GB external SSD, with 70 GB used1 and the rest free, which I need to ...
2
votes
0answers
5k views

How to get RAM map?

I had read a topic by Gabriele Tolomei about map of Linux memory. I want to make a memory map for my Linux Ubuntu 16.04, using basic utilities, like dd and xxd, and I want to compare my result with ...
3
votes
1answer
396 views

Full clone of encrypted disk not bootable on other computers

I have made a full disk clone of my encrypted S2 disk to an external USB disk with dd if=/dev/nvme0n1 of=/dev/sdb status=progress The S2 disk was not mounted when cloning, I used a live distribution ...
4
votes
0answers
3k views

Using dd on Mac OS: conv=fsync equivalent?

I'm running an experiment where I benchmark the speed of reading and writing with and without caching. On Linux, using 'conv=fsync' as an operand makes sure that the output file is entirely physically ...
1
vote
0answers
153 views

Optimize cloning image without cloning unused space

I have a pi with a 32g sd. michael@pi3:/ $ df Filesystem 1K-blocks Used Available Use% Mounted on /dev/root 29804860 1773224 26791008 7% / devtmpfs 468152 0 468152 ...
15
votes
5answers
5k views

Does dd do any kind of verification?

I'm using dd to copy data from an old hard drive to a new one. I want to be sure that the data's integrity is secure. On this answer, Gilles says If [dd] terminated successfully, then the backup ...
7
votes
1answer
3k views

“Cannot allocate memory” when reading from SCSI tape

I am experimenting with some old SCSI tape drives, and I have successfully written some data to a tape, but I am struggling trying to read it back again. # tar tvf /dev/st0 tar: /dev/st0: Cannot ...
1
vote
1answer
136 views

Will a backup and restore with dd solve filesystem corruption?

After running 'sudo apt-get update && sudo apt-get upgrade' on my raspberry pi 3 running raspbian jessy, I get: E: Failed to fetch http://mirrordirector.raspbian.org/raspbian/pool/main/g/...
0
votes
1answer
445 views

Cloning hard drive using the dd utility

I'm researching for the possible problems when cloning existing hard drive using the dd clone utility into the new hard drive. I'm interested to know if any one is aware of unexpected behavior (or ...
1
vote
2answers
541 views

Unknown file system after copying Debian ISO with dd

After copying the last version of Stretch distro on a 4GB USB drive with sudo dd bs=4M if=debian-testing-amd64-netinst.iso of=/dev/sdb1 && sync on a Lubuntu 16.04 system, the file system of ...
1
vote
1answer
5k views

Shrink disk image

I have several disk images stored at my fileserver at the moment, these are mainly system images created with dd. The reason for why I have created these images is because I needed the harddrive for ...
2
votes
1answer
537 views

dd image too large to recover

I made an image with dd sudo dd if=/dev/sda of=/path_to_external_drive/backup.img Now I wanted to recover the system after the mount of all partitions went smoothly. When I make sudo dd if=backup....
0
votes
2answers
461 views

What file system type does a flash drive have after being `dd` an iso file into

I am following this post to create bootable Ubuntu flash drive. https://askubuntu.com/a/377561 Suppose my flash drive is /dev/sdb. After running sudo dd bs=4M if=input.iso of=/dev/sdb does the ...
3
votes
1answer
587 views

Write arbitrary data to DVD in Linux

I need to write arbitrary data, not an ISO image to a DVD, without a filesystem. Years ago it was possible to do something like: tar vcf - whatever/ | dd of=/dev/cdrom And have a CDROM with no ...
1
vote
1answer
50 views

Is there a command line tool to read byte sectors/clusters from specific addresses on a disk?

So I've been studying up on the details of the different types of files systems, and have been creating Bootable USBs... A lot... I've been doing this from a Mac, which has been littering anything I ...
1
vote
2answers
798 views

dd loop input File to output device?

Using the /dev/zero to erase an HDD is very slow, so I'm going to use a prepared file of 1GB with random or zeros. But how can I loop this File with dd? dd if=loopfile of /dev/sdx
1
vote
1answer
2k views

Burn a disk image to a USB

I'm following this guide to make a simple bootloader. It generates a file disk.img. $ dd if=/dev/zero of=disk.img bs=1024 count=1440 $ dd if=vbr.bin of=disk.img count=512 conv=notrunc $ file disk.img ...
0
votes
1answer
280 views

Add scound Linux OS dual with Centos 7

I have been trying to add a second OS Ubuntu 16.04.2, actually I have installed Centos 7 as primary os. I download the ISO file of Ubuntu and load it to USB drive using the DD. I tried to boot ...
0
votes
1answer
178 views

Is it necessary to fill a device with zeroes before writing an ISO to it?

I'm going to create a bootable USB drive using dd, e.g. dd bs=1M if=myiso.iso of=/dev/sdc But I thought maybe beforehand I should fill the device with zeroes: dd bs=1M if=/dev/zero of=/dev/sdc Is ...
1
vote
0answers
57 views

Problems mounting and dumping to external storage (Mac) from dedicated server (Ubuntu)

I have set up a Kimsufi KS-4A - 16G i7-920 1x2TB Server, and been following this guide on how to create my own Windows template for Kimsufi. I have come to the last steps of the tutorial. What I want ...
6
votes
2answers
831 views

dd with obs and seek makes file of unexpected size

I'm learning to use dd by experimentally playing with its arguments. I would like to create a 10-byte file. I thought the following would work: dd if=/dev/zero of=./foo count=1 bs=1 obs=9 seek=1 ......
3
votes
2answers
1k views

How to calculate the correct size of a loopback device filesystem image for debootstrap?

I'm using debootstrap to create a rootfs for a device that I want to then write to an image file. To calculate the size needed from my rootfs, I do the following: local SIZE_NEEDED=$(du -sb $...
0
votes
1answer
357 views

Using variable names for input and output files in dd

I'm creating a bash script that will allow me to clone disks, and allow the user to select the input disk to clone and the output disk to clone to. I've almost finished, but I just have one hang up. ...
2
votes
1answer
2k views

How to know when a 'dd' command has been completed?

My system is running the command sudo dd if=/home/vico/file.iso of=/dev/sdb1, it returns control inmediately, but the transfer takes a while. How to know that the whole process has ended?
3
votes
2answers
10k views

dd command indicates not enough disk space - trying to format sd card for raspberry pi

I have been trying to format an sd card with the lastest debian jessie-lite image for use with raspberry pi. When using the dd command, it states that there is no space left on device after copying ...
-2
votes
2answers
1k views

How to write “Hello Word” with dd? [closed]

How to write "Hello Word" with dd? Are there any tricks to create a txt file with dd that has a "Hello Word" in it?
11
votes
2answers
3k views

bash can't store hexvalue 0x00 in variable

I'm trying to do some tricks with dd. I thought it would be possible to store some hexvalues in a variable called "header" to pipe it into dd. My first step without a variable was this: $ echo -ne ...
2
votes
1answer
28 views

What locations should I use for dumping flash memory from electronic components in HDDs?

From my understanding , the electronic components in HDDs can store memory in flash memory chips. I am not interested in the disc platters. I would like to dump only this flash memory using a Linux ...
1
vote
2answers
74 views

How to write an disk image back to its own source?

I'm trying to create an image of /dev/sda and write the output to a new .iso file on the same device. How can I exclude the new image file; so as to prevent the output from becoming its own input, and ...
5
votes
1answer
777 views

Can DD be used to add a buffer to a pipe?

I'm reading and writing audio from a named pipe. I'm running into an issue where my read process lags, causing the pipe's buffer to fill up and drop frames. I'd like to insert a buffer of arbitrarily ...
0
votes
1answer
729 views

What's the quickest way to format a disk?

It's for a bash script. Basically, I want to format, or erase a USB (or SD) storage device; with a single command line. I was going to use fdisk, but it seems to require user interaction where I ...
2
votes
3answers
482 views

Update block device with image while writing only the Delta, is it possible?

I use dd extensively as a means of software configuration control. The images are typically deployed on flash disk to update devices. I find I am often making small incremental updates to the image ...
2
votes
2answers
326 views

Overwrite a portion of a file w/o modification to the unmodified content [duplicate]

I'd basically like to create an allocated file lets say 1GB with content. Then hopefully using some command line utility I'd like to overwrite-in-place a portion of the file, lets say the beginning 4 ...
0
votes
2answers
52 views

Overwrote 60MB of mounted filesystem from other filesystem with dd

I had mounted ext4 filesystem (/dev/sdg1) and accidentally did dd if=/dev/sda of=/dev/sdg and CTRL-C after 1 second, so only 60 MB data has been transferred. /dev/sda1 has ext3 root filesystem. What I ...
4
votes
1answer
10k views

What is the difference between `dd`, `cp` and `rsync`? [closed]

Besides the explanations from the man pages and --help information, in which way do the commands dd, cp and rsync differ when used to copy files? In which context is each of these superior to the ...
5
votes
0answers
206 views

Why does ddrescue not utilize full bandwidth?

I am running ddrescue from disk A to disk B. I had expected the slower of the disks would be running at full speed all the time and the other be running enough to keep up. Imagine my surprise when ...