Memtest server
Building an pxelinux memtest server
Building the system
Find a box
This step is real simple. Find a computer that will suffice it's use... If it's going to be just to run memtest, a thin, light system will work.
- You should know this step by now, but if not it's just fine.
Set the NIC of the server you are working on to boot from the network, plug into the build intranet, when pxelinux boot, choose the install base server option. When this is finished don't forget to disable that feature. If the motherboard doesn't support this then use a boot floppy with pxeboot installed.
Install Base server
Installing the software
Our selection of software for this project is: syslinux, dhcp3-server, tftpd-hpa, and memtest86+. You can find these packages in the standard repositories with aptitude, or with:
# apt-get install dhcp3-server tftpd-hpa memtest86+ syslinux
Configuration
First the NIC
Make sure the main network interface is set up for a static IP.
bash ~ # cat /etc/network/interfaces # this file is blah blah blah information, see interfaces(5) # The loopback interface auto lo iface lo inet loopback # The primary network interface # replace ethX with your interface, see ifconfig(8) auto ethX iface ethX inet static # Set static ip like 10.0.0.10 address xxx.xxx.xxx.xxx # And the netmask like 255.255.255.0 netmask yyy.yyy.yyy.yyy
DHCP server
Now we must set up a DHCP server.
bash ~ # cat /etc/dhcp3/dhcpd.conf # see dhcpd(8) # default lease-time 600; max-lease-time 7200; log-facility local7; # This next line is needed so so pxelinux doesn't stall when # selecting the configuration to use, and should be the address # set in /etc/network/interfaces e.g. 10.0.0.10 next-server 10.0.0.10 subnet 10.0.0.0 netmask 255.255.255.0 { # range will only offer IP addresses between these numbers e.g. 10.0.0.20 - 10.0.0.30 range 10.0.0.20 10.0.0.30 option broadcast-address 10.0.0.255; # This line is need for pxelinux filename "pxelinux.0" }
TFTP
tftp-hpa is a tfpt server without an authentication mechanism, which is perfect for what we need and easy to set up. It's contents will house our memtest86.bin image that we installed earlier, as well as the pxelinux network boot utility that was installed with the syslinux package. We will take care of all the file placement in one swoop in this step!
The -p option passed to mkdir will create the path (e.g. it will make the directories tftpboot and pxelinux.cfg)
bash ~ # mkdir -p /var/lib/tftpboot/pxelinux.cfg
now check the contents of /etc/defaults/tftpd-hpa, and make sure it contains:
bash ~ # cat /etc/defaults/tftpd-hpa RUN_DAEMON="yes" OPTIONS="-l -v -s /var/lib/tftpboot"
double check inetd.conf (debian says that installing tftpd-hpa should configure this correctly, but just in case)
bash ~ # cat /etc/inetd.conf | grep tftp tfpt dgram udp wait nobody /usr/sbin/tcpd /usr/sbin/in.tftpd --tftpd-timeout 300 \ --retry-timeout 5 --maxthread 100 --verbose=5 --logfile /var/log/tftpd.log /var/lib/tftpboot
Now tftpd should be in running condition, you can start it with:
bash ~ # /etc/init.d/tftpd-hpa start
pxelinux
copy pxelinux.0 to the tftpboot root directory
bash ~ # cp /usr/lib/sysliux/pxelinux.0 /var/lib/tftboot/
now add the image we want pxelinux to boot (**do not link it**) and remove the .bin
bash ~ # cp /boot/memtest86+.bin /var/lib/tftpboot
Create the default configuration file
bash ~ # cat > /var/lib/tftpboot/pxelinux.cfg/default
then add the contents:
bash ~ # cat /var/lib/tftpboot/pxelinux.cfg/default timeout 5 propmt 1 default memtest label memtest kenel memtest86+
Testing & trouble shooting
Starting the Servers
bash ~ # /etc/init.d/dhcp3-server start bash ~ # /etc/init.d/tftpd-hpa start
Testing the server
find a thin client (diskless terminal), and a cross over cable. Connect the thin client to the server via ethernet, and boot the client.
trouble shooting
Got problems? so do I. but you should fix yours, and tells us how you did it here.
- log files
tail /var/log/messages tail /var/log/tfpd.log
k-thanks-bye