/dev on a read-only filesystem?

J. Seth Henry jshamlet at comcast.net
Tue Apr 1 11:42:20 PST 2003


I'll have to give this a try. Right now, I am just remounting / read-only
after boot as part of my /usr/local/etc/rc.d scripts. I'd prefer to
eliminate all writes, though. <sigh> I suppose this means I'm going to
have to repartition the microdrive again. /usr keeps getting smaller and
smaller.

Thanks for the help,
Seth Henry

On Mon, 31 Mar 2003, Lowell Gilbert wrote:

> "J. Seth Henry" <jshamlet at comcast.net> writes:
>
> > The trick is, if I make / read-only, I run into problems with /dev. During
> > boot, I get numerous error messages - and things don't seem to work quite
> > right. Is there a way to mount / read-only, while maintaining a working
> > /dev? Can /dev be mounted from another filesystem - or, preferably (since
> > the OS is already running) be linked to, say, /usr/dev?
>
> I think you still need the devices on the root filesystem, even if you
> later mount something else over the directory.  That's because there's
> a chicken and egg problem -- they need to be there for the other
> filesystems to be mounted in the first place.  So the symlink approach
> won't work, but mounting it on top of /dev from elsewhere would work.
>
> I believe the typical approach on diskless machines is to put it into
> an mfs, but you'd have to doublecheck the documentation on it.
>
> You could also use devfs, of course, but I'm not sure, offhand, how
> well that worked before 5.x.
>
>



More information about the freebsd-questions mailing list