2.5. Network Installation of Pyramid on Fedora

You would rather install Pyramid Linux via PXE boot because you have several boards to install, or you have onboard Compact Flash, or you just prefer to do it this way. Your installation server runs Fedora Linux.

No problem, you can do this because the Soekris boards (and PC Engines, and all their little cousins) support netbooting. While the HTTP, TFTP, and DHCP services in this recipe can be on different machines, the examples here assume they are all on a single PC.

To get started, first download the latest Pyramid dd image or tarball from http://metrix.net/support/dist/ into the directory of your choice:

	$ wget http://metrix.net/support/dist/pyramid-1.0b2.img.gz

Then, you need these services installed:

  • DHCPD

  • TFTP

  • HTTP

  • Subversion

You don't need a big old heavyweight HTTP server like Apache. Lighttpd is great for lightweight applications like this. Install the necessary packages with this command:

	# yum install dhcp lighttpd tftp-server subversion

Copy this /etc/dhcpd.conf file exactly:

	# dhcpd.conf
	  subnet 192.168.200.0 netmask 255.255.255.0 {
	  range 192.168.200.100 192.168.200.200;

	  allow booting;
	  allow bootp;
	  next-server 192.168.200.1;
	  filename "PXE/pxelinux.0";

	  max-lease-time 60;
	  default-lease-time 60;
	}

next-server is the IP address of the boot server; it must be 192.168.200.1.

Next, configure tftp-server. All you do is change two lines in /etc/xinetd.d/tftp. Make sure they look like this:

	disable = no
	server_args = -svv /tftpboot -a 192.168.200.1:69

Change your working directory to /tftpboot, and download the PXE environment from Metrix's Subversion repository:

	root@penguina:/tftpboot # svn export http://pyramid.metrix.net/svn/PXE

This is about a 45 MB download.

Next, in your httpd root directory, /srv/www/lighttpd/, make a symlink to the Pyramid tarball or image you downloaded and name it "os":

	root@xena:/srv/www/lighttpd# ln -s /home/carla/downloads/pyramid-1.0b2.tar.gz os

Then, start all these services:

	# cd /etc/init.d/
	# xinetd start && lighttpd start && dhcpd start

Finally, connect the serial and Ethernet cables to your Soekris board, and fire up Minicom. Your CF card must be installed. It doesn't matter if a Linux distribution is already installed on it. Power up the board and enter the comBIOS. Enter boot F0:

	comBIOS Monitor. Press ? for help.
	> boot F0

You'll see it acquire a DHCP lease, a quick TFTP blink, and then you'll be in the installation menu:

	Choose from one of the following:
	1. Start the automated Pyramid Linux install process via dd image file
	2. Start the automated Pyramid Linux install process via fdisk and tarball
	3. Boot the Pyramid Linux kernel with a shell prompt
	4. Boot the Pebble Linux install process
	5. Boot the Pebble Linux kernel with a shell
	6. Install the latest snapshot

Select either 1 or 2, according to what you downloaded. Go have a nice healthy walk, and in a few minutes you'll have a fresh Pyramid installation all ready to go.

You should still have a CF writer handy in case of problems. For example, if a non-Linux operating system is already installed on it, you should manually zero out the Master Boot Record (MBR). To do this, use a CF writer to mount the card on a PC, then use dd to erase the MBR. In this example, the Flash card is /dev/hdc:

	# dd if=/dev/zero of=/dev/hdc bs=512 count=1

fdisk -L will tell you the /dev name of the card.

You can verify that xinetd is controlling Lighttpd and listening on port UDP 69 like it's supposed to with this command:

	# netstat -untap | grep xinetd
	udp    0    0 0.0.0.:69    0.0.0.0.*    4214/xinetd

See the Discussion in the previous recipe for more information on the configurations, IP addressing, and verifying that everything is working correctly.