Questions tagged [dd]

dd is a traditional utility for binary data copies

Filter by
Sorted by
Tagged with
3
votes
1answer
880 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
0answers
30 views

Fast way to create virtual disks?

I want to create virtual 500GB ext4 disks on external usb disks and samba/nfs shares. For test purposes, I first tried with a 1GB file using the following commands. sudo dd if=/dev/zero of=/mnt/...
-1
votes
0answers
24 views

I have filled with zero sdc and can't login at gui

When I tried to format to default my usb thumb ( /dev/sdb ) by mistake I have filled /dev/sdc with zeros with the next command: dd if=/etc/zero of=/dev/sdc My last device added was the thumb, so I ...
2
votes
1answer
58 views

dd if=/dev/zero leaves drive contents in-tact? Bad USB stick?

I thought I could nuke all partitions of a drive by using dd if=/dev/zero of=/dev/sdX. In the past this has always worked for me, but in this case it is not working as expected. #check the partitions ...
2
votes
0answers
28 views

dd measurement question

I am wrestling with some perceived performance issues on a 3-node HPE Apollo cluster running Linux. (The cluster supports a backup application.) These are very $$ servers. In our setup each node ...
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 ...
5
votes
3answers
1k views

Help with unzipping a .dd.gz, possibly corrupted

I recieved this file that I was told was a copy of a hard drive (or disk). The file is "sheeva-mem.dd.gz". I tried to unzip the file in a linux Fedora machine. This yielded "unexpected end of file". ...
0
votes
0answers
23 views

USB stick with hidden capacity?

While using dd on my USB drive, the USB drive accidentally got unplugged. The max capacity is 8GB, and 5GB had been written to it. Now, when I try to reformat the USB drive or even remove all ...
0
votes
1answer
976 views

How to change UUID after cloning a Mac HDD with `dd`?

After 1 day of googling and try&error I give up and ask for help. Long story short: I cloned internal HDD of my iMac (Mid 2011) to external SDD with dd command. Now I have two identical discs ...
4
votes
2answers
284 views

confused about dd write speed and VFS page cache

After reading some articles on the Linux VFS page cache and the tunable parameters like dirty_ratio i was under the impression that page cache would operate as both read and write caching layer. But ...
110
votes
20answers
25k views

What is the fastest way to send massive amounts of data between two computers? [closed]

This is a situation I am frequently in: I have a source server with a 320GB hard-drive inside of it, and 16GB of ram (exact specs available here, but as this is an issue I run into frequently on ...
7
votes
5answers
10k views

how to use dd to fill drive with 1's

Filling a drive with /dev/urandom seems to be very slow, so I created a file filled with FF: dd if=/dev/zero ibs=1k count=1000 | tr "\000" "\377" >ff.bin I'd like to fill the drive with copies of ...
-1
votes
0answers
35 views

Completely starve system I/O with high priority `dd`

I am writing a script that uses dd to flash an SD card that contains an actively running operating system. In the absence of usable mandatory file locks in linux, I need a way to ensure (to a ...
1
vote
1answer
28 views

How should I go about safely checking if performing dd on /dev/random is going to block?

I'm developing a shell script that only uses /dev/random in the following manner: dd if=/dev/random of=%{outputFile} count=512 bs=1 2>/dev/null I explicitly do not want to use /dev/urandom, even ...
0
votes
2answers
45 views

dd command - can it show record size when reading from tape

I have data on tape with a variable block size. when reading these tapes I can use tcopy /dev/st0 (for example) to show the record size as it reads from tape. Ultimately I copy the data from tape ...
0
votes
2answers
40 views

Slow disk write speed

i installed new debian 9.8 server for DB application.it has two disk and running on vCenter 6.0. First write disk write speed 100-120 Mb/sec suddenly after for while disk write speed decrease ...
13
votes
4answers
18k views

How to pad a file to a desired size?

I have a file that I want to pad until it reaches 16 MiB (16777216 bytes). Currently it is 16515072 bytes. The difference is 262144 bytes. How do I pad it? This doesn't seem to be working: cp ...
58
votes
2answers
13k views

When is dd suitable for copying data? (or, when are read() and write() partial)

Short version: In what circumstances is dd safe to use for copying data, safe meaning that there is no risk of corruption due to a partial read or write? Long version — preamble: dd is often used to ...
10
votes
3answers
15k views

How to check integrity of a dd backup?

I just made a backup of an entire hard drive (50GB) over ssh via: dd if=/dev/hda | buffer -s 64k -S 10m | ssh myuser@myhost "cat > ~/image.img" What's now the best way to check the integrity of ...
9
votes
4answers
5k views

Resuming a DD of an entire disk

I'm overwriting my hard drive with random data using the good old dd: dd if=/dev/urandom of=/dev/disk/by-uuid/etc bs=512 It's a 2TB array and my MacBook (running Linux, ok?) can only write data at ...
-1
votes
1answer
58 views

Is dd on OS X the same as the UNIX version?

Although I considered asking this question in apple.stackexchange, my gut tells me the 'NIX crowd is more likely to produce a better response. In what ways is the dd (OS X version) command any ...
1
vote
1answer
1k views

cant run dd command on android device

The main objective is to send a splited file to an android and join it back up with a .sh script, the file is splited to 5MB parts but its total size is unknown (trying to make an universal script), I'...
2
votes
3answers
855 views

Usb size wrong after dd write of a ISO-Image

I have just used dd to place the Kali Linux ISO file onto my USB. I then tried to install Kali Linux via the USB, but I couldn't since the install-image was corrupt. I booted back into my other Linux ...
2
votes
2answers
29 views

Does dd change any data if `if` and `of` already have the same contents

I was gonna copy a partition to another partition using dd (dd if=/dev/arch_data/root of=/dev/sdd3), and it worked. But then I accidentally re-ran the same command again, and it takes a while so I hit ...
35
votes
8answers
23k views

Clone whole partition or hard drive to a sparse file

I like to clone a whole partition or a whole hard drive onto a larger external disk but like to create a sparse file. I often use dd for cloning, but it doesn't support sparse files. As a workaround I ...
1
vote
1answer
481 views

dd hanging & uninterruptible sleep (kernel quirk?)

So, this has been annoying me for years. This happens with more programs than just dd, but I find it happens very often with programs that involve raw filesystem manipulation. When I'm copying with ...
2
votes
0answers
12 views

Avoid pipeline stalls from write caching to usb drive

I have the following process I use for backups: btrfs send snapshots/home-2016-06-04 | zstd --verbose -T4 - | gpg --batch --passphrase-file /tmp/secret --compress-algo none --symmetric - > /mnt/...
2
votes
0answers
41 views

dd copied UUID - How to make GRUB2 find the correct partition?

Using Grub2 on Ubuntu LTS Xenial On sda1, I dd the partition to sdb1(which already has GRUB2 on the MBR) with sudo dd if=/dev/sda1 of=/dev/sdb1 bs=1M. I found that it also copied the UUID. So, both /...
8
votes
6answers
22k views

Why can't I copy my DVD with dd?

I tried dd, dd_rescue and ddrescue, all failed. I thought these tools bypass the filesystem and make a bitwise copy. dd is fooled, it finishes but just produces a small file and states it's finished. ...
1
vote
1answer
60 views

Burning a Linux Ubuntu bootable USB with dd

I am installing Linux on a machine and got the Ubuntu 18.04 LTS image. I formatted a 32 GB Sandisk drive on macOS with MS-DOS (FAT) format and GUID Partition Map scheme. I found the name of the disk ...
0
votes
1answer
2k views

DD Clone not booting

I cloned my SSD to my USB using dd, but the USB won't boot... Here's the story: I just got a 275 GB SSD to replace my 128 GB SSD, which is running low on space, but I want to continue using my Ubuntu ...
22
votes
4answers
33k views

Force dd not to cache or not to read from cache

I'm working on an embedded system with the busybox version of dd. I'm trying to test an erase to the drive from some outside utility, however dd does not read from the disc again after the erase, but ...
0
votes
0answers
30 views

New CF memory card not empty (random pattern instead of zeros)

I recently bought a 16 GB "Sandisk Ultra" Compact Flash card for my camera. I always do some testing on new storage devices before starting normal use: first some scanning, then maybe a copy of the ...
0
votes
2answers
29 views

Backup using dd reformatted disk from ntfs to ext4. Can I recover any of the files? [duplicate]

I accidentally started a backup from /dev/sda3 my root partition that is formatted as ext4 to my backup hard drive dev/sdb2 which was formatted as NTFS. I did this using the dd command: dd if=dev/...
2
votes
0answers
26 views

Is there a reason to use dd if I don't use any extra parameters? [duplicate]

I often use dd when I for example want to copy an image to a usb drive. I only do dd if=infile of=/dev/sdb. Is there any advantage to this over < infile > /dev/sdb? And is this the exact same as ...
1
vote
2answers
50 views

Resume DD on creating a disk ISO?

I'm trying to create a full disk ISO image of a 250GB HDD but I had to cancel the operation about 80% of the way through, it'd taken nearly 16 hours to get to this point and I'd rather not have to ...
1
vote
2answers
6k views

How to make a bootable usb from commandline?

The question is common, but I am not able to solve it with the explanations I found here. Situation: 4GB usb stick Manjaro operaing system iso image file of linux mint First, I did: lsblk # and ...
1
vote
1answer
353 views

BASH dd problem

i am trying to learn bash and now im trying to do a script for burning isos. I made the number "4" command to make sure the variables were right. the message i get when i complete my program and ...
25
votes
2answers
37k views

Running dd. Why resource is busy?

I just formatted microSD card, and would like to run a dd command. Unfortunately dd command fails: $ sudo dd bs=1m if=2016-02-26-raspbian-jessie-lite.img of=/dev/rdisk2 dd: /dev/rdisk2: Resource busy ...
1
vote
1answer
244 views

dd: No space left on device

I was restoring a backup of my Raspberry Pi on a new micro SD card. The original card was 16Gb and the destination card was 16Gb, too. However, during the transfer dd complained that there isn't any ...
1
vote
0answers
47 views

How to wipe a partition quickly with value zero? [duplicate]

I want to wipe a partition quickly.I search the answer in website. such as: dd if=/dev/zero of=/dev/sda1 bs=16M count=96 shred -v -z -n 1 /dev/sda1 But: All the commandline,will overwrite with ...
1
vote
2answers
846 views

Can I use dd to move my system to another partition?

Currently, my whole system is located at the end of my hdd. I'd like to move that data to the beginning and still have booting and other details working. dd seems to do exactly what I want (to copy ...
3
votes
3answers
2k views

How to inspect the contents of /dev/sdt

I have what I hope is not a huge problem, but it could end up being a very large problem. For some context, I mistakenly ran this command on my 27" iMac: sudo dd if=ubuntu-rescue.img of=/dev/sdt bs=...
10
votes
3answers
42k views

How to fix this I/O error on a SD card?

I tried with gparted, it didn't work. I found a SDFormatter, tool for windows that did the full erase. I have a SD card and want to install Debian onto it. The dd process takes about 45 minutes, ...
20
votes
2answers
10k views

Is it better to use cat, dd, pv or another procedure to copy a CD/DVD?

Background I'm copying some data CDs/DVDs to ISO files to use them later without the need of them in the drive. I'm looking on the Net for procedures and I found a lot: Use of cat to copy a medium: ...
0
votes
1answer
387 views

dd command oflag direct and sync flags

I have the below shell script and I wonder whether oflag's direct does the sync automatically or it is explicitly required dd bs=10M oflag=direct,sync of=ofile.bin Also what is the difference in ...
5
votes
1answer
150 views

System lags when doing large R/W operations on external disks

I am having some issues with system-wide latency/lagging when doing large disk imaging operations on an Ubuntu 18.04 system. Here's the system specs: Processor: Intel Core i7 (never near capacity on ...
0
votes
1answer
982 views

dd script with timings

Trying to figure out the best approach to a script that will do the following: Create a loop script that creates a 10GB file using dd where, upon completion, removes the file, then repeats 25 times ...
0
votes
1answer
87 views

Can I restore a Grub installation using dd?

I have a dual boot system with this partition layout: # fdisk -l Disk /dev/sda: 596.2 GiB, 640135028736 bytes, 1250263728 sectors Disk model: SAMSUNG HM640JJ Units: sectors of 1 * 512 = 512 bytes ...
2
votes
3answers
2k views

What's the POSIX way to read an exact number of bytes from a file?

Just hit this problem, and learned a lot from the chosen answer: Create random data with dd and get "partial read warning". Is the data after the warning now really random? Unfortunately ...