This was tested on NetBSD 3.99.16, however the instructions should apply to other versions as well. I have attempted to flag steps where you may run into version incompatabilities with “Version Note”.
To PXEboot install NetBSD we will first need to configure a tftp server. You will need to insure that tftp is uncommented from inetd.conf and that inetd is enabled to run.
/etc/inetd.conf
tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /tftpboot
/etc/rc.conf
inetd=YES
Then we will need to create the /tftpboot directory and populate it. You will need the pxeboot_ia32.bin file (included in base.tgz) and the netbsd-INSTALL kernel.
Note: The installboot command is only necessary if you’re booting via a serial console (i.e. a Soekris box) as is the case in this paper.
Version Note: In the event you will need serial console support older versions of installboot may not support writing to pxeboot_ia32.bin, you will need to extract or build pxeboot_ia32_com0.bin.
# cd /root # mkdir -p /tftpboot # gunzip netbsd-INSTALL.gz # cp netbsd-INSTALL /tftpboot # tar -zf base.tgz -x ./usr/mdec/pxeboot_ia32.bin # cd usr/mdec # installboot -e -o console=com0,speed=19200 pxeboot_ia32.bin # cp pxeboot_ia32.bin /tftpboot
Next you will need to configure dhcpd, and ensure it is enabled to run. You must configure dhcpd to serve pxeboot_ia32.bin.
Note: The next-server option is critical, it should refer to the tftp server IP address.
Note 2: The filename is given relative to the root-path.
/etc/dhcpd.conf
default-lease-time 3600;
max-lease-time 7200;
option subnet-mask 255.255.255.0;
option domain-name "domain.local";
ddns-update-style ad-hoc;
option domain-name-servers 10.0.10.100;
subnet 10.0.10.0 netmask 255.255.255.0 {
option routers 10.0.10.1;
range 10.0.10.150 10.0.10.200;
next-server 10.0.10.5;
option root-path "/tftpboot";
filename "/pxeboot_ia32.bin";
}
/etc/rc.conf
dhcpd=YES
Make sure dhcpd and inetd are running, and then boot the host you wish to install.
# /etc/rc.d/inetd restart # /etc/rc.d/dhcpd restart
If you are attempting to install onto a Soekris box, you must tell it to PXEboot
> boot F0
You will see the PXEboot sequence, which will launch the NetBSD bootloader, you need to interrupt the NetBSD bootloader (hit spacebar several times). Once you are at the NetBSD bootloader prompt, enter the following:
> boot tftp:netbsd-INSTALL
After this point, you will be booted into the NetBSD installation process you are used to.

Thanks for posting this!
When doing the pxeboot, i see the following error message
illegal tftpd error 17
from pxeboot_ia32.bin taken from NetBSD 5.0.2 (the tftp server is a 5.0.2 i386 machine). Am I the only one to see this?
Thanks, Karin
nevermind I fixed it! for some reason, the “option routers” command specified in this HOWTO for dhcpd did not work for me. i don’t know how it got confused, but the tftpd server thought that the machine running PXE WAS my gateway.. tftpd was somehow sending the netbsd kernel information to my router. I temporarily removed this line, and everything worked perfectly after that..
Hey man, this is really awesome information. I have everything setup exactly as you described, but when I type boot tftp:netbsd-INSTALL it the PXE boot screen gives me this error:
open tftp:netbsd-INSTALL: Unknown error: code 60
I will say that I searched high and low for the NetBSD-INSTALL.gz file all on their ftp site and could not find it. I used the NetBSD-INSTALL_FLOPPY.gz which I assume should at least start the installation so I could do an FTP install from there.
Any insight you may be able to provide would be MUCH appreciated. Thanks a lot.
Thanks for this posting. The router we have would not pass a NFS server to the pxeboot but with this interrupt method I was able to get it working.
Remember to interrupt the boot, and manually “boot tftp:netbsd-INSTALL” even if u made a pxeboot_ia32_com0.bin, otherwise it will think there is NSF server…
Was good to find this ! ———- but after trying I found out, that a _released_ NetBSD 3.1 does not recognized the network chips on a net5501(Soekris).
If you had mentioned that NetBSD 3.99xxx is from “current” I would have been warned.
Anyway, thanks for writing this.