Home / Linux/Unix/BSD / Howto Mount an ISO Image with FreeBSD

Howto Mount an ISO Image with FreeBSD

If you have created an ISO image with a utility like mkisofs or have downloaded an ISO image from a website or FTP archive you can mount it on your filesystem without having to burn it to CD or DVD first. Doing this in Linux is fairly straight forward but it’s a two step process in FreeBSD.

Please note that these instructions are no longer valid for recent releases of FreeBSD because vnconfig is no longer supported. Thanks to Leif Neland for letting me know about this.

Thanks to Rollin Kibbe for supplying updated information available here.

Say for example you are wanting to mount a CD ISO image of a Linux distribution such as Fedora Core 3 Disc 1; the filename of the ISO file in this example is FC3-i386-disc1.iso This example assumes you are in the same directory as the ISO image and that the mount point (/cdrom in this example) already exists.

Mounting the ISO Image

vnconfig /dev/vn0c ./FC3-i386-disc1.iso
mount -t cd9660 /dev/vn0c /cdrom

The above mounts the CD-ROM filesystem at /cdrom and doing ls -l /cdrom will show the contents of the root level of the CD.

Unmounting the ISO Image

umount /cdrom
vnconfig -u /dev/vn0c

It is likely you will need to be the root user to issue these commands. You can either do this by su‘ing to root or by using the sudo command like so:

sudo -u root vnconfig /dev/vn0c ./FC3-i386-disc1.iso
sudo -u root mount -t cd9660 /dev/vn0c /cdrom
sudo -u root umount /cdrom
sudo -u root vnconfig -u /dev/vn0c