Updated: 10 October 2026 · Applies to: any current Linux distribution; tested on Debian 13 (coreutils 9.7, util-linux 2.41.5, xorriso 1.5.6, wimlib 1.14.4), package names checked on Ubuntu 24.04 and 26.04 and AlmaLinux 10
To make a bootable USB from an ISO on Linux, write the ISO to the whole USB device with dd:
sudo dd if=distro.iso of=/dev/sdX bs=4M status=progress conv=fsync
Replace /dev/sdX with your USB drive (step 1 shows how to find it). This works for Linux installer ISOs. Windows ISOs need a different method, described below. The reverse, making an ISO file from a bootable USB, also uses dd, and this article covers opening, changing and creating ISO files too.
1. Find the USB drive
lsblk -d -o NAME,SIZE,TYPE,TRAN,MODEL,MOUNTPOINTS
The USB drive shows usb in the TRAN column; check the size and model too. Use the whole device, for example /dev/sdb, never a partition such as /dev/sdb1. Writing to the wrong device erases it, so check twice. Unmount anything the desktop mounted from it: sudo umount /dev/sdX?*.
2. Write a Linux ISO to USB with dd
- Check the download against the checksum file the distribution publishes (here Alpine Linux, which we used for the tests):
$ sha256sum -c alpine-virt-3.24.2-x86_64.iso.sha256 alpine-virt-3.24.2-x86_64.iso: OK
- Write it.
bs=4Mcopies in 4 MB blocks,status=progressshows progress andconv=fsyncmakes dd wait until everything is really on the drive. Output from our test (we wrote to a 512 MB image file standing in for the USB drive):$ sudo dd if=alpine-virt-3.24.2-x86_64.iso of=/dev/sdX bs=4M status=progress conv=fsync 16+1 records in 16+1 records out 69206016 bytes (69 MB, 66 MiB) copied, 1.70947 s, 40.5 MB/s
- Remove the drive when dd has returned. The Debian installation guide gives an equivalent:
sudo cp debian.iso /dev/sdXfollowed bysync.
This works because current Linux ISOs are "hybrid" images: besides the CD boot record they contain a partition table, so the copy boots as a disk. fdisk -l shows it on the ISO file itself:
$ fdisk -l alpine-virt-3.24.2-x86_64.iso Disklabel type: dos Device Boot Start End Sectors Size Id Type alpine-virt-3.24.2-x86_64.iso1 * 0 135167 135168 66M 0 Empty alpine-virt-3.24.2-x86_64.iso2 220 3099 2880 1.4M ef EFI (FAT-12/16/32)
We booted the written image as a disk in a QEMU virtual machine and it started: Booting from Hard Disk... followed by the ISOLINUX boot prompt.
3. Graphical tools
- Ubuntu: open Startup Disk Creator (package
usb-creator-gtkon 24.04 and 26.04), pick the ISO and the USB drive and click Make Startup Disk. - GNOME Disks (any distribution, package
gnome-disk-utility): right-click the ISO, choose Open With and pick Disk Image Writer, or select the USB drive in Disks, open the drive menu and choose Restore Disk Image…, then Start Restoring…. - To keep several ISO files on one stick and pick one at boot time, use Ventoy: see create a multiboot Linux USB with Ventoy. For a reusable script, see a Bash script to create a bootable USB from ISO.
4. Write a Windows ISO to USB on Linux
dd does not give a bootable drive from a Windows ISO: Windows ISOs are not hybrid images, which is why Microsoft's own instructions copy the files instead. We checked this. We downloaded the first megabyte of Microsoft's Windows Server 2025 evaluation ISO: the first 32 KB are all zeros, with no partition table and no boot signature, only the boot record for DVDs. We built a test ISO with the same layout and wrote it to a disk image with dd; the virtual machine answered Boot failed: not a bootable disk, while the same ISO booted fine as a CD. Use Ventoy (linked above) or copy the files as Microsoft describes: a FAT32 drive, all files from the ISO, and install.wim split into parts if it is larger than the FAT32 limit of 4 GB.
- Create one FAT32 partition (this erases the drive):
sudo parted /dev/sdX --script mklabel msdos mkpart primary fat32 1MiB 100% set 1 boot on sudo mkfs.vfat -F 32 -n WINUSB /dev/sdX1
- Mount the ISO and the USB drive:
sudo mkdir -p /mnt/iso /mnt/usb sudo mount -o loop,ro Win.iso /mnt/iso sudo mount /dev/sdX1 /mnt/usb
- Copy everything except
sources/install.wim:sudo rsync -r --exclude=sources/install.wim /mnt/iso/ /mnt/usb/
- Split install.wim into parts of 3800 MB, the size Microsoft uses, with wimlib (
sudo apt install wimtools; it is not packaged for AlmaLinux 10, even in EPEL):$ sudo wimlib-imagex split /mnt/iso/sources/install.wim /mnt/usb/sources/install.swm 3800 Finished splitting "/mnt/iso/sources/install.wim"
The parts are namedinstall.swm,install2.swmand so on. According to Microsoft, Windows Setup installs from them automatically as long as the first is named install.swm. If install.wim is smaller than 4 GB, skip the exclude and this step. - Finish:
sync, thensudo umount /mnt/usb /mnt/iso.
We tested the partitioning, the copy with the exclude and the split on test files; we did not boot Windows Setup from such a drive.
5. Create an ISO image from a bootable USB drive
A drive that was written from an ISO (with dd, Startup Disk Creator, GNOME Disks or a similar image writer) still holds that ISO, and you can copy exactly the ISO's size back into a file:
$ sudo isosize -x /dev/sdX sector count: 33792, sector size: 2048 $ sudo dd if=/dev/sdX of=$HOME/copy.iso bs=2048 count=$(sudo isosize -d 2048 /dev/sdX) status=progress $ sha256sum $HOME/copy.iso
In our test the copy had exactly the same SHA-256 checksum as the original download. If isosize answers might not be an ISO filesystem and a sector count of 0, the drive does not start with an ISO (a Ventoy drive, a Windows drive made as above, or a normal data stick). Then save the whole drive instead with sudo dd if=/dev/sdX of=usb-backup.img bs=4M status=progress, or use Create Disk Image… in GNOME Disks. More on drive images in how to create a disk image in Linux with dd.
6. Open an ISO file in Linux
- On a GNOME desktop: double-click the ISO, or right-click it, choose Open With and pick Disk Image Mounter. It appears as a drive in the file manager.
- Mount it read-only:
sudo mount -o loop,ro file.iso /mnt/iso, andsudo umount /mnt/isowhen done. - Without mounting (no root needed):
7z l file.isoorbsdtar -tf file.isolists the files, andmkdir out && bsdtar -xf file.iso -C out boot/grub/grub.cfgextracts one.blkid file.isoshows the volume label.
Packages: 7zip, libarchive-tools (bsdtar) and xorriso on Debian and Ubuntu; bsdtar and xorriso on AlmaLinux 10, 7zip from EPEL. More ways in extract and copy files from an ISO image.
7. Modify an ISO and keep it bootable
Extracting the files and building a new ISO from the folder loses the boot setup unless you repeat every original boot option. xorriso can change files inside the ISO and replay the original boot setup instead. We changed the boot menu timeout and added a file:
$ xorriso -osirrox on -indev alpine.iso -extract /boot/grub/grub.cfg grub.cfg
$ chmod u+w grub.cfg # then edit it
$ xorriso -indev alpine.iso -outdev alpine-custom.iso \
-map grub.cfg /boot/grub/grub.cfg -map notes.txt /notes.txt \
-boot_image any replay
...
xorriso : NOTE : Replayed 21 boot related commands
Writing to 'alpine-custom.iso' completed successfully.
Keep -boot_image any replay after the file changes, as the xorriso manual advises. The new ISO kept its partition table and BIOS and UEFI boot images, and it booted from a disk image in our test.
8. Make an ISO file from a folder
$ xorriso -as mkisofs -o data.iso -V MYDATA -J -R backup/ $ blkid data.iso data.iso: BLOCK_SIZE="2048" UUID="2026-10-09-18-10-26-00" LABEL="MYDATA" TYPE="iso9660"
-V sets the label, -J and -R keep long file names for Windows and Linux. genisoimage accepts the same options (Debian, Ubuntu, EPEL). This makes a data ISO, not a bootable one.
9. Boot from the USB drive
Plug in the drive, switch the computer on and press the key that opens the boot device menu. Microsoft names Esc, F10 and F12 as examples; it differs by manufacturer. Choose the USB drive; if it is not listed, check the firmware settings for USB boot. On a dedicated server you do not need a USB stick: mount the ISO from the IPMI console instead, see installing an OS with Supermicro IPMI virtual media and installing your own OS from a custom ISO on a dedicated server.
Common problems
dd: failed to open '/dev/sdX': Permission denied: run dd with sudo.- The drive looks tiny or strange afterwards: it now holds the ISO's own partition table. To use it for data again, erase the signatures with
sudo wipefs -a /dev/sdXand partition it, or use Format Disk in GNOME Disks. - Copying the .iso file onto the stick did not make it bootable: a file copy is not an image write; use dd, a writer tool or Ventoy.
Official documentation: Debian installation guide: preparing a USB stick, Microsoft: install Windows from a USB flash drive, xorriso manual.
Ucartz services for this topic
- KVM VPS hosting: NVMe SSD and full root access, with Free Basic Managed Support.
- Unmanaged dedicated servers: full root access and free IPMI KVM, with Free Basic Managed Support.
- Linux server management: hardening, patching, monitoring and automation for Ubuntu, Debian, RHEL and AlmaLinux.
