Wednesday, 29 August 2012

Procedure to mount ISO images under Linux

An ISO image is an archive file (disk image) of an optical disc using a conventional ISO (International Organization for Standardization) format. ISO image files typically have a file extension of .ISO. The name "ISO" is taken from the ISO 9660 file system used with CD-ROM media, but an ISO image can also contain UDF file system because UDF is backward-compatible to ISO 9660.
You can mount an ISO images via the loop device under Linux. It is possible to specify transfer functions (for encryption/decryption or other purposes) using loop device.

1) You must login as a root user, if not root user then switch to root user using following command:
$ su -

2) Create the directory i.e. mount point:
# mkdir -p /mnt/disk

3) Use mount command as follows to mount iso file called disk1.iso:
# mount -o loop disk1.iso /mnt/disk

To mount the ISO image file.iso to the mount point /mnt/test use this command:
mount -o loop -t iso9660 file.iso /mnt/disk
Syntax: # mount ISOFILE MOUNT-POINT -o loop
$ su -

# mkdir /tmp/mnt

# mount -o loop /downloads/ubuntu-9.04-desktop-i386.iso /tmp/mnt 

# cd /tmp/mnt
# ls -l

4) Change directory to list files stored inside an ISO image:
# cd /mnt/disk
# ls -l


Mount a CD ISO Image

We'll use the regular mount command to mount the ISO image into a folder, just like you would do with a regular drive. The difference is that we pass the -o loop command to specify the loop module, which can handle ISO images.

$sudo mount filename.iso /media/iso -t iso9660 -o loop

Of course you should make sure that you have created the /media/iso folder ahead of time.

Mount a DVD ISO Image

When mounting ISO images of DVDs, you might have to use the UDF type instead of ISO.

$sudo mount filename.iso /media/iso -t udf -o loop

No comments:

Post a Comment