Ubuntu – How to create an bootable .iso file from Ubuntu Live USB

isolive-usb

I have an Ubuntu 14.04 Live USB (32 GB).

  • Is it possible to create a bootable .iso file from the Live USB ?

how can I create a bootable ISO?

Best Answer

It should be enough to just cat the device. If your USB is, for example, /dev/sdb, you can do:

cat /dev/sdb > foo.img

to restore the image to a USB disk, do:

cat foo.img > /dev/sdb

Note that this approach will create an image file as large as the drive itself, even if the drive is almost empty. If the drive is not 100% full and you only want an iso of the used space, use genisoimage (install it with apt install genisoimage) instead:

genisoimage -o foo.iso /path/to/usb/mount/point