Linux Format

A QUICK REFERENCE TO… DD

-

Bootable flash drives are commonplac­e nowadays, be it live distros on a USB stick or SD cards from which to boot a Raspberry Pi. They’re usually made available as image files that you download and copy to the flash drive, but a simple copy in a file manager is not enough. The standard tool for doing this is dd. Legend has it that the name was copy and convert, but cc was taken by the C compiler so it was called dd instead. Some wags now say it’s “delete and destroy” because it’s possible to do great damage with careless use (don’t ask how I know this). Despite the mention of convert, in this context it’s used to just copy, something like $ dd if=somefile.img of=/dev/sdb bs=4M

The if and of options are fairly obvious (input file and output file); bs is block size – how many bytes at a time dd

copies. The default is 512, which is very slow, so always use the bs option.

There are alternativ­es to dd. I use

dcfldd (http://dcfldd.sourceforg­e.net),

which adds extra features including somewhat intelligen­t setting of block size and progress bars. It still has the same core feature of doing exactly what you tell it to do, even if you didn’t really mean to tell it to overwrite your hard drive. There are GUI alternativ­es, such as

Etcher (www.balena.io/etcher) which only enable you to copy to removable drives by default, but do have a pleasing GUI and also add features such as verifying that the image and destinatio­n match after copying.

 ??  ?? If you don’t want to use dd to play Russian roulette with your disk drives, image-burning tools such as Etcher will prevent you from writing where you didn’t mean to.
If you don’t want to use dd to play Russian roulette with your disk drives, image-burning tools such as Etcher will prevent you from writing where you didn’t mean to.

Newspapers in English

Newspapers from Australia