Nethence Newdoc Olddoc Lab Your IP BBDock  

Warning: those guides are mostly obsolete, please have a look at the new documentation.


NetBSD PXE install server
We are going to use both, SYSLINUX's PXELINUX, and NetBSD's pxeboot.
Note. there's a 'pxe' package available for NetBSD but it has nothing to do with pxelinux nor netbsd's own pxeboot provided binary.
dhcp configuration
cd /etc/
cp -i /usr/share/examples/dhcp/dhcpd.conf .
cp dhcpd.conf dhcpd.conf.dist
chmod u+w dhcpd.conf
vi dhcpd.conf
subnet netmask {
# This section allows dhcpd to respond with different answers
# for the different tftp requests for the bootloader and kernel.
if substring (option vendor-class-identifier, 0, 20)
= "PXEClient:Arch:00000" {
filename "pxelinux.0";
#filename "pxeboot_ia32.bin";
} elsif substring (option vendor-class-identifier, 0, 17)
= "NetBSD:i386:libsa" {
if filename = "boot.cfg" {
filename "tftp:boot.cfg";
} else if filename = "netbsd" {
filename "tftp:netbsd70x64/binary/kernel/netbsd-INSTALL.gz";
dhcpd -t -cf /etc/dhcpd.conf
vi rc.conf
dhcpd=YES dhcpd_flags="-q"
/etc/rc.d/dhcpd restart
tftp configuration and NetBSD repository
cd /etc/
cp inetd.conf inetd.conf.dist
vi inetd.conf
tftp dgram udp wait root /usr/libexec/tftpd tftpd -l -s /tftpboot
tftp dgram udp6 wait root /usr/libexec/tftpd tftpd -l -s /tftpboot
/etc/rc.d/inetd restart
mkdir -p /tftpboot/
cd /tftpboot/
mkdir NetBSD-7.0/
echo $PKG_PATH
pkg_add rsync
rsync -avz rsync:// NetBSD-7.0/amd64/
pxelinux configuration
Fetch the latest syslinux tarball and deploy the needed parts of it,
cd /tftpboot/
wget --no-check-certificate
tar xzf syslinux-6.03.tar.gz
find syslinux-6.03 | grep pxelinux\.0$
cp syslinux-6.03/bios/core/pxelinux.0 .
cp syslinux-6.03/bios/com32/elflink/ldlinux/ldlinux.c32 .
cp syslinux-6.03/bios/com32/libutil/libutil.c32 .
cp syslinux-6.03/bios/com32/menu/menu.c32 .
netbsd pxe configuration
cp -vp /usr/mdec/pxeboot_ia32.bin /tftpboot/
installboot -v -e -o bootconf,modules /tftpboot/pxeboot_ia32.bin
vi /tftpboot/boot.cfg
banner=Welcome to the NetBSD PXE Installer
banner=ACPI (Advanced Configuration and Power Interface) should work on all modern
banner=and legacy hardware. However if you do encounter a problem while booting,
banner=try disabling it and report a bug at
menu=Drop to boot prompt:prompt
menu=Install NetBSD/amd64 7.0:boot tftp:netbsd70x64/binary/kernel/netbsd-INSTALL.gz
menu=Install NetBSD/amd64 5.2:boot tftp:netbsd52x64/binary/kernel/netbsd-INSTALL.gz
menu=Install NetBSD/i386 5.2:boot tftp:netbsd52x32/binary/kernel/netbsd-INSTALL_FLOPPY.gz
also worth interesting (older releases),
menu=VESA:rndseed /var/db/entropy-file;vesa 1024x768;boot netbsd
You are ready to go, you should be able to PXE boot from now on. But you will also need either an FTP, HTTP or NFS service to fetch the binary sets.
Setting up the HTTP service
echo $PKG_PATH
pkg_add thttpd
cd /etc/rc.d/
cp -i /usr/pkg/share/examples/rc.d/thttpd .
cd /etc/
vi rc.conf
cd /etc/
ln -s ../usr/pkg/etc/thttpd.conf
cp thttpd.conf thttpd.conf.dist
vi thttpd.conf
/etc/rc.d/thttpd restart
check in a browser,

(obsolete, see the new doc)