Fedora/Centos: How to Mount and Unmount ISO Files

June 7th, 2010 by @HKw@! | Filed under centos, Fedora, Linux, Ubuntu.

An ISO image or .iso file contains the disk image of an ISO 9660 file system. According to WIKIPEDIA, ISO 9660, also referred to as CDFS (Compact Disc File System) by some hardware and software providers, is a file system standard published by the International Organization for Standardization (ISO) for optical disc media (CD-ROMs and DVD-ROMs).

In Linux, it is possible to mount the ISO image  so that you can access the files without having to actually burn it to disk. Here is the simple way to show you mount and unmount ISO images without burning them.
1) You must login as a root user

$ su -

2) create a mount point

# mkdir /mnt/iso

3) To mount the ISO image file.iso to the mount point /mnt/iso, run the follwing command:-

# mount -o loop -t iso9660 /home/techkaki/file.iso /mnt/iso

or

# mount -o loop /home/techkaki/file.iso /mnt/iso

If you not specifying the “-t iso9660″ , it will work. The mount command is smart enough to work out that it’s a CD image.

4) Now you can verify that the ISO image is mounted 

# ls -l /mnt/iso

or

# df -hT
Filesystem    Type    Size  Used Avail Use% Mounted on
/dev/mapper/vg_techkaki-lv_root
ext4     72G   24G   48G  33% /
tmpfs        tmpfs    976M  6.3M  969M   1% /dev/shm
/dev/sdb1     ext4    194M   94M   90M  52% /boot
/dev/sdc1  fuseblk     21G   16G  4.9G  76% /media/5ECCB927CCB8FA7B
/dev/sdc5  fuseblk     55G   46G  9.5G  83% /media/data
/dev/loop0 iso9660    7.4G  7.4G     0 100% /mnt/iso

To unmount the ISO Image, use following command :

# umount /mnt/iso

Share

Leave a Reply

BlogCatalog