[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: file locations?



In <3.0.5.32.19980513115415.00915210@mail.ra.pae.osd.mil>, Matthew Patton wrote: 
> Yes, yes my holy grail at the moment is finding what constitutes an
> absolutely minimalist system. Preferably something I can boot off 1 flopppy
> but it looks like it'll be 2. The box doesn't do anything but act as a
> router and packet filtering firewall. Any comments regarding such an effort?

If you want to work towards useable one-floppy solutions, a key point
is to reduce the number of binaries (to reduce the number of inodes
and to avoid duplicated libraries and/or the dynamic linking support).

The approach I took is to have a /sbin/init replacement which acts as
init(8) if it is pid == 1 and as other programs if not. To tell which
program it should act like, it looks at argv[0] or if argv[1] is ":"
at argv[2], so you can do `init : route add default kongo`. This saves
inodes.

The version I currently use for routers acts as a simple more(1),
dmesg, a md5-based one-user login, sleep, route(8) and df(1). It's too
rough to be distributed, but if someone wants to look at it, let me
know. I use it with FreeBSD, but I see no reason that it shouldn't run
on OpenBSD out-of-the-box if you replace the dmesg code (needs to be
fixed for kzip'ed kernels anyway) and put in the OpenBSD version of
src/sbin/route/route.c.

Martin 
-- 
%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%%
Martin Cracauer <cracauer@cons.org> http://www.cons.org/cracauer
  cracauer@wavehh.hanse.de (batched, preferred for large mails)
  Tel.: (private) +4940 5221829 Fax.: (private) +4940 5228536
  Paper: (private) Waldstrasse 200, 22846 Norderstedt, Germany