Tonton's Floppy Linux
---------------------
Based on 2.4.26 kernel and BusyBox 1.0 final. Support for most common
LAN cards (several 3Com, Realtek 8139, Intel...) other cards supported via
modules on the second floppy (b.img). Only PCI or built-in cards!


Creating the floppy image
-------------------------
From Windows launch the rawwritewin.exe select the .img file, your floppy
(if you only have one keep the default) and Go.

From Linux. Do you really need this floppy if you have a real Linux? Maybe
as a recovery disk if you lost your password :-)
Make sure you have a blank (if not blank then data will be lost) and formatted
floppy in the drive. Make sure /dev/fd0 is unmounted first and then issue the
command: dd if=a.img of=/dev/fd0. If the floppy was not formatted then issue
the command: fdformat /dev/fd0 to format it.


Loading the net drivers from the other disk
-------------------------------------------
On Linux drivers are really kernel modules...

I completely changed the way modules are loaded. If on bootup the device eth0 is
not found then you will be asked to insert disk 2 (b.img). The tarball will be
extracted to the /lib/modules directory and you will be presented with a
list of LAN cards to choose the module from.
On successful load of the module a script is completed to load the module on
future reboots.
The loaded modules and their dependencies are then tarballed onto the first
floppy together with the loading script.

Hint: Not all LAN card descriptions are listed on the proposed list. Open the
tarball on the "b.img" floppy and check out the module names for one that
could match your LAN card if it would be missing from the list.
Beware that for many cards load options are mandatory (e.g. ne.o requires
io=0x??? to avoid overprobing and locking up). Without them loading the module
may fail even if the module is the good one. Please consult the net-modules.txt
document in this ZIP archive for more details per LAN card. The file is taken
from the kernel sources documentation.

Hint2: To load other modules than LAN drivers as well you can load these
in the same prompt too. Ignore the LAN list and enter the module name.
Example, to be able to mount NFS you will need the nfs.o module. After loading
your LAN card module say you want again (Y) and ignore the LAN list. On next
module prompt enter "nfs" and nothing for options... Tada NFS is now available.


Booting
-------
First boot will ask your keyboard preference. If your keyboard is not in the
list then take the closest match or US if you are OK to blind typing a US
keyboard.
Next it will ask for your network preference.
Both of the above are stored on the floppy for future boots. Keyboard will
copy the map file on the floppy. This is where you can replace it with your
layout, the file is a dumpkmap file. If you do not have these layouts then
copy the file /bin/busybox (after floppy boot is finished) onto a blank floppy.
Then copy it onto a working linux with your correct layout and issue the
command: ./busybox dumpkmap> keyboard.map (assuming you have copied busybox
to current dir). Then copy the resulting keyboard.map onto floppy.
To make the boot script ask again for network parameters (if you want to
change them) then erase the file named network from the floppy.
To remove the laoded modules from the floppy (to force rechoosing the LAN card)
simply remove mymodules.tgz from the floppy.


Passwords
---------
Two users exist onto the floppy they are:

user | pass
-----+-----
demo | demo
root | floppy

Demo user can su and passwd now.
Change password with passwd. To keep the new password and users create a tgz
tarball of the /etc directory named cust-etc.tgz onto the floppy root (the
boot process untars it back to /etc to overwrite the default passwd, shadow
and other conf files of your choice with your changed ones). If you do not do
this (or if you erase the tgz file from floppy) then user and pass are back as
above.
Beware a set of created users will be backed up into a cust-etc.tgz but NOT
the newly created user's home directories!
To fix the disastreous situation simply erase the cust-etc.tgz file from
floppy and you are all set to default users/pass again.


Web server
----------
The boot starts a web server (httpd) with the base dir for index.html into
/var/www (I included a demo index.html).
To stop the web server issue kill command with the process id of httpd
(issue the command "ps" to find out the correct id).
The web site is a gzipped tarball called website.tgz and includes the www
subdir in the tar. Feel free to replace with your favorite intranet image
(if you can make it fit onto the floppy :-7 )
/var is writable (see further, mounted filesystems)


Telnet
------
Telnet now fully works. The daemon starts automatically.


Virtual consoles/tty1-6
-----------------------
I finally figured out how to make the /sbin/getty work neatly. Alt+F1 up to
Alt+F6 now work without lockups and without other cross console echo glitches.
It seems like BusyBox's getty wants to have a vc/1 controling terminal to work
for tty1. vc/2 for tty2, etc... I tried the included example and even the
suggestions one can find all over the web but no luck. When I realized that
the tty command always reported /dev/vc/1 ... /dev/vc/6 then I tried to put
those as controlling terminals... And EUREKA. Check out the /etc/inittab to
see how I did it in practice.


DNSMASQ
-------
During boot you are asked if you want DNS caching with DNSMASQ. It also asks
if you want the dhcpd (also using DNSMASQ). Currently the dhcpd asks simple
basic stuff like IP range and lease time.
I plan on allowing personalized advanced config files to be added on the
floppy for more flexible dhcpd and to allow to use the full power of dnsmasq
(else I would have sticked to the BusyBox udhcpd).
Responding Yes to either (DNS or DHCP) will start DNSMASQ. If DHCP is not
requested then the script will create a blank /etc/dnsmasq.more.conf in order
to avoid error during dnsmasq startup (only if DNS cache is asked for). This
is because currently the /etc/dnsmasq.conf is static and refers to that file
which I create properly with the DHCP questions from the firstboot.


Remote management with a web browser
------------------------------------
Start a browser and go to http://your.server.ip:8080/
The user is "admin" (and not root) and the pass is admin. That part is still
under development but you should be able to change the settings that your are
prompted for during boot (except the keyboard and modules). The main page is
a set of links towards the cgi scripts. If any action you take in the network
setup results in the server changing its IP address (like switching to from
DHCP or changing the IP while not being a DHCP client) then you will have to
go manually to the new IP address with the browser to continue.


Mounted filesystems
-------------------
Boots with syslinux an initrd gzipped minix image into /dev/ram0.
Untars the website onto the /var/www dir with its files.
Searches for a cdrom and mounts it onto /mnt/cdrom (order /dev/hdd /dev/hdc
/dev/hdb /dev/hda as second IDE slave has most chance for hit then second IDE
master etc... BUT remembers only the highest ranking CD-ROM if you have more,
i.e. last one of the search order)
Mounts none on /dev/pts as a devpts filesystem (for telnetd virtual tty's).
Does not mount HDD (for safety reasons)!
At end of boot it umounts the floppy! So you can put your own blank flop to start playing around.
During mid boot, particularly the modules and LAN card choice, it umounts and
mounts /dev/fd0 according to user prompts for disk2 and back to disk1.


Iptables support
----------------
I am in the process of adding routing support to this floppy. The tool "iptables"
is already present in this distro and the kernel is ready for it. This means that
those among you who know their way into iptables can use this as a router.
As soon as I have a first draft of web based admin for routing I'll post a new copy
of this floppy to the net.


That's all folks!
-----------------
Have fun! To know the supported commands type the command busybox.
To have more parameters about a command type command with option --help.
Built-in help is very light. Googlize: man yourcommand, to find out more help.
Undocumented option of httpd is "-h" followed by homedir for index.html
(I had to check out the source to figure that one out).

More documentation
------------------
http://www.busybox.net/ Thanks to Erik Andersen and the programmer's community
for maintaining this nice set of tools.
http://thekelleys.org.uk/dnsmasq/doc.html for dnsmasq from Simon Kelley.
http://syslinux.zytor.com/ for SysLinux (bootloader) from H. Peter Anvin.

This floppy composed by Gerald Bonne (a.k.a. Tonton) http://www.tonton.be/,
mailto: linuxfloppy@tonton.be.
