Creating a bootable USB drive from an ISO image enables operating system installations, live environments, and recovery tools on hardware that no longer includes optical drives. Reliable removable media is essential when deploying new systems, testing distributions, or repairing unbootable machines.
On Linux, an ISO image typically uses the ISO 9660 format and contains both the filesystem content and bootloader data required for booting. The dd utility copies this image sector by sector from a regular file to a block device such as /dev/sdc, preserving the boot sector, partition table, and metadata that make the medium bootable.
Because dd performs raw writes, targeting the wrong device can erase an entire disk with all existing partitions and data. Correctly identifying the USB device, unmounting any of its partitions, and confirming the image type before writing reduces the risk of data loss and produces a USB drive that boots reliably on compatible systems.
Steps to create a bootable USB drive from an ISO image on Linux:
- Open a terminal on the Linux system.
- Verify the installation ISO image type using the file command.
$ file Downloads/ubuntu-21.04-desktop-amd64.iso Downloads/ubuntu-21.04-desktop-amd64.iso: ISO 9660 CD-ROM filesystem data (DOS/MBR boot sector) 'Ubuntu 21.04 amd64' (bootable)
- List the current block devices to understand the existing disk layout.
$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 7:0 0 55.4M 1 loop /snap/core18/1997 loop1 7:1 0 219M 1 loop /snap/gnome-3-34-1804/66 loop2 7:2 0 64.8M 1 loop /snap/gtk-common-themes/1514 loop3 7:3 0 32.3M 1 loop /snap/snapd/11588 loop4 7:4 0 51M 1 loop /snap/snap-store/518 loop5 7:5 0 65.1M 1 loop /snap/gtk-common-themes/1515 sda 8:0 0 20G 0 disk sdb 8:16 0 20G 0 disk ├─sdb1 8:17 0 1M 0 part ├─sdb2 8:18 0 513M 0 part /boot/efi └─sdb3 8:19 0 19.5G 0 part / sr0 11:0 1 1024M 0 rom
- Insert the USB drive into an available port on the system.
- Identify the USB drive device name by listing block devices again.
$ lsblk NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT loop0 7:0 0 55.4M 1 loop /snap/core18/1997 loop1 7:1 0 219M 1 loop /snap/gnome-3-34-1804/66 loop2 7:2 0 64.8M 1 loop /snap/gtk-common-themes/1514 loop3 7:3 0 32.3M 1 loop /snap/snapd/11588 loop4 7:4 0 51M 1 loop /snap/snap-store/518 loop5 7:5 0 65.1M 1 loop /snap/gtk-common-themes/1515 sda 8:0 0 20G 0 disk sdb 8:16 0 20G 0 disk ├─sdb1 8:17 0 1M 0 part ├─sdb2 8:18 0 513M 0 part /boot/efi └─sdb3 8:19 0 19.5G 0 part / sdc 8:32 1 58.6G 0 disk ├─sdc1 8:33 1 2.5G 0 part /media/user/Ubuntu 20.04 LTS amd64 └─sdc2 8:34 1 3.9M 0 part /media/user/1079-24A3 sr0 11:0 1 1024M 0 rom
Match the USB drive by size and removable flag to avoid selecting an internal disk.
- Ensure that all partitions on the USB drive are unmounted.
$ sudo umount /dev/sdc1 /dev/sdc2 [sudo] password for user:
Unmounting prevents filesystem corruption and guarantees exclusive access for the raw write operation.
- Write the ISO image to the USB drive using dd.
$ sudo dd if=Downloads/ubuntu-21.04-desktop-amd64.iso of=/dev/sdc conv=fdatasync 5505348+0 records in 5505348+0 records out 2818738176 bytes (2.8 GB, 2.6 GiB) copied, 628.961 s, 4.5 MB/s
Confirm the target device (for example /dev/sdc) carefully; using the wrong disk erases all existing data irreversibly.
- Verify that the target device now exposes the expected label and filesystem type.
$ sudo blkid /dev/sdc /dev/sdc: BLOCK_SIZE="2048" UUID="2021-04-20-11-16-16-00" LABEL="Ubuntu 21.04 amd64" TYPE="iso9660" PTUUID="af8737a9-1e23-4373-b87a-c8b16199d461" PTTYPE="gpt"
The LABEL and TYPE fields confirm that the image was written correctly as an ISO 9660 filesystem.
- Disconnect the USB drive safely from the system once writing and verification are complete.
On desktop environments, use the graphical eject or safely remove option before unplugging the device.
Mohd Shakir Zakaria is a cloud architect with deep roots in software development and open-source advocacy. Certified in AWS, Red Hat, VMware, ITIL, and Linux, he specializes in designing and managing robust cloud and on-premises infrastructures.
Comment anonymously. Login not required.
