# Creating a virtual CD/DVD from a directory



## setti (Aug 1, 2009)

Good afternoon,

I want to use contents of a directory through as if a virtual CD or DVD :

My folder -----(mount)----->/dev/acd0​
My folder is localised into NTFS partition (Windows Vista)

so My folder --> (mount_ntfs) --> /mnt --> (mount) --> /dev/acd0​
It's possible under Unix ??? :stud

Thank you in advance


----------



## DutchDaemon (Aug 1, 2009)

I don't think you can export an imported mountpoint ("re-mount"), but you could try nullfs(5) for the export.


----------



## setti (Aug 1, 2009)

nullfs but what does mean null file system. I find also null device ??? C'est bizarre !!!


----------



## DutchDaemon (Aug 1, 2009)

Nothing to do with null device. It allows to you mount a directory to another directory on the same system. It is used for exporting /usr/ports to a jail environment on the same system, for example. See the example in nullfs(5).


----------



## aragon (Aug 1, 2009)

nullfs is similar to what setti is after.  Something else similar would be md(4).  If you take that directory contents and put it into a vnode type md disk image, you can turn it into a device entry that lives in /dev.  If you build the md image with something like mkisofs, the device node should behave similarly to a CD device.

Have a look at md(4) and mdconfig(8).


----------

