pavement

Mounting ISOs under FreeBSD 5.x

From FreeBSDwiki
(Difference between revisions)
Jump to: navigation, search
m
(I frequently mount these things in odd places and it's easier to remember the device name =))
Line 8: Line 8:
 
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:
 
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# '''mount -u /mnt/cdrom'''
+
  ph34r# '''mount -u /dev/md1'''
 
  ph34r# '''mdconfig -d -u 1'''
 
  ph34r# '''mdconfig -d -u 1'''
  
 
[[Category : Common Tasks]]
 
[[Category : Common Tasks]]

Revision as of 08:22, 23 April 2006

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# mount -u /dev/md1
ph34r# mdconfig -d -u 1
Personal tools