PXE booting for BIOS updates

From FnordWiki
Jump to navigation Jump to search

So you're all about the free software. But you've just obtained a new (or old) machine. And its firmware is out of date and in need of updates. It doesn't have a floppy drive, just a CD or DVD drive and USB hard drive support. There aren't any copies of DOS or Windows in the house that might be used to for a firmware update. Ah, but it will netboot!

set up DHCP to point net-booting machines at a TFTP server

Here's an /etc/dhcp/dhcpd.conf stanza for the to-be-updated machine:

host yesdear {
        hardware ethernet 00:1a:a0:25:fc:f3;
        fixed-address 172.16.0.150;
        option host-name "yesdear";
        next-server 172.16.0.1;
        filename "pxelinux.0";
}

The "next-server" keyword tells the client machine which TFTP server to contact. And the "filename" keyword tells it which file to download from that TFTP server.

install a TFTP server

TFTP is the "trivial file transfer protocol" defined in RFC 1350 (and others). It's a UDP based mechanism often used to get boot images over a network.

I'm running the "atftpd" TFTP server. It's home on the web seems to be ftp://ftp.mamalinux.com/pub/atftp/

Running Debian, atftpd is installed with the command apt-get install atftpd. The package maintainer scripts will add an entry to /etc/inetd.conf and will create a directory called /var/lib/tftpboot

install pxelinux and create a config file

default config file

PXElinux's memdisk driver

create a floppy image to netboot

Get FreeDOS bits

mtools to format

  • update /etc/mtools.conf:
    • specify a file instead of a floppy special device
    • specify 12-bit FAT
  • use FreeDOS boot sector

copy FreeDOS programs into floppy image

copy BIOS updater into floppy image

boot client machine