Subject: Re: NetBSD on Compact Flash
To: None <current-users@NetBSD.org>
From: None <roberto@redix.it>
List: current-users
Date: 02/03/2004 09:35:29
> Quoting David Young (dyoung@pobox.com):
>> On Tue, Jan 20, 2004 at 11:04:14PM -0500, Jan Schaumann wrote:
>> > Hello all,
>> >
>> > Roberto (roberto at redix dot it) has kindly made available his
>> ``NetBSD
>> > on Compact Flash'' documentation to me, and I put it online at
>> > http://www.netbsd.org/~jschauma/netbsd-solidstate.html and
>> > http://www.netbsd.org/~jschauma/netbsd-solidstate.pdf.
>> >
>> > If somebody would like to look over it and suggest a good place where
>> to
>> > include it in our website, I'd appreciate it.
>> >
>> > Thanks!
>>
>> Incidentally, I use the attached rc script to mount memory filesystems
>> and
>> copy their contents from disk so that I can run NetBSD off of a CD-ROM
>> or a read-only CompactFlash. It should be pretty easy (almost trivial)
>> to use it for making "Live" CD-ROMs.
>>
>> Should I check the script in?
>
>
> There's a lot to be said to not putting whole FILE systems
> into an MFS, but just parts of it.
>
>
> I have an /MFS/
> which is populated on boot from /MFS.PROTO/ (I use rsync, but pax would
> do)
>
> sym links from (say) /var/tmp -> /MFS/var.tmp/
> Same for /var/run,
> Several files in /var/db/
> /etc/resolv.conf -> /MFS/etc/resolv.conf
>
> and so forth.
>
>
> Been doing this on a soekris for a couple years on a couple BSDs
> on Compact Flashs (devfs is nice).
>
> Mounting /var in memory is wrong and wasteful. Also bad on a
> machine with 32MB of RAM and no swap.
Could you explain why it is wrong?
OK it could be wasteful, but modern commercial RAM dimm are from 64MB an
more common from 128-256. For example here my partition configuration on
256MB RAM (we do not find a small dimm): I've used 30MB RAM for /var
Filesystem 1K-blocks Used Avail Capacity Mounted on
/dev/ad2s1a 122270 116400 5870 95% /
mfs:17 1486 68 1300 5% /dev
mfs:3524 30686 696 27536 2% /var
It is used as firewall for 5PC lan, with a medium LAN load. All the memory
it is almost free, and in my opinion it could be running on a 64MB RAM.
I've tried a config. even on 32 MB RAM, no swap, 4 or 8 (I do not remember
correctly) MB var on mfs and it run fine.
>
> It got me into the habit of making / readonly on boxes doing
> mail relay and DNS and the like. Nice that a power failure
> pretty much risks NOTHING - most disks aren't RW, dns is secondary
> and mail data is pretty transient.
>
Regards,
Roberto