extract iso image

David Kelly dkelly at HiWAAY.net
Wed Feb 23 01:58:18 GMT 2005

On Feb 22, 2005, at 7:14 PM, T.F. Cheng wrote:

> hi, I am not sure if I am doing the right thing. I
> want to extract an downloaded isoimage by first
> mounting it. I tried: mount -t iso9660 -o loop
> image.iso /mnt but turns out I don't have
> mount_iso9660 under /sbin, only mount_cd9660. Is there
> any other way to do this? I am running
> freebsd5.3/i386. Thanks!

Is my best guess you have been reading Linux docs to have tried a 
"loop" option to mount in FreeBSD. Isn't done that way here.

What you have to do is create a memory disk which is backed by a file. 
Maybe someone else knows how to do it as non-root:

% su
# mdconfig -a -t vnode -o readonly -f dvd_image.iso
# mount -t cd9660 /dev/md0 /mnt
# ls -CF /mnt
audio_ts/       jacket_p/       video_ts/
# umount /mnt
# mdconfig -d -u md0
# mdconfig -l


What happens is that mdconfig creates the md0 device which contains the 
contents of the specified file. Once the file is turned into a device 
it can be handled same as any other device.

Be sure to deallocate the device after you are finished as Unix doesn't 
release a file's space allocation until the last process closes it.

David Kelly N4HHE, dkelly at HiWAAY.net
Whom computers would destroy, they must first drive mad.

More information about the freebsd-questions mailing list