Skip to content

Writing an image to disk on Linux

Zero Out

dd if=/dev/zero of=/dev/sdf bs=4M

Write Image

dd if=ubuntu-14.04.2lts-lubuntu-odroid-u-20150224.img of=/dev/sdf bs=4M

Device info

udevadm info /dev/sdf

Monitor dd while it's already running

watch -n15 'kill -USR1 $(pgrep ^dd)'

ODROID setup

WARNING: Ubuntu and some other distributions, auto-mount the media when inserted. This can cause inconsistency and errors! You can umount all using: umount /dev/sdX*

  1. Download the selected image (Android/Ubuntu/...).
  2. Unpack it. (If its a .xz extension you can use xz -d image.img.xz on cmd line).
  3. A good step is always to clear your destination media first! dd if=/dev/zero of=/dev/sdX bs=4M
  4. Flash your image: sudo dd if=image.img of=/dev/sdX bs=4M
  5. Always type sync before removing the media to make sure that all data is written.