Your server - a linux host attached to your local network - needs two elements: a dhcp server and a tftp server.
As far as the dhcpd server is concerned the de facto
standard is the one provided by ISC and available in most
Linux distro. As root, you need to configure it through the
dhcpd.conf
file where you will declare your subnet,
your tftp serve and your client. Please refer to the dhcpd
and dhcpd.conf
man pages for further explanations.
In my example I have:
dynamic-bootp-lease-length 604800; max-lease-time 1209600; default-lease-time 21600; allow booting; allow bootp; option subnet-mask 255.255.255.0; option broadcast-address 192.168.1.255; subnet 192.168.1.0 netmask 255.255.255.0 { option routers 192.168.1.254; option domain-name "private-network"; option domain-name-servers 192.168.1.254; range 192.168.1.1 192.168.1.254; } host tftpserver { fixed-address 192.168.1.7; } group { next-server 192.168.1.7; host openbrick { hardware ethernet 00:E0:4C:90:03:65; fixed-address 192.168.1.254; filename "/tftpboot/pxelinux.0"; } }
In this configuration file you declare the address of the tftpserver (192.168.1.7), your Bering machine NIC hardware ID and the address that will be used by your tftp client (192.168.1.254).
Once you have modified your parameters, restart your dhcpd server (/etc/init.d/dhcp3-server
restart
).
We now move to the tftp server. I strongly recommend the tftp-hpa version of this server developped by H.Peter Anvin who also happens to be the author of pxelinux that will be used to boot the Bering linux kernel. Other servers are untested.
For security reasons, the tftp server will be installed on a non
root account. Create - for example - an accound named bering. Login to
that account and create a directory named tftpboot
(its full name is therefore /home/bering/tftpboot
).
On that directory you will then:
copy all the files of the Bering floppy you have just created:
sudo mount -t msdos /dev/fd0u1680 /floppy cd ./tftpboot cp /floppy/* . sudo umount /floppy
In the tftboot
directory copy the
pxelinux.0
file that you can get from any
syslinux package but that you can also download from here.
Finally create a pxelinux.cfg
subdirectory
in which you will copy the syslinux.cfg
file of
your Bering distro under the name default
:
cd ./tftpboot mkdir pxelinux.cfg cd pxelinux.cfg cp ../syslinux.cfg default
Now you need to activate your tftp server. To do that login as root
and insert the following entry in your /etc/inetd.conf
file:
#:BOOT: Tftp service is provided primarily for booting. Most sites # run this only on machines acting as "boot servers." tftp dgram udp wait root /usr/sbin/in.tftpd in.tftpd -c -p -r blksize -u bering -s /home/bering
Finally, restart inetd:
/etc/init.d/inetd restart
Et voila! You should now have a non root tftp server on which you
will be able to backup your LEAF packages. Optionnally you can still back
them up on a floppy if you wish. Adding a new package is as easy as adding
it in the tftpboot
directory and declaring them in
the ./pxelinux.cfg/default
file.
If you want to add a new module to your distro you can do that very easily by modifying the modules.lrp package directly on the server:
cd /home/bering/tftpboot be sure to be in tftpboot directory mkdir modules create a modules subdir cd modules move to that new subdir tar xzvf ../modules.lrp unpack the modules package. Then add to ./lib/modules what is needed tar czvf ../modules.lrp . recreate your modules.lrp package