Questions tagged [dd]

dd is a traditional utility for binary data copies

Filter by
Sorted by
Tagged with
1
vote
1answer
52 views

How to shrink a file image, produced with dd?

I tried the process from this post resize partition on an image file. I didn't succeed in understanding why it goes wrong in my case. I produced a 8GB image using dd. The image contains two partitions....
2
votes
2answers
100 views

How to increase the size of a loop virtual disk?

I have generated an image file with dd. The image contains two partitions. I created a loop virtual disk: losetup -P /dev/loop0 $image_file. I mounted the two loop created partitions (loop0p1, loop0p2)...
1
vote
1answer
59 views

How to append files to an image file and deploy it with `dd` to a device?

[EDIT: simplified and corrected] I would like to use the same method as Raspbian install which relies on dd deployment to a µSD. Meaning, from a minimal image file, deploy the "augmented" ...
0
votes
0answers
19 views

Trying to use seek and skip, but md5 is different

I ran into an unexpected behavior when using dd. I write this to myfile: root@io-generator-app-0:/# dd if=/dev/urandom skip=10 of=/tmp/myfile bs=4k Then using skip option again to write it to some ...
0
votes
0answers
27 views

Trouble with size of partition (too small) after cloning disk/OS from USB flash drive to SSD

So, I have a Chromebook with two USB ports, a 128gb USB drive with my ideal Linux set up on it (Ubuntu 18.04, i3-gaps, other specific visual customizations) and an external/portable 500gb SSD that I ...
0
votes
1answer
26 views

# dd + lz4 compression and de compression

I have a CentOS server and I have take a backup of the server using following command (dd + lz4). # dd if=/dev/sda bs=100M | pv -ptera -s500G | lz4 > Lenovo-Win8-sda.dd.lz4 It's working and now I ...
0
votes
0answers
12 views

Can't resume drive recovery dd rescue v2.1.0

When I look up how to resume a drive recovery, I get told to run it again using the same input, output, and mapfile. But when I try it on DDRescue_GUI, it tells me "File already exists. Do you ...
0
votes
0answers
12 views

Cloning a mdadm RAID1

I have an old PC which has two internal hard drives of 80GB in a mdadm RAID1 configuration with LVM on top of it. I wanted to migrate this PC to a virtual machine, so I booted both, the PC and the VM, ...
0
votes
2answers
13 views

How to print a file starting from the nth char?

Show character at position in a file The above page shows how to use dd to print the nth char in a file. Is there a way to print a file starting from the nth char? Thanks.
-2
votes
1answer
19 views

dd: unrecognized operand when flashing kernel to partition during installation of arch linux

If this is the wrong place to ask, please tell me where to ask. I am currently following this tutorial. I had issues with step 10, so I found a different mirror link to install. I am now on step 11. ...
1
vote
1answer
16 views

Use entire drive when writing disk with DD

How do I go about making DD use the entire space of a drive when I write an image to it? When I write a 1gb image to an 8gb USB, I get a 1gb partition, and the rest of the storage space is unused. I ...
1
vote
0answers
22 views

Repair Hard Drive That was in the Middle of a DD zeroing when Machine Powered Off

I am unable to access a hard drive that was in the middle of zeroing with dd command when an accident resulted in powering off the machine. I cannot access the hard drive with fdisk, gparted, dd, etc. ...
20
votes
4answers
5k views

Got “No space left on device” when cloning 1TB disk to 1.2TB disk using dd

I am trying to using the following dd command to clone remote xfs disk to another location. ssh root@source_ip "dd if=/dev/vda2 bs=16M conv=noerror,sync status=progress " | sudo dd of=/dev/nvme1n1 ...
0
votes
1answer
39 views

Conditional logic and variables in pipe to determine value for dd skip

I am using dd to return a stream of data from tape. I want to send this via a pipe that will extract the byte range I require. I need to check for the presence of a string in the initial bytes, and ...
2
votes
1answer
65 views

Write tar archive to tape and then extract individual files

I would like to write a tar archive to tape, and at the same time store the block offsets for each file in a lookup table. Then when I want to restore an individual file from the archive, I would seek ...
1
vote
0answers
21 views

How to test USB stick speed?

I have a USB stick I'm trying to measure the read and write speed on. I'm having trouble deciding whether I should write random data or zeros, and how much. I want to do this as fast as possible, ...
0
votes
0answers
28 views

Use dd to create image of ubuntu disk on local windows pc

I have the unfortunate position of having spent 4 years developing a software business that in the current climate is not going to be allowed to succeed with all the budget cutbacks. My web ...
0
votes
1answer
25 views

How can I completely zero out all free blocks (deleted files)

I'm making a backup of Raspbian (I know, this isn't the Raspberry Pi SE, but it's a Linux question and it probably isn't just Raspbian that has this problem and BTW, the size of the drive is 128GB). ...
1
vote
1answer
11 views

Backup Clone Bootable USB Thumb To Slightly Smaller USB Thumb

I have a bootable USB Linux thumb that I want to backup to have a safety copy. The thumb is a UEFI 64GB drive with several partitions; 1) FAT32 2) ext4 (boot) 3) linux-swap 4) FAT32. I bought ...
0
votes
1answer
31 views

yocto linux - how to shrink a disk image

Noob alert. I used win32 disk imager to backup a 16Gb Scandisk SD card. I have a batch of Verbatim 16GB SD cards I'm trying to restore the image to. Win32 disk imager complains that they have less ...
1
vote
2answers
35 views

restoring hdd image using gzip throws error no space left on device

I created an image from a 256GB HDD using following command: dd if=/dev/sda bs=4M | pv -s 256G | gzip > /mnt/mydrive/img.gz later I tried to restore the image to another 512GB HDD on another ...
3
votes
4answers
55 views

dd need to enlarge/pad each input block to double size

I found a few examples that claimed this but I could not manage to get dd to convert a file with a given block size to double that block size. dd if=disk256bytesectors.img of=disk512bytesectors.img ...
1
vote
2answers
105 views

Why is dd so slow on a NVMe SSD?

I recently watched this video and in it, the author explains that a ram disk is far faster than HDD/SSD when using dd command. I understand why this is the case. What I don't understand, however, is ...
2
votes
1answer
43 views

Writing to EXT4 faster than writing to disk directly?

I tried to test the write speed of some SSDs and when writing to the disk directly is somehow slower that writing to the disk when it is formatted as ext4. How does this work? Is this correct or am I ...
0
votes
1answer
45 views

Accidentally filled /dev/sd* with 16000 bytes from /dev/zero, using dd command

This is the command that I ran in a sudoed terminal: dd if=/dev/zero of=/dev/sd* bs=512 count=32 These are the sd* using lsblk: sda 8:0 0 238.5G 0 disk ├─sda1 8:1 0 600M 0 part /...
5
votes
2answers
182 views

dd without sudo to image a partition

I need to create an image of a partition of a usb drive: dd if=/dev/sdb1 of=sdb1.img Is there a way to do it without sudo/su? Maybe by changing permissions on the usb drive? What would be the ...
0
votes
1answer
25 views

Create image of drive with small partition using dd

I have a bootable USB-drive with one partiton. The drive is 16GB and the partition is 32 MB. I'd like to create an ISO of the drive (including the boot sector). Using dd, I can either create an image ...
0
votes
0answers
22 views

Can I dd iso to partition?

I have an iso with mac High Sierra on it. I don't want it to remove Linux, but I have no experience with booting from a live usb with anything other than Linux, so I don't know if I can safely boot ...
0
votes
0answers
30 views

dd mistake on wrong disk which was mounted - can't access the old partition

I made a classic dd mistake... I was too fast and specified the path of my 1TB external USB HDD while what i intended to do was to write a disk image to another USB pen. The HDD contained the most ...
0
votes
1answer
62 views

Extract file from ext4 image and copy file to device

Here I read: $ cd /media/mmcblk1p2 $ tar xf /media/sda1/mfg_images/st-image-bootfs-openstlinux-weston-stm32mp1-som.tar.xz but as source file I don't have a compressed file, instead I have an ext4 ...
0
votes
1answer
41 views

Disk failure after accidentally run dd

During updating BIOS in my Lenovo laptop (T420), I have used dd to write bootable image to flash drive. I have accidentally used /dev/sdb (= SSD disc Samsung EVO) insread of /dev/sdc (= removable ...
0
votes
0answers
12 views

Creating iso/IMG file from disk without empty spaces

This is no new topic however there is a lot of confusion on the forum and I am too afraid of messing things up with such command. Could you please provide me with your one-liner (or just synthetic ...
0
votes
2answers
49 views

How to repair a disk in the safest way [duplicate]

I got an external drive that may need to be repaired. When I try to mount it, I get the following error: wrong fs type, bad option, bad superblock on /dev/sda1, missing codepage or helper program, ...
1
vote
0answers
15 views

moving triple boot setup to larger SSD

I currently have a triple boot setup on my laptop, with Arch linux, Windows 10 and Ubuntu 16.04. Unfortunately, my SSD is only 256 GB and is suffering quite a bit now with low space on the windows C ...
0
votes
0answers
47 views

How do I invert these dd commands to extract the original files from a device they were written to?

I have a script that writes u-boot components to an SD card. This results in a functional bootloader and I can outfit it with a root filesystem of my choosing. I also have an image which has a ...
1
vote
1answer
41 views

Move data to beginning of partition

I'm going to move the data from a 2Tio drive to an SSD, whick is only 120Gio. The drive only has one partition and only contains like 16Gio. To make sure I get everything when transferring with ...
0
votes
2answers
47 views

Offset LVM mount

I have some ext4 and LVM partitions on a disk. I executed dd to dump this disk content to a file. Now I can mount ext4 partition by using offset but don't know the way to mount the LVM partition. ...
0
votes
1answer
36 views

Using dd to restore a partition backup from MBR disk to GPT one

I have an ext4 partition backed up with dd on a MBR hard drive that I would like to restore to a new GPT hard drive. Can I just create an empty partition of the exact same size on that new GPT drive ...
2
votes
0answers
79 views

A microSD card backup (Raspberry Pi) has always a corrupt ext4 filesystem although the original seems to be fine

Every backup image of my Raspberry Pi microSD card seems to be corrupt. It doesn't make a difference if I create an image file or if I backup the microSD card directly to some other microSD card. I'...
0
votes
0answers
28 views

DD command: Create an partition image without save filesystem

I have the initial situation: I have executed the commands: sudo dd if=/dev/sda1 of=~/part1.img sudo dd if=/dev/sda2 of=~/part2.img After this, i have prepared the new partitions for restoring the ...
1
vote
1answer
65 views

Create bootable disk from ext4 partition image

My goal is to create a bootable backup of my system without restarting, I will use qemu-img to convert a raw dd image to vhdx and run it in Hyper-V. If I boot into a liveCD and run: dd if=/dev/sda ...
0
votes
1answer
49 views

Self destruct a Linux VM with SSH access only

Lets assume I have a virtual machine and no access to the hypervisor in any way. Also I cannot change any system parameters like setting up password protected booting with LUKS or anything. I can ...
1
vote
0answers
86 views

Alternatives to dd to read/write to a disk?

I'm using cp to read/write from an SSD drive but is not fast enough. Then I used dd, which is fast, especially with the drive unpartitioned. But I ran into errors like there is no space left on ...
0
votes
1answer
45 views

How to disk copy with unreadable sectors?

I want to clone a whole disk bytewise, something like dd if=/dev/$SRC of=/dev/$DST bs=65536 count=$count There are better tools for the job, which understand the file system (Windows) and work ...
0
votes
1answer
56 views

Replace character in file based on position

I work on the encoding of a file, from unknown-8bit to UTF-8. but I got an error message. iconv: illegal input sequence at position 136828 So I did a search in the file with the position like this : ...
0
votes
0answers
37 views

Find Inodes And Recover Binary Files From Raw Data

What command do I use to scan a hard drive that has corrupted superblocks to find inodes? Additionally, what command do I use to write the file data associated with that inode? My partition was ...
0
votes
1answer
59 views

What does “dd:0<1” mean?

I am running a shell script on a Android phone, filling the space up by create some files. Part of it as follows: while ((i < count)); do dd if=/dev/zero bs=$file_size count=1 of=file.$i.bin ...
4
votes
3answers
1k views

create empty img with dd so that it its sectors are of 4096bytes rather than 512

The final purpose is to build the image of a partition sector by sector. I want the sector size to be 4096. As a first step I am trying to create an empty image of 32MiB with 4096bytes sectors rather ...
1
vote
2answers
118 views

dd: “No space left” when restoring backup to exact same disk

A while ago I made a backup of an entire disk using dd if=/dev/nvme0n1 conv=sync,noerror bs=64K | gzip -c > backup.img.gz Today I restored this backup to the same disk using gunzip -c backup....
1
vote
2answers
204 views

Accidentally run dd on my main drive

I accidentally run dd if=image.img of=/dev/sda instead of /dev/sdb and sda is my main partition. When i realised i misstyped it i immediately stopped the process with CTRL+C, so it run only for like 2 ...

1
2 3 4 5
14