Questions tagged [dd]

A low-level command-line tool on Unix-like operating systems to copy and convert files.

Ref

Examples:

  • Clone the drive sda onto drive sdb:

    `$ dd if=/dev/sda of=/dev/sdb`
    
  • Clone the drive hda onto an image file:

    `$ dd if=/dev/hda of=/image.img`
    
  • Copy a CD or DVD disc to a .iso image file, first unmounting the disc: sudo umount /dev/dvd-device

    dd if=/dev/dvd-device of=dvd.iso bs=2048 conv=sync,notrunc

    # dvd-device will typically be dvd for a dvd disc or cdrom for a cdrom disc.

  • Clone a hard drive to a zipped image file in 100Mb blocks:

    $ dd if=/dev/hda bs=100M | gzip -c > /image.img

  • Create a 10 KB file filled with random data (10 x 1K blocks):

    $ dd if=/dev/random of=random.bin bs=1024 count=10

  • Completely wipe the hard drive hdz by overwriting it with random data:

    $ dd if=/dev/urandom of=/dev/hdz

  • Create a boot floppy:

    $ dd if=boot.img of=/dev/fd0 bs=1440

345 questions
-1
votes
1 answer

removing first 8 bytes using dd is very slow

I'm trying to remeove the first 8 bytes from binary file using the command: dd if=new.pdf of=new2.pdf ibs=1 skip=8 but it's taking too long. Is there a way to remove the first 8 bytes, in a faster way ?
Boom
  • 1,145
  • 18
  • 44
-1
votes
1 answer

transfer rate of dd to a disk is much less than copy file

The case is that I use dd command to build a bootable usb for xxOS. /dev/disk2 is usb device. command is dd if=xxOS.iso of=/dev/disk2 bs=8m It spends a lot of time, the transfer rate is about 2MB/s~4MB/s. It makes me puzzle, why it's more slowly…
ElapsedSoul
  • 725
  • 6
  • 18
-1
votes
1 answer

dd() not working in laravel shared hosting

I am having problem creating symlink in laravel shared hosting. First of all I did not think that the problem was with symlink() function itself. Later I noticed even dd() is not working. Note: dd() works in local environment. Scenario: I have…
Bipin
  • 89
  • 2
  • 13
-1
votes
1 answer

Create the image file from my boot disk

I'm trying to create my own image file from the boot disk, so I can import it to google cloud. However, I got an invalid conversion on it. Hope someone can give me some instruction on that. Thank you!
Alison
  • 105
  • 2
  • 9
-1
votes
1 answer

Disable writing disk signature to MBR in Windows (Address 01B8, 01BC)

Windows is writting a disk signature (serial number) to the Master boot record, if the two addresses 01B8 (4 bytes) and 01BC (2 bytes) are zeros. You can export the first 512 bytes from the drive with dd. Then open diskmgmt.msc. After that, the disk…
Doe John
  • 1
  • 2
-1
votes
1 answer

how to mount dd image on python?, how to use imagemounter module on windows

i want mount my .dd image file on windows system use python script. how to mount dd image on python? I found the "imagemounter" module through the search. https://pypi.python.org/pypi/imagemounter how to use "imagemounter" module?
-1
votes
2 answers

using dd command in c program

I need to use the following code in my c code and compile. dd if=/dev/urandom bs=1 count=400 of=/dev/udp/SrcAddress.ai_addr/8000 This is giving the error ‘dd’ was not declared in this scope How can I use this command inside my c code?
Ashish Kurian
  • 51
  • 5
  • 12
-1
votes
1 answer

Copying files from one directory into another

Exactly what I'm trying to achieve is more complex than the title suggests, but I wanted to keep it reasonably short. I am attempting to do the following; (I'm still very new to bash) "Take a directory of images whose name is given as an argument,…
Chaz
  • 195
  • 4
  • 17
-1
votes
1 answer

Confusion in disk write operation using DD command

I am developing a low level SATA driver for an FPGA based embedded system. The driver is running fine. When I read sectors from the disk using dd command, I can see that the SCSI read(10) command (opcode 0x28) is recived by my low level driver,…
-1
votes
1 answer

Linux dd create multiple iso files

I want to create an iso from an external hard drive. I used this command: sudo dd if=/dev/sdb of=usb-image.iso It works, however, the disk is large (700 GB), and i dont have space on my laptop to store that much. I was thinking about creating…
-1
votes
1 answer

How to use variables between different python tkinter button event actions?

I'm writing a python program to take user input for input file and output directory and then take a dd image of the input file using the subprocess module. I have written the following code. I am not able to use the variables i use in one def, in…
-1
votes
2 answers

Unable to run dd command via popen in python

Code: from subprocess import PIPE, Popen op = Popen("lsblk", shell=True, stdout=PIPE).stdout.read() print op a = raw_input("Enter Path of Device to be copied : ",) b = raw_input("Enter new name for Image : ",) print a+b op=Popen("dd if="+a+"…
rishabh
  • 71
  • 11
-1
votes
1 answer

dd imaging a failing disk which drops connection

I am trying to perform an image on a hard disk which is failing. The issue I am encountering causes the program to fail as the disk will routinely drop during the image process and when it is re-recognised by the system it is under a different…
Craig155
  • 83
  • 7
-1
votes
2 answers

Disk read/write perfomance in linux

I wanted to check the read/write performance of my disk. I am executing the below command to write into a file time dd if=/dev/zero of=/home/test.txt bs=2k count=32k; which gives about 400MB/s For checking the read performance i have executed below…
Andromeda
  • 12,659
  • 20
  • 77
  • 103
-1
votes
1 answer

which log file or how do I locate this log file?

I have perhaps a dumb question, but this might be an easy point... so i run a dd command at the console and I get a message when it is done like: 0+1 records in 0+1 records out 424 bytes (424 B) copied, 0.0191003 s, 22.2 kB/s The question is,…
user3738926
  • 1,178
  • 1
  • 10
  • 17
1 2 3
22
23