How To mount ISO images in FreeBSD and 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.
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