sodcalculator

10 Tech How-To

Create a Bootable USB Drive in Linux

Guide 10-43414 · Updated · Step by step

This guide walks you through creating a bootable USB flash drive on Linux, whether you’re installing a new OS, running a live environment, or rescuing a broken system. You’ll learn three reliable methods — using the dd command, the balenaEtcher GUI, and the GNOME Disks utility — plus how to verify the result and fix common issues.

What You’ll Need

  • A USB flash drive (at least 4 GB for most Linux ISOs, 8 GB+ for Windows or larger images). All data on it will be erased.
  • The ISO or IMG file you want to write (e.g., Ubuntu, Debian, Fedora, or a rescue disk).
  • A Linux system with admin (sudo) access.
  • Optional: a tool to verify the checksum of your downloaded image (like sha256sum).

Step-by-Step

Method 1: Using the dd Command (Terminal)

  1. Insert the USB drive and open a terminal.
  2. Identify the correct device name with lsblk or sudo fdisk -l. Look for a device like /dev/sdb (not /dev/sdb1). The size should match your USB stick. Double-check this — writing to the wrong disk can destroy your system.
  3. Unmount any mounted partitions on the USB drive: sudo umount /dev/sdb* (replace sdb with your device).
  4. Write the image with dd (replace /path/to/image.iso and /dev/sdb):
    sudo dd if=/path/to/image.iso of=/dev/sdb bs=4M status=progress oflag=sync

    bs=4M speeds up writing; oflag=sync ensures data is flushed before finishing.

  5. Wait for completion — dd shows no output unless you use status=progress. When the prompt returns, the drive is ready. Eject it safely: sudo eject /dev/sdb.

Method 2: Using balenaEtcher (Graphical)

  1. Download balenaEtcher from the official site (AppImage or .deb/.rpm). Make the AppImage executable: chmod +x balenaEtcher-*.AppImage and run it.
  2. Click “Flash from file” and select your ISO or IMG.
  3. Click “Select target” and choose your USB drive. Etcher will warn you that data will be lost — confirm.
  4. Click “Flash!” — Etcher will write the image and verify it automatically. Wait for the green checkmark.

Method 3: Using GNOME Disks (Pre-installed on Many Distros)

  1. Open “Disks” (gnome-disk-utility) from the application menu.
  2. Select your USB drive in the left sidebar.
  3. Click the hamburger menu (⋮) and choose “Restore Disk Image…”.
  4. Select the ISO file and click “Start Restoring…”. Confirm the warning.
  5. Wait for the progress bar to finish, then reboot or eject.

Verifying the USB Drive

  1. After writing, check the partition table with sudo fdisk -l /dev/sdb — you should see a partition with type “Linux” or “Microsoft basic data” and the correct size.
  2. If you want to verify integrity, compare the checksum of the written drive against the original ISO. For a dd-written drive, run sudo dd if=/dev/sdb bs=1M count=... | sha256sum (the count depends on the ISO size in MB) and compare with sha256sum image.iso. This is optional but recommended for critical installs.

Common Mistakes

  • Writing to the wrong device — using /dev/sda (your hard drive) instead of the USB. Always verify with lsblk.
  • Using the partition instead of the whole disk — /dev/sdb1 instead of /dev/sdb. This often results in a non-bootable stick.
  • Not unmounting partitions — dd or Etcher may fail with “Device or resource busy”.
  • Using a too-small USB drive — the ISO must fit entirely; some ISOs expand to more than their size.
  • Interrupting the write — pulling the USB out mid-write corrupts it. Always wait for completion.

Tips

  • Use a USB 3.0 port for faster writing and booting (blue interior).
  • For UEFI systems, ensure the ISO is UEFI-compatible (most modern ones are). Some older ISOs only boot in BIOS mode.
  • If you plan to reuse the drive later, you can repartition it with gparted or fdisk after use.
  • Test the USB in a VM (like VirtualBox) before using it on real hardware, if possible.
  • Keep a backup of your data — the write process is destructive and irreversible.

Troubleshooting

  • USB not recognized after writing: Try a different USB port (preferably a rear port). Check with lsblk — if the drive shows no partitions, it may have been written incorrectly. Re-write using dd with bs=1M (some drives dislike 4M blocks).
  • Boot fails with “No bootable device”: Ensure the USB is set as the first boot device in BIOS/UEFI. Disable Secure Boot temporarily (some Linux ISOs don’t support it). Also, try writing in DD mode instead of ISO mode if using tools like Rufus (on Windows) — but with dd on Linux, it’s already raw.
  • dd reports “No space left on device”: The USB is smaller than the ISO. Check with lsblk — if the drive is larger but still fails, the ISO may be compressed and expands; use a larger drive.
  • Etcher fails with “Permission denied”: Run Etcher with sudo (not recommended) or ensure your user is in the disk group. Alternatively, use dd.
  • USB drive becomes read-only: Some drives have a physical lock switch. Also, after writing, the partition table may be corrupted; re-partition with sudo fdisk /dev/sdb and create a new partition table.
  • Checksum mismatch after writing: This can happen if the USB has bad sectors. Try a different USB drive or a slower write speed (reduce bs to 1M).

Frequently Asked Questions

Can I use the same USB drive for multiple ISOs?

No, a bootable USB is typically single-purpose. To use another ISO, you must overwrite the entire drive again. Tools like Ventoy allow multiple ISOs on one drive, but that’s a separate setup.

Why does dd take so long?

Writing a few GB to a USB drive is limited by the drive’s write speed. Using bs=4M and status=progress helps, but it can still take 5-15 minutes. Be patient.

Is it safe to write an ISO to a USB that has partitions?

Yes, dd overwrites the entire device, including all partitions. That’s why all data is lost. Make sure you’ve backed up anything important.

Can I create a bootable Windows USB from Linux?

Yes, but Windows ISOs are often >4 GB and use a different boot structure. Use dd or Etcher — they usually work for UEFI systems. For older BIOS systems, you may need WoeUSB or Ventoy.

How do I know if my USB is bootable?

After writing, reboot and enter the boot menu (F12, F2, Esc, etc.). If the USB appears and boots, it’s good. You can also check with sudo fdisk -l — a bootable Linux USB typically has a partition flagged as “bootable” or an EFI system partition.

What’s the difference between dd and Etcher?

dd is a command-line tool that writes raw data; it’s fast and reliable but unforgiving. Etcher is a GUI that adds a verification step and is easier for beginners. Both produce identical results.

Related

General steps for current mainstream versions; menus can differ by device and version. See the disclaimer or report an error.

More in this bed

The whole Tech How-To bed →