Questions tagged [dd]

dd is a traditional utility for binary data copies

Filter by
Sorted by
Tagged with
0 votes
1 answer
19 views

Perform backup (and restore) from my current LFS (Linux From Scratch) progress with dd command

I have my LFS proyek, currently I'm in chapter 10 so far according this book https://www.linuxfromscratch.org/lfs/view/stable/chapter10/grub.html . I want to perform backup of my LFS progress so if ...
user avatar
0 votes
1 answer
24 views

Write a bootable image of system into an internal disk, without removing a data partition

I have an internal HDD like partitioned like this: [---- 100 GB unused ----|----------- 800 GB data ------------] 100 GB of unused or "to be deleted" old partitions /dev/sdb1, /dev/sdb2, /...
user avatar
  • 2,245
0 votes
1 answer
32 views

Will dd copy half blocks?

I am using this command to overwrite the data of a hdd: sudo dd if=/dev/zero of=/dev/sdc bs=10M status=progress conv=fsync If the size of my hdd is not divisible by 10M, will dd abort or will it ...
user avatar
  • 293
1 vote
0 answers
30 views

Reading from stdin `dd` copies more data than reading the same thing from file [duplicate]

I encountered weird behaviour of the dd tool: I downloaded compressed "newsystem.iso.xz". I ran xz -d --stdout newsystem.iso.xz | dd of=/dev/sdb bs=1M conv=sync. The decompressed "*....
user avatar
  • 21
1 vote
0 answers
20 views

Calculating the block offset

I need to overwrite certain files in a raw disk image without modifying the disk image too much. Ideally, only certain strings should be overwritten, but this will probably not be possible. That is ...
user avatar
0 votes
2 answers
70 views

What kind of content/data does "fallocate" command generate?

When is executed the sudo fallocate -l 2G /swapfile command, then 2 GB is created, but with that kind of content or data? Can be it customized? If yes How?. I did do some research but there are no ...
user avatar
0 votes
0 answers
20 views

swap file: dd or fallocate? [duplicate]

About swap file in many tutorials within their procedures user either dd or fallocate dd as: sudo dd if=/dev/zero of=/swapfile bs=1024 count=N # N represents a high number to get X giga fallocate as:...
user avatar
0 votes
1 answer
45 views

dd: when is mandatory use bs and count together?

I am reading many tutorials about the dd command. There are some examples including the bs and count parameters. Some of them where each one is isolated over the other and other where both are used ...
user avatar
0 votes
1 answer
11 views

turnkey linux (LAMP stack edition) 16.1 - how to dd entire partition to USB via terminal?

I have it set up so I can access the shell directly from a computer on this local area network just by typing in its local IP. Is there a way to back up the entire disk (while using the operating ...
user avatar
1 vote
1 answer
31 views

Referencing disk image on OpenBSD rather than disk partition

I am unable to find any online help for the following problem. I am trying to make a disk image copy on OpenBSD from one disk to another. On Linux, this is how I would do it: dd if=/dev/sda of=/dev/...
user avatar
  • 11
0 votes
0 answers
21 views

How to access xfs partition encrypted with LUKS backed up with dd

How to access xfs partition encrypted with LUKS backed up with dd? Some time ago I've backup up two disks from old laptop. One of them was encrypted with LUKS and inside it there was xfs partition. ...
user avatar
  • 1
0 votes
1 answer
24 views

Why do we need to set loop devices when mounting ddrescue images?

In various tutorials I see the following command: mount -o ro,loop,offset=123 harddrive.img /mnt/loop but from reading the documentation I can't understand what are loop devices. Why would harddrive....
user avatar
  • 113
1 vote
1 answer
55 views

How to write "Magic Number" boot block to the first sector of my flash drive

I want to try and see how the BIOS detects boot device using the magic number (0xaa55) by writing e9 fd ff 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 * 00 ...
user avatar
0 votes
1 answer
52 views

Why dd seems to provide corrupt copies?

Tried this with different machines running Centos and Ubuntu, with different USB flash drives but dd keeps producing unbootable flash drives. $ sudo dd if=foo.iso of=/dev/sdb bs=1M status=progress &...
user avatar
0 votes
1 answer
54 views

Using dd to restore multiple partitions from multiple image files to same destination drive

I want to use dd command to create image file(s) from a source machine then extract it using dd to a destination machine. But the catch is that mount points / and /home are on separate partitions on ...
user avatar
  • 237
0 votes
1 answer
65 views

dd faster than it should be

When I run the command dd if=/dev/zero of=tmp.dat bs=1M count=1024 status=progress on a 500G HDD I get 833617920 bytes (834 MB, 795 MiB) copied, 1 s, 829 MB/s 1024+0 records in 1024+0 records out ...
user avatar
0 votes
0 answers
15 views

How to copy all contents of a smaller drive onto a larger one?

Is there some way with the command line that I can copy everything on a 256GB drive with Ntfs onto a 1TB one also with Ntfs and everything else intact? I am thinking of a command relating to dd but I ...
user avatar
  • 135
0 votes
0 answers
22 views

Linux no longer booting from onboard memory

I'm having issues with a linux device. We have four of these devices where one of them had an error and I tried to restore it using a dd command which might have resulted in breaking the device. I don'...
user avatar
0 votes
0 answers
26 views

Zeroing bytes to linux dos not working with LVM(XFS) volume

I'm running a CenOS7 on VirtualBox and need to reduce the VDI file. Firstble I need clean the free space using zerofree,trim, dd, etc... I tried to use both (DD and FSTRIM) to clean IT but after a ...
user avatar
  • 1
0 votes
0 answers
43 views

dd is writing indefinitely until disk is full

I want to dd my microSD card, 32 GB, on which I installed RasberryPiOS. I plugged my 2TB SSD with 150GB space left, and send the following command: sudo dd if=/dev/sda1 of=/media/pi/Samsung_T5/raspi2....
user avatar
  • 101
0 votes
0 answers
63 views

Mounting a bad raw disk image without fixing it?

Is it possible to mount a bad disk image without fixing it? Here's the story why. I was playing around with dd, and I accidentally wrote back a 20GB virtual disk image onto the disk itself. The old ...
user avatar
  • 133
0 votes
0 answers
18 views

Does dd bs setting affect the output image when there is input/output error? [duplicate]

Suppose I run the command: dd if=/dev/sda of=/home/user/image.img conv=noerror bs=4M During the run of dd, there are Input/output errors due to read issue of /dev/sda (with error message dd: error ...
user avatar
0 votes
0 answers
46 views

did `dd` buffer entire ~700MB iso image?

I read that to transfer an iso image to a pendrive and print progress I should execute pipeline below. $ dd if=$IMG bs=4M | pv -s 668M | sudo dd of=/dev/sdc bs=4M pv should print and update a ...
user avatar
1 vote
2 answers
47 views

'dd' command disk copy retains old size

I recently upgraded my home server and wanted to increase my cloud disk to 2TB from 600gb. After some research I found the dd command which can fully copy a disk, which in my case seemed like a good ...
user avatar
  • 13
6 votes
1 answer
363 views

tee iso contents into dd or directly to /dev/sda?

Over a year back, I contributed to a tutorial on how to install NixOS on Linode. It seems like most tutorials that deal with putting iso files on installation media always use dd, which is why "...
user avatar
0 votes
3 answers
136 views

Creating bootable USB: does `dd` overwrite partition table, formatting, filesystem?

I'm creating a bootable USB in order to install NixOS. Given a USB at /dev/sda this could be done by running: # download the ISO wget https://channels.nixos.org/nixos-21.11/latest-nixos-minimal-x86_64-...
user avatar
  • 1,654
1 vote
0 answers
69 views

Using dd to clone drive looks stuck

I ran sudo dd if=/dev/sda of=/dev/sdb bs=4M status=progress conv=sync,noerror and it froze almost immediately. But I left the terminal open, and in another terminal I can see two processes with that ...
user avatar
  • 11
0 votes
1 answer
49 views

When restoring contents of a partition from a backup, how to only overwrite blocks that are different in backup and current partition contents? [duplicate]

Usually I would restore partition contents from a backup using dd of=/dev/where/to/restore with incoming stream from somewhere (like ssh connection). However, in the case of making a restore to SSD ...
user avatar
  • 121
0 votes
1 answer
51 views

Does dd have a problem with sockets?

I have a script whose stdin is an established TCP socket. A remote sender sends 14000 bytes, and I have in the script dd bs=140000 >/tmp/foo Yet dd only copies 6000 bytes, and if the recv sends ...
user avatar
  • 3
0 votes
3 answers
95 views

Why dd is giving me a different SD card than its source?

I have a 32 Gb SD card with my OS on it (Raspberry Pi OS Buster) and I wish to make a backup using standard dd, using sudo dd if=/dev/sdb of=/mnt/toshiba2tb/pi20211217.img bs=1M The source SD card ...
user avatar
  • 237
0 votes
2 answers
81 views

how to backup an SD card (containig OS) that is *not* properly seen by other computers, except it works fine to boot the OS(!)

I have this RaspberryPi booting from a 32 Gb sdcard. I took it off the RPi to make a back up but the card shows as a 32 Mb single partition everywhere I plug it. On my other Raspberry it is listed as ...
user avatar
  • 237
13 votes
2 answers
3k views

Why does my dd Full Disk Copy Keep failing at 8 GB?

I am trying to clone a 500 GB SSD to a 1TB SSD. For some reason, it keeps failing when the data being copied reaches 8GB. This is the third 1TB SSD I've tried this on and they all get stuck at the ...
user avatar
0 votes
0 answers
53 views

Convert from Unix to Linux a dd with option conv=asciib

I'm converting some SAS programs from a Unix server to a Linux one. Embedded in a SAS program I have the command dd if=myfile.txt ibs=1 cbs=10 count=10 skip=0 conv=asciib that, on Unix, gives this ...
user avatar
  • 267
1 vote
1 answer
50 views

how can I dd ONLY last portion of drive that hasn't already been dev/zero'd

I regularly dd a drive to erase them for ZFS resilver, when something goes awry with read/write or checksum error, to put the drive back into service. Frequently, removing the partition table at the ...
user avatar
0 votes
1 answer
44 views

what does the dd command do

hello i am very new at linux and was reading a internal documentation on creating space. i came across this command can some one please explain what this command means dd if=/dev/zero bs=1G count=20 &...
user avatar
0 votes
0 answers
71 views

dd not making usb bootable

I'm trying to create a centos 7 install usb but for some reason dd does not make the usb bootable. I've used the following: $ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINTS fd0 2:0 1 ...
user avatar
16 votes
1 answer
2k views

Splitting a small file into 512 byte segments changes it, but splitting it in 1k segments doesn't

So I'm trying to split a 64MB file FileCarve.001 into 512 byte segments (each block is 512 bytes long). I need to make sure the file has the same data when split into smaller files, so I cat all the ...
user avatar
1 vote
1 answer
40 views

Move and shrink a partition at the same time

It is possible to shrink a partition with, for example, parted. It is also possible to move (copy) a partition from one hard drive to another, by creating a partition of the same size on the target ...
user avatar
  • 26
8 votes
2 answers
804 views

Check dd's progress without USR1?

I'm on a Linux busybox 1.27 only system so no output=progress available, no busybox's own implementation of pv which is pipe_progress nor pv itself. I have two questions. The first is based on https://...
user avatar
  • 143
0 votes
1 answer
51 views

Why dd does not overwrite existing data?

When I write random data on the disk with the dd tool, I can access the old data again. To test it, I first added a "text.txt" file to the disk and wrote "this is text" in it. My ...
user avatar
  • 1,072
1 vote
2 answers
158 views

Can dd be used for regular small files?

Man dd: dd - convert and copy a file I'm leaning to use dd. Strangely after copying 1 byte text file becomes much smaller: $ block_size=1; device_to_edit=/media/ramdrive/a; device_from=/media/...
user avatar
0 votes
0 answers
32 views

Partition table for a 4TB hard disk when cloning a hard disk with a msdos table

Using Ubuntu 18.04 LTS. I replaced the bootable internal hard disk in a desktop computer with a brand-new 2TB hard disk. I could transfer the partition table and all data from the previous hard disk ...
user avatar
1 vote
0 answers
35 views

What's the best strategy for migrating a dual boot system to a bigger disk?

I have a dual boot system with Windows and Debian on my laptop and I want to upgrade my disk from a 500GB to a 2TB one, while increasing the sizes of both OS partitions. Here is how things are setup: ...
user avatar
1 vote
1 answer
82 views

sas drive i/o error 5 via raid card - sed locked partition table

I am trying to find a better way to access my newly purchased SAS drives (deepdiscountserver 3tb IBM platters(used or refurb i think yes)), using a 2x4 LSI PCIe3 card. I think the card is only half ...
user avatar
0 votes
1 answer
107 views

DD Zero Error: No space left on device

Hi currently I am getting a problem with this script when running it on one of our xenial servers to mass wipe a batch of drives in one command. Firstly all the drives show up in lsblk, so that is not ...
user avatar
0 votes
2 answers
48 views

How to make .img with used space only using dd

So I installed Ubuntu on a 32GB SD card, and made all the settings and adjustments that I need. Now I want to start to burn this image into a device that has only 8GB memory in its eMMC. The used ...
user avatar
  • 1
-1 votes
1 answer
117 views

dd (data/disk dump, copy and convert) best practices for backups in local external drives

As a domestic user wishing to get best value for it's money on external storage and a well encrypted and resilient backup discipline (having all time in the world). Please, is this a good use of dd? ...
user avatar
-3 votes
1 answer
149 views

Please what does "dd if=/dev/zero of=/dev/null &" do?

What does this command do? dd if=/dev/zero of=/dev/null & I really don't understand what that command counts, because when I run it, it returns 4 figured numbers e.g 6204.
user avatar
0 votes
0 answers
57 views

Are direct writes to block devices buffered? How do I ensure it's written to disk before removing it?

Say I do something like dd if=file of=/dev/sdc (simplified for illustration), is this buffered? Can I sync it like I would any other filesystem write, or do I need to do something else to make sure ...
user avatar
  • 293
1 vote
3 answers
201 views

When writing an ISO image to USB flash drive with dd, how do I know I can remove the stick?

When writing an ISO image to USB flash drive with dd, how do I know I can remove the stick? Obviously I'll wait until the command completes and I'm back at the terminal prompt. But even then the ...
user avatar

1
2 3 4 5
16