Differences
This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
linux_wiki:dd [2014/11/17 21:22] billdozor created |
linux_wiki:dd [2016/03/18 23:20] billdozor [dd] |
||
---|---|---|---|
Line 1: | Line 1: | ||
- | ====== | + | ====== |
- | Description: | + | **General Information** |
- | The command | + | Using dd to create a USB bootable image. |
- | < | + | |
+ | **Checklist** | ||
+ | * Distro(s): Any | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== The command | ||
+ | < | ||
dd if=~/ | dd if=~/ | ||
</ | </ | ||
- | Explanation | + | ==== Explanation |
* if = in file, the location of source image | * if = in file, the location of source image | ||
Line 15: | Line 22: | ||
* bs = write in the specified block size | * bs = write in the specified block size | ||
- | __Get DD status__ | + | ---- |
+ | |||
+ | ===== 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. | 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. | First, find out the process id of the dd process by running the following in the new virtual terminal. | ||
- | < | + | < |
pgrep -l ' | pgrep -l ' | ||
8789 dd | 8789 dd | ||
Line 26: | Line 35: | ||
To send the USR1 signal to the dd prcoess: | To send the USR1 signal to the dd prcoess: | ||
- | < | + | < |
kill -USR1 8789 | kill -USR1 8789 | ||
</ | </ | ||
As soon as the USR1 signal is detected, dd will print out the current statistics to its STDERR. | As soon as the USR1 signal is detected, dd will print out the current statistics to its STDERR. | ||
- | < | + | < |
$ dd if=/ | $ dd if=/ | ||
0+14 records in | 0+14 records in | ||
Line 39: | Line 48: | ||
Use the watch command to execute kill at a set interval. (every 10 seconds in this case) | Use the watch command to execute kill at a set interval. (every 10 seconds in this case) | ||
- | < | + | < |
watch -n 10 kill -USR1 8789 | watch -n 10 kill -USR1 8789 | ||
</ | </ | ||
+ | |||
+ | ---- | ||
+ | |||
+ | ===== Alternative DD status ===== | ||
+ | |||
+ | Another method of getting dd status is using pv. | ||
+ | PV " | ||
+ | |||
+ | The dd command then becomes: | ||
+ | <code bash> | ||
+ | dd if=~/ | ||
+ | </ | ||
+ | |||
+ | pv options | ||
+ | |||
+ | * -p : show progress bar | ||
+ | * -e : estimated time remaining | ||
+ | * -t : timer on, show total time running | ||
+ | * -r : rate of data transfer |