Is it possible to create a directory under /dev?

Jille jille at quis.cx
Sun May 25 10:31:29 UTC 2008


Please note that unionfs still has a few bugs!
You will need at least patchset p19 for mounting devfs below/above 
unionfs mounts.
There is also a patchset p20, still experimental, you might want to try it.

-- Jille

Oliver Fromme schreef:
> Andriy Gapon wrote:
>  > But, by the way, there is a (slightly) more valid reason to want to 
>  > create a directory under /dev, I recently had it. For one non-standard 
>  > third-party application I needed to create a link to existing device in 
>  > a certain subdirectory. I.e.:
>  > /dev/subdirX/device -> /dev/deviceX
>  > And I couldn't do that.
> 
> You could create a directory elsewhere and use UNIONFS to
> merge it with your existing /dev.  I haven't tried this,
> but I think it should work.
> 
> # mkdir /mydev
> # mount -t unionfs -o below /mydev /dev
> # cd /mydev
> # mkdir subdirX
> # ln -s /dev/deviceX subdirX/device
> 
> The "-o below" option is used so that any modifications on
> /dev -- such as creating symlinks -- still happen on the
> real /dev, not on /mydev.
> 
> Best regards
>    Oliver
> 


More information about the freebsd-stable mailing list