How to get WRP going
This will quickly get you running a wireless gateway on your local ethernet
network (assuming you have a cablemodem, DSL, etc.)
- Prepare the hardware: 386 / 16M ram or better, floppy drive, ethernet
card, and pcmcia. Turn off any unnecessary peripherals (parallel ports,
sound cards, serial ports, IDE chains, etc.) in the BIOS.
- Download the WRP floppy image.
Alternatively, if you're using a machine with wireless and a PCMCIA ethernet
card, you could just grab the pcmcia
image and skip all of the business about downloading additional
packages. It has a dhcp client on the external interface, and offers dhcp
services on the wireless out of the box. If you're using a laptop as a
gateway, and have an ethernet 'net connection, this is the image for you!
- Also grab rawrite if
you're using DOS/Win*
- Figure out which ethernet card you're using, and download the appropriate driver. If you're
using a common ethernet card (NE2000, 3c509 / 59x, NetGear, or Intel
EtherExpress Pro/100) and are just plain lazy, get the basic netmods package. If
you're using a PCMCIA wired ethernet card, you'll need the PCMCIA ethernet package.
- Get a copy of the PCMCIA core
package and the wireless lan
drivers
- Download whatever other packages you might want to use (I highly
recommend dhcpd and pump at a minimum).
- Now that you have the software, write the image to a freshly formatted
floppy. Either "dd if=wrp.img of=/dev/fd0 bs=1k" (in unix) or use rawrite
(in DOS/Win*). When the process finishes, you will have a dos floppy that
you can open and change at will (either "mount -t msdos /dev/fd0 /mnt" or
double-click the "A:" drive to open it.)
- Copy all of the packages you downloaded above to the "\packages"
directory on the floppy.
- Edit "wrp.cfg" on the floppy with your favourite text editor.
- Save, exit, and reboot. Congratulations! You now have a wireless
gateway!
WRP Packages
A wrp package is a collection of files and directories that have been compressed
with the Unix tar program. This means that they can be created and modified
with standard Unix tools.
Modify an Existing Package
Overview
- Uncompress the package file in a unique work area.
- Make changes to the uncompressed files.
- Recreate the package file
- Copy back onto the boot disk image
Detailed Example-under Linux
Note: I know that there are better ways to do this, and especially better
ways to use tar/gzip, but I am clueless. Sorry.
Say you want to modify the pc-core package...
- Make a work space for this package (assume you are in /home/wireless)
It is a good idea to have separate directories for each package, in
order to minimize the 'precedence problem' (see below).
mkdir pc-core
- Copy the package file to your work area and uncompress.
cp [somewhere]/pc-core.tgz /home/wireless/pc-core/pc-core.tgz
tar -xvzf pc-core.tgz
- Make your changes to the uncompressed files. After uncompressing you will
have a directory tree with etc, lib, sbin, and var. You may safely modify, create,
or remove files and directories in this tree. Where 'safely' means that only this
copy of the package file will be modified.
- Recreate the Package file.
tar --exclude pc-core.tgz -czvf pc-core.tgz *
If you did not create or remove files you can just do an update:
gunzip pc-core.tgz
tar -uf pc-core.tar
gzip pc-core.tar
mv pc-core.tar.gz pc-core.tgz
hmmm...that sure didn't seem easier, did it?
- Copy the package file back onto the boot disk image. Here is the simplest case:
mount /dev/fd0 /mnt/floppy
cp pc-core.tgz /mnt/floppy/packages/pc-core.tgz
umount /mnt/floppy
The Precedence Problem
Because packages are collections of files, it is possible for two packages to
have copies of the same files. What happens when these files contain
different instructions? Short answer: one and only one of the versions will
become the live version. As a consequence, the best policy is for each file
to be contained in only one package. Note: directories are different. Two
packages can (and almost certainly will) contain the lib directory, and the
final contents of lib will be the set of all files from all packages that
have lib/files.
Assuming you wish to disregard this no duplicate files advice, the order of
package loading is set in the file /etc/rc.init which exists in the rewt.tgz
package. This is based on variables set in the /wrp.cfg file on the floppy
image.
First, the files in rewt.tgz are loaded, followed by any files in the
/etc directory on the floppy are copied to /etc on
the wrp machine, then each file in the /packages directory on the floppy
is copied in alphabetical order, followed (optionally) by each file in the
/packages directory of the cd rom.
Back to NoCat.Net