Subject: Re: Read-only root filesystem
To: =?ISO-8859-1?Q?Mikael_Nystr=F6m?= <micke@samladtrupp.se>
From: Ingbert Meyer <imeyer@orceo.com>
List: netbsd-users
Date: 05/22/2007 09:32:40
Mikael Nyström wrote:
>
> On 21 maj 2007, at 14.35, Ingbert Meyer wrote:
>
>> Ignatios Souvatzis wrote:
>>> On Sun, May 20, 2007 at 11:30:12AM +0200, Mikael Nyström wrote:
>>>
>>>
>>>> I have other partitions that are mounted read-write so every file
>>>> that needs to be updated regulary resides on these partitions
>>>> (actually softlinks for motd/resolv.conf etc), but how about /dev?
>>>> Don't I need it to be read-write?
>>>>
>>>
>>> Modern answer:
>>>
>>> Remove all device nodes from it. /sbin/init will create a MFS and build
>>> the device nodes when you boot.
>>>
>>>
>> But be careful: current /sbin/init creates a MFS with only 1024
>> inodes, so you will probably have to tweak MAKEDEV or patch
>> /sbin/init, if you want to do a "MAKEDEV all".
>>> Ancient answer:
>>>
>>> http://2002.eurobsdcon.org/papers/#souvatzis
>>> http://theory.cs.uni-bonn.de/~ignatios/papers/eurobsdcon2002.sharedroot.ps
>>>
>>>
>>> -is
>>>
>>
>>
>
> Is this applicable to NetBSD 3.0? I'm running the i386-port in
> Parallels Desktop for development, the real machine will be running
> the latest stable release when I'm finished.
I use this with NetBSD 4.99.4 and after this warning about 'no
/dev/console', init starts and announces the creation of a MFS on /dev.
Then, there are normal boot messages. So I guess, NetBSD 3.0 is not
applicable.
>
> Removing everything except MAKEDEV (correct?) and reboot results in
> ``warning: no /dev/console'', there's no more output beyond this
> point. So, is init trying to run ``MAKEDEV all'' at this stage when it
> realizes that there's nothing in /dev, and runs out of inodes in the
> MFS? A ``MAKEDEV all'' on the i386 creates well over 1024 devices and
> files in /dev ...
>
You can have 'MAKEDEV' also in /etc.
> Is it the best (easiest) solution to patch MAKEDEV according to my needs?
>
' /sbin/init' does not a 'MAKEDEV all' but 'MAKEDEV init' just to get
the most essential devices running, and
therefore 1024 inodes are ok. So I think, patching MAKEDEV is the
easiest solution, because its working perfectly,
if all needed devices fit into these 1024 inodes.
> Thanks for the help!
>
> /Micke
>
Kind Regards
I. Meyer
--
Ingbert Meyer
____________________________________
orceo GmbH
Landsberger Str. 398
81241 München
Germany
Fon: +49 89 4613-1215
Fax: +49 89 4613-1999
Email: imeyer@orceo.com
Web: http://www.orceo.com/
Geschäftsführer: Nicolas Wild
HRB 158845, Amtsgericht München
UID: DE 245 334 938
____________________________________