Questions tagged [dd]

dd is a traditional utility for binary data copies

Filter by
Sorted by
Tagged with
0
votes
0answers
23 views

What should I notice for the USB stick use as installer?

I have a few questions about the USB stick used as an installer in Linux. 1) Should I leave extra space after running dd? So for Windows user, you might be familiar with rufus, with rufus you can ...
0
votes
2answers
360 views

Can you make the `dd` command safe?

We all have (or know someone who has) unintentionally misused the destroy-disk (dd) command. What ways exist (if any) to change the command in the following or a similar way: If /dev/sda is given as ...
10
votes
1answer
1k views

Different size of file from /dev/zero and /dev/urandom [duplicate]

I am tring to create random 1G test file via dd command. dd status=progress if=/dev/zero of=/tmp/testfile.zer bs=100M count=10 dd status=progress if=/dev/urandom of=/tmp/testfile1.ran bs=100M count=...
0
votes
0answers
56 views

Best way to move data with overlap towards the end on same device

I have a rather big disk that's pretty full. I need a new partition at the start of this disk. So I need to move the data towards the back of the disk somehow. Usually I do such things with dd, but ...
0
votes
1answer
452 views

Why was a disk image created with dd, bigger than the original disk?

I recently backed up a disk using dd and when I tried to dd the image back to the disk, I realized that somehow the image file is bigger in size than the original disk that was created of original ...
1
vote
2answers
315 views

dd command in script not running when executed from udev rule

I would like to setup a Raspberry Pi 3 running Rasbian to automatically copy a DVD disk when a disk is inserted in a coupled disk station. To achieve this, I have written a udevrule and a script to ...
0
votes
1answer
124 views

Garbage char “^@” shows using vim but using cat it shows proper data

I am trying to copy the x.file data into virtual volume of size 32 KB and trying to read again 32 KB from the same volume to y.file. It shows expected output when using cat y.file but whenever I am ...
-2
votes
1answer
1k views

SSD backup image

I want to backup the SSD of a new laptop so that I can safely reinstall it (no user data, just system). I want to backup all necessary boot info too (e.g. MBR). I want to create an image stored in an ...
10
votes
2answers
1k views

dd command bs option at end of disk

If I were to use the dd command as follows: dd if=/dev/zero of=/dev/sdX bs=16M What happens at the end of the disk if it is not an exact multiple of 16M? Does that mean the last remaining portion ...
2
votes
0answers
216 views

Dumping a single partition with dd (not the entire disk)

I have dumped the raw partition dumped via ssh from an external system using the command: ssh root@10.10.10.10 'dd if=/dev/xvda2 bs=1M | gzip' | gunzip | dd of=xvda2.raw As you can see, only the ...
0
votes
0answers
633 views

Debian LiveUSB created with `Rufus` (windows) works but not when created with `dd`

I am trying to create a bootable USB using the hybrid iso image of debian from https://cdimage.debian.org/images/unofficial/non-free/images-including-firmware/9.3.0-live+nonfree/amd64/iso-hybrid/ ...
2
votes
1answer
1k views

How to create a live USB of FreeBSD 11.1 from Arch Linux?

I'd like to boot a live USB for FreeBSD 11.1 in my UEFI firmware. I tried creating a live USB using: dd if=FreeBSD-11.1-RELEASE-amd64-dvd1.iso of=/dev/sdc bs=4M status=progress && sync Then ...
5
votes
4answers
2k views

How to create a file system as a non root user?

I'd like to create a filesystem image as a non-root user, the problem I'm facing is that the way I'm currently doing it, it needs a mount and as a non-root can't do a mount. This is what I'm now ...
2
votes
1answer
544 views

Initramfs error after image restore using dd

I need to create backups of a Ubuntu system in a way that I can easily restore the data and system as it is exactly in a ready to go state. So, I decided to go with dd to create a whole HHD images. I ...
1
vote
1answer
294 views

Disk space error when using DD to write to raw disk in external reader?

I keep getting disk space errors when using dd to write to raw disk on SD cards in an external, USB connected SD card reader. ➜ ~ gzip -cd < image.dd.gz | sudo dd of=/dev/rsda dd: writing to '/...
1
vote
2answers
92 views

How to identify relevant parts of an ext4 partition

Background: I need to clone ext4 partitions from an eMMC using uboot (and if neccessary custom bare metal code). I copied the whole thing using mmc read and found that most of the partition is empty, ...
1
vote
2answers
901 views

How to write dd status/result message to a file?

I use this dd command for checking disk speed: dd if=/dev/zero of=/path/file bs=1G count=1 oflag=direct which gives back something like this: 1 oflag=direct 1+0 records in 1+0 records out ...
1
vote
1answer
911 views

zero a large disks + verification method [closed]

We have a large disk on our Linux machine, 2.5TB in size. We want to completely format this disk; the disk is sdb. We want to do it with dd: dd if=/dev/zero of=/dev/sdb bs=1M count=1 My question ...
0
votes
1answer
35 views

Clone Drive with only Partitioned Space

I'm trying to save disk space with drive images, but all of the examples that I could find involve filling empty space with zeros and compressing the resulting image. Not all programs will work with ...
0
votes
1answer
101 views

Copied zeros to my external drive, errors reported, is it still safe for daily rsync and which filesystems are safer?

I had a corrupted file that I suspected to be caused by rsync to and from my aging external mechanical portable HDD. I made a backup and decided to write zeroes to see if there are writing errors. ...
1
vote
1answer
969 views

Remove null bytes from the end of a large file

I just backed up the microSD card from my Raspberry Pi on my PC running a Linux distro using this command: dd if=/dev/sdx of=file.bin bs=16M The microSD card is only 3/4 full so I suppose there's a ...
2
votes
1answer
327 views

dd command writing to /dev/sdc changed size of disk

I used a dd command to write directly to /dev/sdc (an externally mounted hdd 1TB size) to test various writing speeds in a raw mode. (I don't care about any data on the disk). Now the size of the ...
1
vote
1answer
139 views

Determine if two iso images are equal

I've recently made multiple images of several SD cards on multiple machines using dd. I haven't done a stellar job with my naming, and have some duplicates. How can I quickly determine if two images ...
2
votes
1answer
450 views

Creating dual-partition SD card image by a script

I have a system that generates embedded Linux systems. The system outputs three files: a tarball containing rootfs excluding the kernel modules a tarball containing the kernel modules uImage The ...
1
vote
0answers
106 views

Can gzip change original file size?

/dev/sdf is a 32G SD. As far as I can tell, I had performed the following, but upon attempting to perform the final step and write to a SD, my file image appears to be one byte to large for the SD. ...
0
votes
1answer
2k views

Backup boot record of GPT disk

I know how to use dd to backup the boot record of a MBR partitioned disk, but how do I backup the boot record of a GPT partitioned disk? (I use sgdisk to backup the partition table, but also need the ...
1
vote
1answer
378 views

dd is working with bs argument but gives IO error without

I have a HDD 4TB WD 40EFRX (red series) and try to check the health of that disc. Actually, I erased all partitions and the table via gparted and build a new table + ex4 partition. Subsequently, I ...
0
votes
0answers
133 views

What is dd doing at the end of copying an image to disk

Today I've copied a 4GB image to a SD card. I noticed that copying the image took about 421 seconds. It showed it had copied 4294967296 bytes. After that dd seemed to do nothing but the command prompt ...
0
votes
1answer
31 views

Should unused partitions be removed?

I downloaded a jessie raspbian image and it shows two partitions. [Michael@devserver ~]$ fdisk -l 2017-07-05-raspbian-jessie-lite.img You must set cylinders. You can do this from the extra functions ...
1
vote
1answer
436 views

Human readable dd in OpenBSD?

# dd if=/dev/zero of=test.img bs=1M 11+0 records in 10+0 records out 10485760 bytes transferred in 0.652 secs (16074433 bytes/sec) # When I see: 16074433 bytes/sec I cannot determine, how much is ...
2
votes
2answers
1k views

Cloning HDD to SSD: will dd do the job?

I have a Windows7 problem, but since my guess is that there's a linux solution i'm posting here... She Who Must Be Obeyed has an old Win7 box with a small HDD. I want to migrate everything onto a (...
2
votes
2answers
90 views

How can I safely write a disk image to a memory card?

I routinely copy disk images to SD cards for use on a Raspberry Pi. The usual way I do this is by dd if=/tmp/filesystem.img of=/dev/sdb, which is only a minor typo away from over-writing my computer'...
1
vote
1answer
1k views

How to speed up dd on macOS High Sierra?

I was trying to create bootable USB of Ubuntu 17.04. First, I erased everything from the pen drive and then started to copy using sudo dd if=path_to_ubuntu_image of=/dev/rdisk2 but it is taking around ...
0
votes
1answer
206 views

Why dd speed decrease significantly after fallocate once

Why fallocate -c -l1GiB once cause the second loop of dd speed decrease from 1.0 GB to ~200 MB/s ? xb@dnxb:~/Downloads/test$ fallocate -l 10.2GiB lala.mp4 xb@dnxb:~/Downloads/test$ ls -larthiF --...
1
vote
1answer
380 views

dd creates a file bigger than the source

I use dd for creating an image of my filesystem . I use Debian 8(Jessie) on ARM 32 bit system. Command I run is : dd if=/dev/mmcblk0 bs=1M | gzip -c > /mnt/usb/<image_name.gz> For some ...
0
votes
1answer
156 views

access DD image

I'm trying to analyze a given USB image (.DD) to find out the location of the MFT table. The problem is I'm having trouble to mount the DD image. When I run fdisk -l ntfs5.dd here's the output that ...
1
vote
2answers
450 views

Revive HDD after murdering it with dd?

Situation: we have an old, unused laptop that we want to give to my father and mother in law but Windows kept complaining that the hard drive will fail soon, it should be changed. But unfortunately I ...
0
votes
1answer
176 views

How to extract content from a single file by using two specified points with dd?

Taking from here, there is a steganography part in an image file called moon.png. It led me thinking, how would I extract a say Zlib that is between 944 and 411781 using something like dd. $> ...
0
votes
2answers
389 views

Wipe a USB flash drive and recreate a filesystem

I'm using this to wipe a USB flash drive and recreate a FAT filesystem: dd if=/dev/zero of=/dev/sdb bs=1M #I don't need more advanced wiping fdisk /dev/sdb (a few keystrokes to select partition ...
0
votes
0answers
136 views

After dd, /dev/sdb is not being detected as a block device

After i dd a RPI emmc image, the emmc sometime does not get flashed properly and then I get to see something strange. $ ls -l /dev/sdb* -rw-r--r-- 1 root root 306184192 10月 9 15:34 /dev/sdb brw-rw---...
0
votes
1answer
242 views

how to place custom bootloader in floppy image

So I am creating a custom bootloader: nasm -f bin boot.asm -o boot.bin It is 512 bytes. How do I place this into a floppy image and boot with qemu? I tried: dd if=boot.bin of=floppy.img bs=512 ...
3
votes
1answer
900 views

dd, ddrescue, dd_rescue performance according to OS (Ubuntu, macOS)

I put this question: recover files from HSF+ USB External HD, test on CentOS 7 to diagnostic And this https://askubuntu.com/questions/955325/using-gpart-testdisk-to-recover-gpt-for-files-from-...
1
vote
1answer
107 views

dd past end of file

I run dd with of param which was a new file. I did seek (by mistake) to a large adrees (3gb) and wrote there the input file(3 gb) . Suprisingly, the file created was 4,29gb which is larger than the ...
2
votes
1answer
217 views

Separate dd data from output through netcat to parse output

I'm copying dd output through netcat with the following command $dd if=/dev/zero bs=1024K count=1 | nc <IP_ADDR> <PORT> -q 0 1+0 enregistrements lus 1+0 enregistrements écrits 1048576 ...
0
votes
2answers
1k views

How to dd a TrueOS installer to USB, on Linux

Forgive my ignorance, I've used a dozen distros of Linux (Debian and Fedora derivatives) but haven't yet wet my feet with BSD. I'm attempting to write the current TrueOS installer to a USB, through ...
1
vote
1answer
109 views

How to check that dvd-rw is erased?

I formatted dvd-rw disc with the following command dvd+rw-format -blank=full /dev/sr0 If I try the command dd if=/dev/sr0 bs=2048 | hexdump -C, nothing happens. How to verify that every bit of the ...
2
votes
0answers
569 views

Why does md5sum give inconsistent results on device files?

Backing up some USB flash-drives on Lubuntu 16.04.3 LTS. Plug USB drive into laptop. Automounter does its stuff. I remount all partitions as read-only sudo mount -o remount,ro /dev/sdxn Copy USB ...
1
vote
1answer
290 views

How to process realtime progress of dd?

I'm trying to process the realtime progress of dd, which, with pipes awareness, should be done via: gzcat "$input" | dd bs="$block_size" count="$count" of="$output" 2>&1 | awk '/copied/ {print ...
0
votes
2answers
264 views

dd command appears unresponsive when attempting to create bootable USB media in Debian?

I'm attempting to mount an Ubuntu .iso to a USB drive using the dd command in Debian, however I'm having trouble. Below is the process I've been using thus far: Format the disk I want to mount the ....
2
votes
1answer
417 views

Pipe limit data in bytes

I'm trying to do an 'advanced case' of cloning. There is a pipe writing to a block device, at the end of which there is a partition that should not be touched. I know where this partition starts. In ...