How to create ISO images in Ubuntu

By Detector | 03 October 2008



Linux – that excellent operating system! In Linux everything is simple, but also in the same time everything is so complex. In this post we will give you a small tutorial about ISO images files and how to make them under Ubuntu Linux operating system.

An ISO image file is a file that stores the complete contents of a disk or directory. You can create an ISO image file from CD or DVD, or just from specific directory or folder.

How to create an ISO file from a CD or DVD:
In terminal:

INFO=$(isoinfo -d -i /dev/$DEVICE) && echo “$INFO” && dd if=$DEVICE of=$ISO_FILENAME bs=$(echo “$INFO” | grep “^Logical block size is:” | cut -d ” ” -f 5) count=$(echo “$INFO” | grep “^Volume size is:” | cut -d ” ” -f 4) conv=notrunc,noerror,sync

where

  • $DEVICE is the device name, such as dvd, cdrom, cdrom1, etc
  • $ISO_FILENAME is filename of the ISO file to be created, such as out.iso

If this step fails with an “input/output error”, try various combinations of unmounting/remounting/ejecting the device:

sudo umount -l /dev/$DEVICE
eject /dev/$DEVICE
sudo mount /dev/$DEVICE

If you make ISO image from audio or video disk,to test it – try playing it with Totem or MPlayer first.

How to create an ISO file from a directory:
In terminal:

mkisofs -o $ISO_FILENAME.iso $DIRECTORY

Tags | , , , ,

| |

One Response to “How to create ISO images in Ubuntu”

  1. bob says:

    great!!






Archives

Add to Technorati Favorites
website stats
TwitterCounter for @ukion