Questions tagged [dd]
dd is a traditional utility for binary data copies
905
questions
0
votes
1
answer
23
views
SDcard Image behaves differently than Original
I created my OS on my Raspberry pi 2 zero W on an SDcard. Now I want to distribute it so I made an Image from the SDCard (using dd). But the two cards behave differently especially at startup. Did ...
1
vote
0
answers
34
views
Failed Raid5 array with 5 drives - 2 drives removed
Synopsis
Healthy Raid-5 array had 1 drive removed, quickly reinserted and started rebuilding. Then a second drive was removed within 10 minutes. Original drive assignments (sda, sdb etc) have changed ...
0
votes
0
answers
53
views
Can't dd broken SSD
When trying to sudo dd if=/dev/sda of=dump.dd conv=noerror,sync on my Kingston SSD (SA400S37/120G, SBFK71E0) the dmesg log shows the following:
usb 4-4: new SuperSpeed USB device number 8 using ...
0
votes
0
answers
40
views
What is the purpose of bs (block size) parameter for dd command? [duplicate]
I have used the dd command a few times. I used it to create a bootable USB from the ubuntu.some.release.iso file. I know there is a bs (block size) parameter, but I don't understand its exact meaning. ...
0
votes
0
answers
24
views
How can I get the _real_ progress of dd, ignoring fast/staging buffers? [duplicate]
I'm using the dd command to write to a USB stick. My command is pretty straightforward:
dd if=myimage.iso of=/dev/sdd bs=1M status=progress
and indeed, I seem to be getting the progress reported:
...
1
vote
1
answer
51
views
Linux kernel phantom reads
Why if i write to a raw hard disk (without FS) the kernel also makes reads.
$ sudo dd if=/dev/zero of=/dev/sda bs=32k count=1 oflag=direct status=none
$ iostat -xc 1 /dev/sda | grep -E &...
1
vote
1
answer
63
views
Swapping contents of two drives with the same capacity
I have two flash drives, for example, and due to USB speeds prefer have the contents of one on the other and vice versa. This includes the MBR and EFI bootloaders. I am not referring to swap space. ...
0
votes
1
answer
63
views
Piped dd command limits its output to 65536 bytes, why?
My colleague and I are both using a Docker container running Ubuntu 22.04.4 LTS (Jammy Jellyfish):
root@c2155d7af4a4:/# grep VERSION= /etc/os-release
VERSION="22.04.4 LTS (Jammy Jellyfish)"
...
2
votes
2
answers
118
views
Create FAT-formatted disk image that can fit 1G file
I'm struggling to create a FAT-formatted a disk image that can store a file of known size. In this case, a 1 GiB file.
For example:
# Create a file that's 1 GiB in size.
dd if=/dev/zero iflag=...
0
votes
0
answers
28
views
dd or cat for disk images [duplicate]
I used to read and write images with dd (normaly bs=1m) as it has been writen so many times but lately I more often than not simply used cat not really noticing any difference. When not using any of ...
0
votes
0
answers
31
views
Questions about disk allocation
After I uninstalled /dev/nvmeon1p1 from /boot and executed the command dd if=/dev/zero of=/dev/nvme0n1p1, I used the mount command to mount /dev/nvme0n1p1 to /mnt, can I ask if this /mnt can be ...
0
votes
1
answer
242
views
/dev/sda is present but /dev/sda1 and /dev/sda2 are missing
I have a file.img file which was obtained by running dd if=/dev/sda of=file.img. This was done on a device with two partitions, /dev/sda1 and /dev/sda2.
In order to flash a new device with the same ...
0
votes
0
answers
52
views
Mass install linux by dd to drive directly?
I need to install an custom OS to many similar/identical laptops. Would it work to live boot a laptop and dd the disk from a template laptop to the new one? Is it possible to trigger secure boot key ...
0
votes
1
answer
57
views
How to view the existing files of a drive binary copy?
Greetings
I've been recently studying the concepts of compression and copying in Linux.
When I've been introduced to the dd command, I have found it quite useful, so as an exercise, I bit-by-bit ...
0
votes
0
answers
51
views
Copy/Clone one USB stick to another with different size and format
I need to upgrade a USB stick I am using as it has become too small (16 GB) and the new stick is 64 GB which is too large, requires NTFS format. I have used this to reformat the new stick: sudo ...
0
votes
2
answers
188
views
Using dd to back up only contents an image on an SD card
I have a Raspberry Pi (RPi) with a 128 GB SD card. This SD card contains the full OS and settings for the RPi and I would like to back it up. The total size of all files on the SD card are around 350 ...
0
votes
1
answer
27
views
Debian installation from USB: "the logical volume vm-sys-net-private on qubes_dom0 could not be deleted"
I tried Qubes OS and found out that it is too heavy and complicated for me. So I tried to install Debian from a flashed USB. However, the installer gives the following error:
the logical volume vm-sys-...
2
votes
1
answer
114
views
dd command not filling device
I have a surplus 120GB SSD that I want to completely clear of data. With the drive unmounted, I ran
sudo dd if=/dev/urandom of=/dev/sda bs=4M
but it stopped after copying 8GB, reporting “dd: error ...
0
votes
1
answer
87
views
Benchmarking lustre filesystem
I want to benchmark the ability of a single lustre client to save in its lustre-mounted filesystem.
I am an application developer and not a storage maintainer, so i am not worried about storage write ...
0
votes
3
answers
665
views
How to extract the bootloader from an iso?
I found a project on GitHub that emulates a Windows XP operating system, and I have a problem with an iso.
https://github.com/lrusso/VirtualXP/tree/main
I want to extract it, change things and ...
0
votes
0
answers
215
views
How to use dd for only allocated space?
I want to backup whole disk using DD.
I have a 512 Gb disk with 3 partitions who take only 8 Gb and the rest is unused.
root@routerMARS:~# parted /dev/sda print
Model: ATA MT-512 (scsi)
Disk /dev/sda:...
0
votes
2
answers
119
views
Erase external SSD completely, including SWAP
I have an external SSD which I need completely wiped. I had Mint installed on it, with SWAP and some root dir. Those I somehow cannot get rid off. I tried sudo dd but that just wipes sdc and those ...
0
votes
0
answers
22
views
How to rescan/rebuild /dev/sdx after "raw" dd restoration [duplicate]
I'd like to know how to request Linux to update /dev/sdx after doing a "raw" dd restoration of a whole hard disk partitions ?
I have to use dd instead of sfdisk to restore the partition ...
0
votes
1
answer
52
views
Research and Folleys/Three RO Filesystems and No Way to Get the SD Card Back Operating
I have this SD Card that has three read-only filesystems on it. I am using a Linux computer to try to erase via dd or another command tool.
I am currently trying to write an image to the SD Card. ...
0
votes
1
answer
224
views
How do I access all the files on a disk image?
To backup a remote server, I ran this command on my local machine: ssh user@remote "dd if=/dev/vda | gzip -1 -" | dd of=image.gz
I then decompressed image.gz and tried to mount it by double ...
0
votes
1
answer
72
views
DD between different file system
I need to install a new server Linux cloned by DD. In the old server i used xt4 and in the new server i want use i.e zfs. Can use DD command from old ext4 to new zfs?
Thanks to Whom will responde.
0
votes
0
answers
34
views
Command to create a disk image in which bad sectors are replaced by zeroes [duplicate]
From time to time I have HDDs and microSD cards which have bad sectors.
I realized that all photorec, (ext/ntfs/...)undelete and dd fail or are incredible slow.
Other users seem to have the same ...
0
votes
1
answer
100
views
Handle Partition Changes Embedded System
I have to update some outdated embedded systems. But the RAUC Update contains four partitions, while the old systems have only three partitions.
The additional Partition is at the start of the disk ...
0
votes
1
answer
192
views
DD remote disk from windows
I am trying to image a disk for one of our network appliances and am running into an issue with saving the output file.
This is the command:
ssh [email protected] shell "dd if=/dev/md0 |gzip -1 -&...
0
votes
0
answers
56
views
Searching a 1T block device for a specific byte sequence at a specified offset
I'm performing data recovery after an accident with dd. In the longer term, I'll need to use some recovery tools to try and repair the file system
In the meantime, there's an image on the system that ...
0
votes
3
answers
204
views
using dd for clean MBR code doesn't work on pfSense
Trying to clean the mbr code part on a disk using the pfsense 2.7.0 live disk (pfsense is based on freebsd) under shell command.
being /dev/da0 my drive following the suggested code for clean just the ...
1
vote
1
answer
417
views
Creating a compressed image of an exFAT USB drive using dd
My system is running Ubuntu 22.04.3 LTS. I plug a USB drive into that system. That USB drive (/dev/sdb) contains an Ubuntu installation, mostly in an ext4 partition (/dev/sdb3). That installation ...
2
votes
1
answer
177
views
Softirq delayed because of the Heavy I/O Operation
I am trying to copy the contents of a 1 GB ISO file (stored in USB) to my internal storage. As part of a test when i am doing repetitive copy operation from USB to my hard drive continuously I observe ...
1
vote
3
answers
309
views
Write image to current root-partition
I'm currently playing with building disk images (based on Debian) for a raspberry-like computer.
My current workflow looks like:
create disk image (about 16GB uncompressed; or 3GB compressed)
power-...
-1
votes
1
answer
130
views
How can i delete and format sd card partitions that have file system in it?
Ok,I have steam with steam os in it sooo in a way on another i install steam os in sd card
(install steam os in the sf did not end well and got file system that i can not delete or work it) and got ...
0
votes
1
answer
222
views
using a cron job to automatically backup the same drive using dd
so I want to backup my system drive (full drive not just partition) every month using dd, in an external hard drive. So I have something like this in my crontab
0 9 1 * * dd if=/dev/sda | gzip -c &...
0
votes
1
answer
154
views
dd not enough space
I have a drive that is about 1TB big. It is mostly free space. When you add up the size of all the partitions, it is less than 256GB.
I have another drive that is 256GB.
I would like to clone the data ...
1
vote
1
answer
140
views
How to edit grub file after restoring data on a new drive via dd?
I have a dual boot system with ubuntu 20.04 and windows 10. Because of being low on space I am upgrading my ssd to 512 gigs. I have booted into live ubuntu drive, and backed up each partition ubuntu, ...
2
votes
1
answer
2k
views
Is it safe to use /dev/disk/by-id/ instead of /dev/sda?
I am currently using a simple way to back up the drive dd if=/dev/sda of=/dev/sdb.
However, before each operation, I have to check fdisk -l to see if sda and sdb have been swapped during boot.
This is ...
1
vote
0
answers
237
views
Safest way to clone OS disk besides dd and Clonezilla
I would like to clone my OS drive, to a same/larger disk. And I will do this periodically.
On Windows I use AOEMI Partition Assistant to clone disks. The GUI is very good and idiot-proof. However, ...
3
votes
1
answer
637
views
dd - No space left on device with microSD cards
I'm working on Raspberry Pi OS on a Pi3B. I'm working with a script that does a few things for partitioning and there are times I want to wipe the drive, so I use (as root):
dd if=/dev/zero of=/dev/...
0
votes
3
answers
84
views
Analogy of dd command real case when performing RW test
I'm doing these two tests:
#1
dd if=/dev/zero of=./testfile1 bs=512M count=1 conv=fsync
And
#2
dd if=/dev/zero of=./testfile2 bs=1M count=512 conv=fsync
Can I say:
#1 is meaning copying (write ...
2
votes
1
answer
1k
views
How to increase the size of a LUKS file-container
There are many tips on how to resize (increase) a LUKS2 encrypted device / partition / LVM volume. But how to increase the size of the LUKS container created in the file?
I once created:
dd if=/dev/...
1
vote
2
answers
260
views
Why is this dd command with a count and bs param running past its count?
I have a dd command with bs=1M and count=40960M (40GB) and it's consistently running past its count every time I try to run it. This is the exact command, and the output captured before I stop it:
dd ...
0
votes
2
answers
1k
views
Upgrade HDD on PlayStation 4, clone with dd and enlarge the partition using GParted?
Will it work if I use the dd command to clone the almost full 1TB hard disk drive from my PlayStation 4 to a new 2TB drive, then resize the partition using GParted to utilize the full capacity of the ...
2
votes
1
answer
94
views
Disk size is variable
I was flashing a new operating system to a device, but after the process was complete, I couldn't boot into it. I then checked the disk, and I noticed something strange.
Different tools report ...
0
votes
3
answers
7k
views
Is the dd command enough to delete all data from a hard disk?
I need to remove all data from an hard disk where lubuntu 22.04 is installed. I was thinking to boot from an Ubuntu liveUSB image and, from a terminal, use the command:
# the Hard Disk is the device ...
0
votes
1
answer
61
views
Regain full disk space after copying a small image file to a large USB device
I'm copying an image file (size: 2GB) to an USB disk on /dev/sda (size: 2TB) using dd:
sudo dd if=2023-05-03-raspios-bullseye-arm64-lite.img of=/dev/sda bs=4M status=progress conv=fdatasync
After dd, ...
0
votes
1
answer
497
views
Why is dd randomly throwing a "No space left on device" error even though there is plenty?
I am trying to flash an image on a ssd, but have to start multiple attempts until it finally succeeds.
The image is 3 GB in size, the ssd has 1.8 TB. I've seen other people have problems with inodes, ...
-3
votes
1
answer
250
views
How to burn correctly the FreeBSD 7.2 ISO image in a USB stick
I've found that FreeBSD 7.2 should have kqemu,so I want to try how much good it was. I've written the iso image to my USB stick ( /dev/sdj ) with this command :
xzcat 7.2-RELEASE-amd64-dvd1.iso | dd ...