An ISO image is a digital copy of a disk used for installing operating systems. These images are often shared in ISO 9660 format, which includes all the necessary data and a boot sector to make them bootable. To use an ISO image for system installations, it can be transferred to a USB drive.

On Linux, there are several ways to create a bootable USB drive from an ISO image. The most reliable and universally available method involves using the dd command. This command-line utility is pre-installed on most Linux distributions and allows direct copying of the ISO image to the USB drive.

Creating a bootable USB from an ISO image is necessary for many tasks, including system installations and troubleshooting. Properly creating the bootable USB ensures that the device functions correctly when used on various systems.

Steps to create a bootable USB drive from an ISO image on Linux:

  1. Open a terminal application on your Linux system.
  2. Enure the ISO image you are using is in the correct ISO 9660 format and is bootable.
    $ 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)
  3. List the available block devices on your system.
    $ 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
  4. Insert the USB drive into your system and wait for it to be detected.
  5. Identify the device name of your USB drive.
    $ 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  
  6. Ensure that none of the partitions on your USB drive are mounted.
    $ sudo umount /dev/sdc1 /dev/sdc2
    [sudo] password for user:

    You may need to unmount the partitions before proceeding.

  7. Use the dd command to copy the ISO image to the USB drive.
    $ 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
  8. Verify that the ISO image was successfully copied to the USB drive.
    $ 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"
  9. Safely remove the USB drive from your system.
Discuss the article:

Comment anonymously. Login not required.