Booting FreeDOS via PXE

      2 Comments on Booting FreeDOS via PXE

Wanted to flash a BIOS lately and noticed that all major mainboard manufactors still use DOS flash utilities? I did. Unfortunately my mainboard isn’t supported by flashrom yet and a floppy drive wasn’t available. So, why not use FreeDOS?

1. Installing packages

Well, this one is rather easy. Just pull the packages from your yum-repo:

yum install xinetd tftp-server syslinux

2. Configuring xinetd

Enabling xinetd (and tftp) is no big deal:

chkconfig xinetd on
chkconfig tftp on

You may want to find out (or adjust) the tftp root path. Simply edit /etc/xinetd.d/tftp with your favourite editor and change the line that says server_args = -s /tftpboot. Make sure, the service is restarted after you changed something in the configuration file.

3. Setting up boot environment

First, you have to copy the pxelinux kernel and memdisk to your tftp directory. Assuming that your tftp root is /tftpboot (note that Fedora changed this default path in Fedora 9):

cp /usr/lib/syslinux/pxelinux.0 /tftpboot/
cp /usr/lib/syslinux/memdisk /tftpboot/

Second, we create the pxelinux.cfg directory and a default configuration file

mkdir -p /tftpboot/pxelinux.cfg/
touch /tftpboot/pxelinux.cfg/default
cat >> /tftpboot/pxelinux.cfg/default <<EOF
default dos
label dos
  kernel memdisk
  append initrd=fdboot.img
EOF

And finally, we download the raw image of a minimal FreeDOS boot floppy (fdboot.img) from http://www.freedos.org/freedos/files/

wget http://www.ibiblio.org/pub/micro/pc-stuff/freedos/files/distributions/1.0/fdboot.img -O /tftpboot/fdboot.img

4. Manipulating the image

Now we can boot into FreeDOS. But how do we flash the motherboard BIOS? Simply include the BIOS ROM file and the flash utility from your mainboard manufactor into the FreeDOS boot image:

mount -t vfat -o loop fdboot.img /mnt/floppy

Copy every file you need for flashing your BIOS (or doing other bullshit) to /mnt/floppy. Don’t forget to unmount the image before you boot via PXE.

Resources:
http://www.terryburton.co.uk/blog/2007/08/pxe-boot-freedos-with-memdisk-to-flash.html

2 thoughts on “Booting FreeDOS via PXE

  1. Pingback: /dev/blog » Setting up a tftp boot environment for Fedora

  2. Pingback: Updating BIOS firmware via iPXE – /dev/blog

Leave a Reply

Your email address will not be published.