Before you begin
Do yourself a favor, and get a BiosSavior before you begin. We bought ours from http://www.paragonca.com. There are different models, make sure you order the one you need. It depends on the size and type of the ROM chip on your board. Our S2881 board has a 4Mbit PLCC chip:
While LinuxBIOS replaces the functions of the proprietary bios, it does NOT replace the VGA bios. If you want vga on your linuxBIOS'd machine (not strictly necessary for servers), you will need to extract the VGA bios and concatenate it with the LinuxBIOS image, before burning it to your ROM. See below for details.
LinuxBIOS requires a Payload to boot an operating system.
If you want to boot from the network or from a SATA drive, you will need to use Etherboot. If you want to boot from an IDE drive, you can use FILO. The rest of this document assumes you want to boot from SATA.
Building the payload
Since the S2881 comes with a SATA controller, we need to build Etherboot.
1. Download the latest version from http://www.etherboot.org. At the time of writing, that is Etherboot 5.4.1.
2. Configure it as explained here: http://www.linuxbios.org/index.php/Etherboot
3. Version 5.4.1 adds PXE support. which is not compatible with the LinuxBIOS/FILO code included in Etherboot. You will need to disable it by removing this line from src/Config:
CFLAGS+= -DPXE_IMAGE -DPXE_EXPORT
4. Etherboot has an (optional) boot prompt that allows you the choice of a network or disk boot. We always want to book from disk, so make sure you set ASK_BOOT to -1, which disables the prompt:
5. However, currently (2006-04-23) Etherboot/FILO needs a bit of time to detect SATA drives (but only after a cold boot). It seems at least 3 extra seconds are required, so to be safe update the FILO boot prompt delay (where you can choose different boot images) to 5 seconds in src/filo/Config.lb:
AUTOBOOT_DELAY = 5
The kernel you boot
The mkelfImage program from
can be used to generate a kernel to boot with LinuxBIOS. Note that this is not required, you can also boot a normal kernel.
You can use mkelfImage to combine the kernel and initrd you want to boot into an elf image that filo can boot, for instance like this:
mkelfImage --command-line="ro root=/dev/md3 quiet splash console=tty0 console=ttyS0,115200n8" \ --kernel="/boot/vmlinuz-2.6.12-9-amd64-generic" \ --initrd="/boot/initrd.img-2.6.12-9-amd64-generic" \ --output="/boot/linuxbios.elf"
This means you will also need to update etherboot-5.4.1/src/filo/Config with the new autoboot file:
AUTOBOOT_FILE = "hde1:/linuxbios_2.6.12-9-amd64-generic.elf"
Then build etherboot
cd etherboot-5.4.1/src make bin/tg3--filo.elf
Download LinuxBIOS (http://linuxbios.org/index.php/Download_LinuxBIOS)
cd targets ./buildtarget tyan/s2881
Modify tyan/s2881/Config.lb; change payload setting to point to your tg3--filo.elf file
If want VGA support you will need to include the VGA bios in the LinuxBIOS image. See below for more info on how to do that. If you don't need VGA, you will need to modify tyan/s2881/Config.lb. Comment out the line:
option ROM_SIZE = 475136
Make you are using GCC 3.4 (not GCC 4.0), or your image will be too large, and then:
cd tyan/s2881/s2881 make
Skip this section if you don't need VGA support in your LinuxBIOS.
You can see where your vga bios starts and how much space it takes by issuing
cat /proc/iomem | grep "Video ROM"
Then get a copy of you vga bios
dd if=/dev/mem of=vgabios.bin bs=1k count=32 skip=768
Our vga bios is 32K.
Now concatenate the VGA bios with the linuxbios image
cat vgabios.bin linuxbios.rom > final_linuxbios.rom
TODO: fix; this doesn't seem to work.
Burning the bios
Make sure your Biossavior is set to RD1 (NOT to ORG), so that you can always revert to the original bios.
On the target machine:
cd LinuxBIOSv2/util/flashrom ./flashrom -v -w path/to/your/linuxbios.rom
You now need to 'halt' the machine. A soft reset won't work the first time you boot from the proprietary BIOS into LinuxBIOS.
Since we set up serial output in the LinuxBIOS configuration files above, you will want to hook up a serial console (or a copy of minicom or the like) to see what the box is doing while starting up. Keep your eyes on the screen after hitting the power button - LinuxBIOS will be up and running way before you expect it!