Guides 11792 Published by

The article explains how the dd command can create bootable USB drives from ISO files by writing raw data block by block and thus producing exact disk copies. It guides readers through finding the right device path with tools such as fdisk or lsblk, unmounting any partitions to avoid accidental overwrites, and then running dd with a 4 MB block size, progress status, and fsync for safety and speed. The writer stresses that interrupting the process can leave a corrupted drive, recommends verifying the result with testdisk or SHA‑256 checksums, and cautions about the lack of capacity checking in dd. While noting that user-friendly tools exist for most users, it advises reserving dd for situations where precise binary fidelity is required and urges double-checking image size against device capacity to prevent data loss.



How to Use the DD Command (and Burn an ISO with It)

Ever tried to make a bootable USB from an ISO and found yourself staring at a gray terminal that looks like it’s speaking another language? The “dd” command can do it—if you’re willing to risk your entire drive in one mis‑typed line. Below is a quick, no‑fluff guide for power users who want raw control over their media.

Why the DD Command Is Still Relevant

The dd tool writes data block by block. It doesn’t care about file systems, partitions, or boot records—it just dumps bytes. That means you can create an exact copy of any disk image, no matter how quirky it is. I’ve seen people crash a laptop after a bad driver update that made the USB stick disappear from /dev/sdb until they rebooted; dd will still write to the raw device if you point it correctly.

Step 1: Find Your Target Device

Open a terminal (Linux/macOS) or PowerShell/WSL on Windows and run:

sudo fdisk -l

or, on WSL:

lsblk

You’ll see entries like /dev/sdb or /dev/nvme0n1p2. Don’t be fooled by names—the letter after the slash is the whole disk. The ISO you want to burn is just a file; the device is the disk.

> Writing to the wrong block will wipe whatever’s on that drive forever. Double‑check the size and number of sectors before moving on.

Step 2: Unmount Any Mounted Partitions

If your USB shows up as /dev/sdb1, you’ll need to unmount it:

sudo umount /dev/sdb*

On Windows WSL, use:

diskpart
list volume
select volume X   # replace X with the right number
remove all
exit

> Why: dd can’t write over a mounted file system; it will throw an error or overwrite data silently.

Step 3: Run DD to Burn the ISO
sudo dd if=path/to/your.iso of=/dev/sdb bs=4M status=progress conv=fsync
  • if= is the input file (the ISO).
  • of= is the raw device.
  • bs=4M sets a 4‑megabyte block size—faster than the default 512 bytes but still safe on most hardware.
  • status=progress shows you how many megabytes have been written, so you know it’s actually working.
  • conv=fsync forces dd to flush writes to disk before it exits; that extra safety can prevent corruption if you’re in a hurry.

> Why these flags? The block size balances speed and reliability; the progress flag keeps you from wondering if you should kill the process. The fsync conversion guarantees all data is physically stored, which matters when you’re writing boot code.

Step 4: Let It Finish (and Don’t Interrupt)

Once dd finishes, you’ll see a line like:

123456789+0 records in
123456789+0 records out
987654321 bytes copied, 12.3 s, 80.5 MB/s

That’s your confirmation that the ISO is now live on the USB.

> Why patience: Terminating dd mid‑write can leave a partially written drive that won’t boot or even be detected by other systems.

Step 5 (Optional): Verify the Bootable Media

Boot from the USB on a spare machine, or run:

sudo testdisk /dev/sdb

and confirm it recognises the partition table and filesystem. If you’re in doubt, use dd’s checksum feature:

sha256sum path/to/your.iso
# Compare that with the official SHA‑256 hash from the ISO vendor
When to Skip DD Altogether

If your goal is just a USB stick for everyday use, tools like Rufus (Windows) or Balena Etcher (cross‑platform) are kinder. They handle partitioning and bootloaders behind the scenes, saving you from accidentally formatting an internal SSD as /dev/sda. Use dd only when you need exact binary fidelity—like copying a Linux installer that expects to be on a raw disk.

A Real‑World Caveat

I once had a friend who used dd to write a Windows 10 ISO onto a 16 GB USB. The drive’s size was less than the image, but because dd doesn’t check capacity, it wrote over whatever came after, corrupting the host OS’s recovery partition. That’s why always double‑check the image size versus device capacity before you start.

That’s all there is to it: a single command that can make or break your bootable media. Keep the device path right, let dd run its course, and enjoy a freshly burned ISO whenever you need it.