pavement

Mounting ISOs under FreeBSD 5.x

From FreeBSDwiki
Revision as of 15:16, 28 April 2007 by Dave (Talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

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