Download a fresh Bering distro and boot it from a floppy drive.
Remove the uncessary packages from the floppy and the unecessary modules
in /lib/modules
since you will need some room (about
30k) to store the new elements brought by the pxe.lrp package.
Take a new formatted floppy. Download on it the modules needed for your PXE NIC (if they are not present on the standard Bering distro) and the pxe.lrp package. Mount that floppy on your Bering machine and install manually the pxe.lrp package:
mount -t msdos /dev/fd0 /mnt lrpkg i /mnt/pxe
Move to /boot/lib/modules
the network cards
modules for your PXE enabled NIC then umount the floppy. In the openbrick
box used for this example this is a Realtek 8139C :
mv /lib/modules/mii.o /boot/lib/modules mv /mnt/8139too.o /boot/lib/modules umount /mnt
Through the configuration package menu, choose initrd and the following menu will appear:
initrd configuration files 1) Readme first 2) Modules to load before any other package 3) PXE configuration file 4) INITRD_SIZE (expert: to save backup root.lrp) q) quit ---------------------------------------------------------------------------- Selection:
Choose entry 2 and declare the name of the modules that need to be loaded at the very early stage of the process. In our example we have:
mii 8139too
Then choose entry 3 and enter the relevant PXE informations. The most important one are the address of the tftp server and the interface through which the tftp client will query the server. In my example the tftp server is at address 192.168.1.7 and I have:
# Declare address of the tftpserver # TFTPSERVER=192.168.1.7:/tftpboot # # Declare interface that will be used by tftp client # INTERFACE=eth0 ADDRESS=192.168.1.254 MASKLEN=24 BROADCAST=192.168.1.255
Finally, configure your Bering floppy as you would do it for a
normal Bering floppy installation (keyboard, interfaces, modules and the
like). In the modules.lrp package only declare the modules that are not
already loaded in /boot/etc/modules
.
Since your internal network interface is now eth0 (Bering default is eth1) you have to modify the following files:
The modules declaration file in the modules.lrp package to declare extra modules needed by your distro. In my example I have, to enable the USB to etherner converter:
usbcore rtl8150
pump configuration file (if you get a dynamic IP from your ISP):
retries 3 script "/etc/pump.shorewall" device eth1 { nodns }
The interfaces file, through the Network configuration menu:
auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 192.168.1.254 masklen 24 broadcast 192.168.1.255 auto eth1 iface eth1 inet dhcp
Shorewall Interfaces file [3) Iface]:
#ZONE INTERFACE BROADCAST OPTIONS net eth1 detect dhcp,routefilter,norfc1918 loc eth0 detect #LAST LINE -- ADD YOUR ENTRIES BEFORE THIS ONE -- DO NOT REMOVE
Shorewall MASQ server configuration file [8) Masq]:
#INTERFACE SUBNET ADDRESS eth1 eth0 #LAST LINE -- ADD YOUR ENTRIES ABOVE THIS LINE -- DO NOT REMOVE
Shorewall rules file (in order to be able to backup your packages on the tftp server) [6) Rules]:
ACCEPT fw loc:192.168.1.7 udp 69 ACCEPT loc:192.168.1.7 fw udp 1024:
Finally backup, IN THIS ORDER, root.lrp then initrd.lrp then all the packages that you have modified.
You will notice that root.lrp becomes smaller. The reason is that
because /lib/libresolv.so.2
, /lib/libresolv-2.7.so
and /sbin/ip
are being moved from root.lrp to
initrd.lrp (we need them to establish the ip link in order to be able to
read the lrp packages from the tftp server).
On the contrary, initrd.lrp will be somewhat bigger due to the fact
it now includes the previous files but also the /usr/bin/tftp
binary brought by the pxe.lrp package.
Check a last time the PXE boot parameters since the floppy you are going to save will, from now on, only be bootable through PXE.
The first step is completed: you now have a floppy that contains all the packages that you will next download on your tftp server.