Mounting ISOs under FreeBSD 5.x

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
(Mount -u is the wrong syntax. Changed to umount.)
m (Reverted edits by (Talk); changed back to last version by Robbak)

Latest revision as of 15:16, 28 April 2007

Under FreeBSD 4.x and prior, a utility called vnconfig was used for both creating and mounting RAMdisks and mounting ISOs as virtual drives. However, vnconfig is no longer used in FreeBSD 5.x. To mount an image under a FreeBSD 5.x system, you'll need to use mdconfig, like this:

ph34r# mdconfig -a -t vnode -f /path/to/image.iso -u 1 
ph34r# mount -t cd9660 /dev/md1 /mnt/cdrom

Note that -u 1 matches up with /dev/md1. If you needed to mount more than one device this way, you would use -u x with /dev/mdx as appropriate.

To dismount the ISO and destroy the virtual device (thus allowing you to do things like write to the ISO file), you would issue the following:

ph34r# umount /dev/md1
ph34r# mdconfig -d -u 1
Personal tools