I recently discovered that I can create a bootable USB key from an ISO file by simply using cat (or dd).

I can't find any information on how this works. Why would:

cat my.iso > /dev/sdb && sync

take that file and write all the files it contains, in bootable format, to a device?

  • I've never thought to use cat in place of dd when making liveUSBs
    – Rob
    Commented Feb 13, 2012 at 19:51
  • 4
    It was in the instructions for "Tails", the live Tor image. I did a little googling (before asking here) and it seems that dd was what people used to use for this sort of thing, but cat seems to be the preferred tool now. I guess it's easier as you don't have to bother specifying named parameters for input/output details.
    – user13757
    Commented Feb 13, 2012 at 22:51

2 Answers 2


An ISO file is a complete, formatted filesystem image. All cat or dd does is do a bit-for-bit copy of that filesystem image to your target media.

There is no magic going on behind the scenes. The ISO filesystem preparation was done beforehand (often by a specialized tool). All cat does is write that collection of bytes out. It doesn't interpret the .iso at all, nor does it understand that it's trying to create a bootable removable medium at all.
It does require proper support from the kernel and device driver to make the writes work on that media. A bit of "magic" goes on there, since writable optical media don't operate exactly the same way as conventional hard drives. But that magic doesn't involve interpreting the contents of the ISO file.

You could mount the .iso file directly without burning it by using a loop mount (if such a thing is available on your OS). Similarly, you can create a file that contains for instance an ext4 filesystem, and you could cat that to a partition.

  • 1
    and then simply make sure the data have really written to you partition (instead of just bufferred)
    – yuyichao
    Commented Feb 13, 2012 at 13:07
  • @yuyichao sync should cover that, right? Edit: I just realized I replied to a 6 years old comment
    – Manchineel
    Commented Sep 26, 2018 at 17:21

This works because the iso image was processed withisohybrid, which installs a normal syslinux boot loader into the iso image. This is possible because iso9660 does not normally use the first few sectors of the image, so a more or less normal hard disk boot loader can be placed there. When burned to an optical disk, it is ignored and the bios boots the disc using the conventional el torito cdrom boot method. When the image is placed on a flash drive, the syslinux boot sector is loaded.

You must log in to answer this question.