BSD Guides :: Doing Stuff With FreeBSD, NetBSD, OpenBSD, & Mac OS X

Mount Images With mdconfig
Created: 02/19/2007


General Information

This guide explains how to mount a floppy image and/or a CD-Rom ISO using mdconfig.

Requirements

  1. Root access.
  2. A floppy image or a CD-Rom ISO.

Usage

Mounting a floppy image

To mount a floppy image, create a virtual device, /dev/md0, for the floppy image.
# mdconfig -a -t vnode -f /tmp/boot.flp -u 0
Now mount the virtual device.
# mount /dev/mnt0 /mnt

Mouting a CD-Rom ISO

To mount a CD-Rom ISO, create a virtual device, /dev/md0, for the CD-Rom ISO.
# mdconfig -a -t vnode -f /tmp/cdrom.iso -u 0
Now mount the virtual device.
# mount_cd9660 /dev/mnt0 /mnt

Unmounting and Deleting a Virtual Device

To unmount and delete a virtual device, first unmount the virtual device.
# umount /mnt
Then delete the virtual device, /dev/md0.
# mdconfig -d -u 0

Author: Jared Barneck
jared at bsdcertification dot com

Find this guide useful?
Support the author: