Installation and Operation of a Fli4l-Router on an ALIX-System
Introduction and installation
- less energy consuming
- and silent.
First of all, what is an ALIX? An ALIX is an embedded PC with an AMD Geode CPU. In my case, it is an ALIX
2D3, which I bought as a bundle with a case, a power supply and a CompactFlash card (see photo).
What makes the ALIX different from a PC and complicates the installation a bit is that it does not have
a floppy drive and a video output, and that it is supposed to run without keyboard. Meanwhile, it has a
serial port that may be used for a serial console.
What is additionally needed for the fli4l Installation is a PC with a card reader and a serial cable (null modem cable).
I assume that someone who considers installing fli4l on an ALIX is not totally new to fli4l, so I
will not cover fli4l basics here.
The fli4l package preparation is quite normal. If the fli4l is supposed to run as a DSL router, the following packages are required or recommended for a basic system: base, kernel_2_6_xx, chrony, dsl, hd, sshd, OPT_EMBEDDED.
In the package configurations, the following settings should be used:
- BOOT_TYPE='hd' (the CF card is regarded as a hard disk)
- KERNEL_BOOT_OPTION='nokbd reboot=bios' (no keyboard, reboot by BIOS)
- SER_CONSOLE='yes' (activation of serial console)
- the network interfaces need the 'via-rhine' driver
- HDDRV_2='ide-hd' (the CF card is regarded as an IDE hard disk)
- EMBEDDED_DAEMON='yes' (activates the use of LEDs an the button)
- if not all LEDs are used, EMBEDDED_LED_N can be set to a value < 3. It is not possible to assign the same value to two LEDs.
If the package usb is to be used as addtitional package (e.g. for a USB printer), the driver setting to be chosen in usb.txt is USB_LOWLEVEL='ohci ehci'.
Now that the packages are configured, the whole stuff has to be packaged with mkfli4l and put on the CF card,
which of course should be in the card reader now. The Windows version mkfli4l.bat contains a GUI which
includes the option "Direct HD-Install". This makes the CF card preparation quite easy under Windows.
The Linux version mkfli4l.sh unfortunately does not offer this. So what to do here? First, the files that were created by mkfli4l.sh can be copied to the CF card. Additionally, a file with information on the "hard disk" partitions is required, the file hd.cfg. This can be created manually, and assuming that the CF is not split to multiple partitions, the content is just the following line:
What is still missing now is the bootability of the CF card. To create this, the card first has to be unmounted. Then, syslinux can be used to make the card bootable. Assuming that the card in the card reader is labeled /dev/sda1 on the PC, the command
makes it bootable.
The fli4l installation on the CF card is now complete. Now, the ALIX should be made operational. For this purpose, it needs to be connected to the PC with the serial cable, and a serial console, e.g. minicom, should be opened on the PC with the baudrate and communication settings set to 38400 8 N 1. After this, the ALIX power supply can be plugged in. During the ALIX's memory test, the BIOS can be accessed by the key s. This should be done in order to modify some settings:
- The hard disk mode should be set to LBA.
- The MFGPT workaround needs to be deactivated if it is active.
When these settings are done and the CF card is plugged in the ALIX, the ALIX can be booted. Now, it should be able to fulfill all duties of a fli4l router. Done!
As the ALIX is already operational in my home network for some time, I would like to write about a few experiences here.
First of all, the operation setup:
The ALIX currently runs fli4l version 3.6.1. Apart from the "normal" tasks of a fli4l (DSL-Router, DHCP-Server), my printer is also connected to the ALIX via USB. The router is usually off at night or when I am not at home. This means it is usually booted and shutdown once or twice a day.
Usually, the ALIX runs without problems. The only issues worth to mention are:
- After a bit more than a year, the first CF card, which was provided together with the board, failed. As CF cards can only operate for a limited amount of write cycles, it is not surprising that the card fails after some time, if syslog is writing to it regularly. Still, I think the failure came rather early. The next CF card, which I bought as a replacement, is meanwhile already in operation for a longer time than the first, but yet without any problems.
- Very sporadic crashes (less than once a month). Usually the ALIX is not crashed completely, but is still reachable via SSH, and the imond is also still running. However, it refuses to react to halt and reboot commands and does not connect to the Internet. In this case, a hard reboot (unplugging/replugging the power cable) is the only option. As these crashes did not occur any more after replacing the CF card, I suspect the first card to have been the cause of the crashes.
Legacy fli4l versions
When I put the ALIX into operation for the first time, 3.2.2 was the latest stable version. Compared to the current version, I was using a few different settings:
- in hd.txt:
- in usb.txt: USB_LOWLEVEL='ohci'
- in the BIOS: MFGPT workaround active