# Mount an .iso file for reading?



## Oldrancher (Mar 7, 2016)

Is there any mechanism in FreeBSD for reading files contained in a 9660 .iso file?

For those familiar with Solaris, the `lofiadm` command creates a /dev/lofi node which can be mounted to a mount point, and the file system read as though it were mounted on a removable cd/dvdrom.  

A suitable alternative would be a utility that could read the .iso file in a manner similar to `tar -x` for a tar archive.


----------



## ondra_knezour (Mar 7, 2016)

From the Handbook


```
# mdconfig -a -t vnode -f /tmp/image.iso -u 0
# mount -t cd9660 /dev/md0 /mnt
```


----------



## wblock@ (Mar 7, 2016)

Or from mdconfig(8): `mount -t cd9660 /dev/`mdconfig -f cdimage.iso` /mnt`


----------



## tobik@ (Mar 7, 2016)

Oldrancher said:


> A suitable alternative would be a utility that could read the .iso file in a manner similar to  tar -x for a tar archive.


Look no further than tar in that case.  On FreeBSD tar can do this too thanks to libarchive 

P.S. This is also available on Debian as bsdtar: https://packages.debian.org/jessie/bsdtar


----------



## balanga (Mar 7, 2016)

Oldrancher said:


> Is there any mechanism in FreeBSD for reading files contained in a 9660 .iso file?



If you use Midnight Commander it will automatically view the contents of an ISO by  selecting it.


----------

