Creating bootable USB media from ISO image

I’ve found lots of reverences to using livecd-iso-to-disk from the livecd-tools package to create bootable USB media from an ISO image (or for a DVD, quite possibly a UDF image, but the principle is the same). However, most of the descriptions either seem light on examples, or give absurdly complicated examples. It’s actually quite easy, if you’re not concerned with preserving the old content of the USB media.

Suppose your USB media is drive /dev/sdb, and your ISO image is at /path/to/some-image.iso. If you have an actual file system mounted (e.g., /dev/sdb1), unmount it from the command line. (Do NOT unmount it from a GUI, e.g, Gnome, as that may not leave it in a state where it is usable over USB.)

Now run the command: livecd-iso-to-disk --format --reset-mbr /path/to/some-image.iso /dev/sdb1

Previously I spent a bunch of time trying to run the command without the --format option, and got all sorts of complaints about problems with my USB medai, partition table, filesystem, etc. I’m not convinced that the error messages were accurate. The --format option simplifies everything.

The command above will default to formatting the USB media with an ext4 filesystem, which works fine with Linux, but may be inconvenient for use with Windows. You can apparently use the poorly-named --msdos option (which should have been --fat or perhaps --vfat) to use a FAT filesystem on the USB media rather than ext4. However, I haven’t verified that this works.

This entry was posted in Linux. Bookmark the permalink.

Leave a Reply