Date: Fri, 23 Jan 1998 11:27:19 +0100 (CET) From: Andrzej Bialecki <abial@nask.pl> To: freebsd-isp@FreeBSD.ORG Subject: One floppy FreeBSD Message-ID: <Pine.NEB.3.95.980123112314.24258A-300000@korin.warman.org.pl>
next in thread | raw e-mail | index | archive | help
[-- Attachment #1 --]
Hi!
I thought this list might also be interested... Sorry if I'm wrong. The
original announcements and discussion go for some time on other lists, and
IMHO this idea might be helpful to ISPs and their clients. Original
READMEs are attached.
Andrzej Bialecki
---------------------+---------------------------------------------------------
abial@warman.org.pl | if(halt_per_mth > 0) { fetch("http://www.freebsd.org") }
Research & Academic | "Be open-minded, but don't let your brains to fall out."
Network in Poland | All of the above (and more) is just my personal opinion.
---------------------+---------------------------------------------------------
[-- Attachment #2 --]
1998.01.22, Warsaw, Poland
PicoBSD 0.2
-----------
What is PicoBSD?
----------------
It's a one floppy version of FreeBSD (please see http://www.freebsd.org),
configured mainly for networking applications. It can be used as a router or
firewall, or kind of a fixit floppy (or all of them).
What are minimal requirements?
------------------------------
* 386 CPU or better (you must have a DX version, or math coprocessor installed
as there is no FPU emulator in kernel)
* 12MB RAM - the more the better. If you have an HDD, you can make a
swap partition or swap file (using vnode driver and vnconfig). Then you
probably will be able to run with ca. 6MB only. But RAM is cheap...
* Modem sitting on COM1-COM4 (default is to use COM2), if you want to have
a PPP connection.
* Network card: compatible with NE2000, or PCI cards with DEC chipsets
(ed and de drivers). The kernel supports two of them (i.e. four total) plus
two PPP connections (tun interfaces). So you can easily build something like
router with as many as 6 outlets :-)
What is different from previous verison?
----------------------------------------
* More in-kernel drivers
* ATAPI CD-ROM support
* No ssh, ftp nor ee editor (which means you have to mount the floppy on
normal system in order to edit config files)
* Added: inetd, telnetd, routed, ps, kill, netstat, ping, traceroute
* passwd(1) works (but only if you run it as root)
* Support for NFS client
* There are initially two users: root (password 'setup') and user (password
'PicoBSD'). I had problems with correctly setting up permissions (as most
of the programs are just one big file with hard links), so that several
things which normal user can do here are impossible (no suid bit set). This
means that normal user can do as much as telnet from the system....
* Added 'update' script which updates the contents of /etc directory on the
startup floppy (in case you changed e.g. password).
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
!!!!!!!!!! BONUS FOR ALL PICOBSD FANS !!!!!!!!!!
+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
I think most of you will enjoy the pbsd-s.tgz file bundled with the floppy.
It contains all of the scripts (plus ash [a Shell]) needed to create your own
version of PicoBSD. These are exactly the same scripts I used.
So, if you don't like the version I prepared, or if you think I made a
wrong selection of the programs included, you can make your own version of
one-floppy FreeBSD.
The /scripts directory contains the kernel config file named PICOBSD.
You can edit it to suit your needs. Keep in mind, though, that the total space
on the floppy is VERY limited!
Next, you can look into the /crunch{1,2} directories and edit crunch.conf
files to suit your needs. The above remark concerning the space applies also
here - keep in mind that floppies are indeed very small creatures.. :-))
You will need a system with configured pseudo-device vn (consult the config
file of your running kernel), and with /mnt directory available. You'll also
need ca. 4MB of free space (not including the space needed to compile the
kernel, which is ca. 5MB).
Next, you go to the /scripts directory and run ./build script. If all is well,
after some time you end up having a file named /picobsd.flp, which you can
write on a floppy. That's all!
I'll be glad hearing from you about your experiences with PicoBSD. Thanks.
Have fun!
Andrzej Bialecki <abial@nask.pl>
PS. Contrary to the previous version of PicoBSD (which contained ssh), this
version is fully under BSD license.
[-- Attachment #3 --]
1998.01.22, Warsaw, Poland
How to build your own version
of PicoBSD?
0. Get the file pbsd-s02.tgz. It contains the scripts you'll need. Also,
I assume you run quite -current system with full sources installed.
Unpack the archive in some place with at least 5MB free space.
1. Edit the file scripts/PICOBSD to suit your needs. You'll probably find
there are some drivers there you don't need, and the ones you need are
missing. I also recommend to adjust the ISA devices parameters to
match the ones of your hardware - there's currently no way to
automatically store the changes from userconfig (next version will
do it :-).
2. Edit the basic parameters which are set at the beginning of the
'scripts/build' script, such as MFS size (can be any rational number
in kB), and the language (two are available at this time - Polish and
English). Also, I assume you will use 1.44MB floppy.
3. There are two directories which contain some sources and config
files:
ash/ a Shell - ancestor of venerable /bin/sh
mfs.tree/ contains the MFS directory structure
floppy.tree/ contains the startup floppy hierarchy
lang/ contains language-dependent files
scripts/ scripts which do the actual build
NOTE: the mfs.tree/etc directory is, so to speak, ephemeric. It
contains enough config files to suck in the real /etc contents from
the floppy (floppy.tree/etc) right after bootup. This setup is a
little weird, but it allows you to edit the configuration without
rebuilding the whole floppy (because you can't change the MFS
permanently, can you? :-))
Also, there are no /etc/passwd nor /etc/*pwd.db files on the floppy -
they are reconstructed from /etc/master.passwd on each startup (and
then put on MFS with the rest of /etc).
NOTE2: thanks to the above, the floppy is needed only during startup,
and then only if you want to synchronize (possiblly changed) MFS /etc
with the one on the floppy. It means that you can pull off the floppy
from the drive as soon as login: prompt appears. In other words, it is
almost equal to read-only floppy.
4. Edit the set of installed programs.
* There are two subdirectories, crunch1 and crunch2.
Why two? Because if we made one BIG crunch, it would take
a lot more memory when executing. This is a tradeoff between
reduced RAM consumption and increased size of two crunch
archives. If you're sure you have a lot of RAM (like 32MB),
you can glue them together and thus save ca. 200kB off of
the target floppy.
* There is some (non-conclusive to be sure) rule to estimate the
RAM requirements: the kernel itself takes ca. 4.1MB and the MFS
takes its own size (1.44MB by default) of wired down
(non-pageable) memory. Then, every program started
will initially take as much as the size of gzip'ped crunch
archive (e.g. 400kB) PLUS size of gunzip'ped archive (e.g.
800kB). That's why I split the crunch in two! After initial
unpacking is done these pages are freed, leaving only the real
size of executing process.
* There are some patches included in these directories, which
are applied during build process to some of the Makefiles in
your /usr/src. These patches attempt to decrease the size of
some programs by cutting off rarely/unlikely used parts. The
patches are reversed when you do a 'make clean' (or
scripts/clean for that matter).
* In order to have a functioning system you MUST install at
least /stand/init, or /stand/oinit, or /stand/sysinstall. Of
course these can be your own programs... But if you install
the stock /sbin/init, you also have to install some others,
like sh, getty, login etc...
5. Make sure that the system you're running has /dev/[r]vn0* entries in
/dev directory (if not, you can make them with 'MAKEDEV vn0'), AND
that your running kernel has built-in vnode driver (there should be a
line in your kernel config file stating 'pseudo-device vn').
6. You'll need at least 9MB of free disk space, and free /mnt directory.
7. cd scripts/ and fire off the './build' script. If all is well, after
some time (like 10-30m) you end up with a 'picobsd.flp' file in this
directory.
8. Transfer this file to the floppy:
dd if=picobsd.flp of=/dev/rfd0
That's all. You're welcome to change and improve these scripts. If you stumble
upon something which looks like a good idea to have it here, let me know.
If, for some reason, the scripts don't work for you at all, also let me know.
Andrzej Bialecki
<abial@nask.pl>
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?Pine.NEB.3.95.980123112314.24258A-300000>
