FreeBSD: How to mount a iso image

To mount an iso image as if it were a cd one uses the mdconfig command. The man page gives more information, but the procedure would be, assuming you were in the same directory as image.iso

mdconfig -a -t vnode -f image.iso

You’ll see

md0

(Assuming that it’s the first memory disk—md stands for memory disk. The second one would be, obviously enough, md1). Then, mount the memory disk as a cdrom

mount_cd9660 /dev/md0 /mnt

The device will then be mounted as if it were a CDROM. To unmount it afterwards, use the -d for detach (and -u for unit).

mdconfig -d -u 0

0, of course, refers to the unit’s number. If it were md1, then you would use mdconfig -d -u 1.

Posted by Administrator on Friday, October 27, 2006

digg delicious technorati blinklist furl reddit