Table of Contents

dd

General Information

Using dd to create a USB bootable image.

Checklist


The command

dd if=~/image.iso of=/dev/sdx oflag=direct  bs=2MB

Explanation


Get DD status

To get a progress report while dd is running, you need to open another virtual terminal, and then send a special USR1 signal to the dd process.

First, find out the process id of the dd process by running the following in the new virtual terminal.

pgrep -l '^dd$'
8789 dd

To send the USR1 signal to the dd prcoess:

kill -USR1  8789

As soon as the USR1 signal is detected, dd will print out the current statistics to its STDERR.

$ dd if=/dev/random of=/dev/null bs=1K count=100
0+14 records in
0+14 records out
204 bytes (204 B) copied, 24.92 seconds, 0.0 kB/s

Use the watch command to execute kill at a set interval. (every 10 seconds in this case)

watch -n 10 kill -USR1 8789

Alternative DD status

Another method of getting dd status is using pv. PV “monitors the progress of data through a pipe”.

The dd command then becomes:

dd if=~/image.iso | pv -petr | of=/dev/sdx oflag=direct  bs=2MB

pv options