IPCOP install on headless device with serial console (ALIX 2D13)

In the voyage of choosing OS to run on this device, I realized I need a easy way to install OS’es onto the CF card. Now, this system does not have any display output other than serial; Any boot loader (in my case GRUB) needs to be aware of that.

The easiest way to try different OS’es is to have the installation media network mounted, and just PXE boot the device, choosing OS in pxelinux.cfg (if trying linux OS’es that is). I set it up as follows (since I have a ubuntu machine anyway), but a similar approach will work for other distribution/OS’es. You will need to install a tftp server, dhcp server and a http server. Your “server” which will serve these three services need to have a static IP and other dhcp servers need to be turned off on that network.

 

1) Make sure your ALIX is ready with the CF card inserted, and network cable connected to your first/rightmost interface (closest to the power input)
2) Setup and start a tftp server on the machine you will be using as a server. On ubuntu, the easiest way would be using

apt-get install <package>

I chose “tftp-hpa”
3) Setup and start a http server on the machine you will be using as a server. You might already have one running, so check before. I already had lighttpd running.
4) Setup and start a dhcp server on your network. Either on you server or if you have a dhcp server, make sure it can swallow options for PXE clients. I used the ISC dhcp server on the same host as above. Package: isc-dhcp-server
5) Download ipcop-<version>-install-netboot.i486.tgz and ipcop-<version>-install-cd.i486.iso to your server host.
6) Untar the first (netboot install file) to the tftp root, then copy the “ipcop-pxe-serial-<version>.model” file to “default” in the same directory, then copy the “pxelinux.0″ file in “<tft-root>/ipcop/<version>/i486/pxelinux.0″ to your tftp root
7) Make ipcop iso available via your http server either by copying the contents of the iso to a directory in the http root, or mount it to a directory in your http root. I symlinked my mount to ipcop_iso in the root.
8) Configure your dhcp server to have your tftp servers ip as “next-server” and make sure to pass the pxelinux.0 file in the config for pxe as well. I added these lines to dhcpd.conf:

next-server <my.servers.ip.address>;
host alix {
hardware ethernet <mac address of the alix>;
filename “pxelinux.0″;
}

9) Connect the ALIX using serial to a machine with a serial port (maybe your server above), and fire up your choice of serial terminal. I used minicom, and since I don’t have a serial port but a USB to SERIAL converter, the device was specified as the device created when the converter was inserted:

minicom –device /dev/ttyUSB0 –baudrate 38400 –8bit –statline”

10) Connect power to your ALIX board. You should see output on your serial terminal immediately. Something like this:

PC Engines ALIX.2 v0.99h
640 KB Base Memory
261120 KB Extended Memory.

Press “S” to enter bios configuration, “E” to enable PXE boot and “Q” to quit, choosing “Y” on the “Do you want to save” prompt.

Your ALIX board should now PXE boot. Follow the install instructions. You will get prompted what media you want to use to install. Choose HTTP and enter the server where you put your ipcop iso, together with the full http path. If your ALIX board did not PXE boot, search the logs and check your DHCP/tftp setup. These are the only ones used during PXE boot.

Now, I had issues with ipcop not wanting to boot after the install. I got Boot error straight after the POST sequence. I am running a 8GB CF card, and though that might be an issue (since IPCOP docs state it supports cards up to 4GB), but after mocking around a bit, I decided to re-install – and that solved it (ugh..). I am guessing something failed during the first installs MBR write to the CF card. I can’t really re-wind now and check the MBR out.. Should have done that in the first place.. I did however get a tip (on the ipcops.com forum) to update to the latest ALIX bios (which I already had on the board). tinyBIOS 0.99h.

Leave a comment

Your comment