android bsd linux unix & open-source world


How To mount ISO images in FreeBSD and Linux

WP Greet Box icon
Hello there! If you are new here, you might want to subscribe to the RSS feed or subscribe via E-mail for updates on this topic.

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.

1. Procedure to mount ISO images under Linux

You can mount an ISO image via the loop device under Linux. It's possible to specify transfer functions using loop device.

You must login as a root user, if not root user then switch to root user using following command:

$ su -

Create the mount point:

# mkdir -p /mnt/cdrom

Use mount command as follows to mount iso file called image.iso:

# mount -o loop image.iso /mnt/cdrom

Change directory to list files stored inside an ISO image:

# cd /mnt/cdrom
# ls -l

To unmount the image use command:

# umount /mnt/cdrom

2. Procedure to mount ISO images under FreeBSD

First you have to create virtual device, using this command:

# mdconfig -a -t vnode -f /path/to/image.iso -u 1

The "mdconfig" command creates a device and prints the name. Just append that to "/dev/" and mount:

# mount -t cd9660 /dev/md1 /media

To unmount the image use command:

# umount /media

Once unmounted, you can unconfigure the device with

# mdconfig -d -u 1

NOTE: Once mounted, you cannot write to your ISO image. ISO images are read-only by design. If you want to change the ISO image, use mkisofs.

Print This Post Print This Post
Comments (2) Trackbacks (0)
  1. I absolutely adore reading your blog, the variety of writing is smashing.
    Keep up the good work!

  2. Hey, very nice blog. I came across this on Google Search. I will definately be coming back here more often.

Leave a comment


No trackbacks yet.