hubertf's NetBSD Blog
Send interesting links to hubert at feyrer dot de!
 
[20050517] Playing with PXE - netbooting NetBSD
I always wanted to play a bit with PXE, and I finally borrowed my SO's laptop to do so. I found setting up a PC to netboot NetBSD via PXE pretty trivial with the instructions available. It's really just:

  1. setup tftp, dhcpd and nfs servers
  2. have proper DHCP setup, i.e. include something like this in dhcpd.conf:
     	host pxehost {
     	  hardware ethernet 01:23:45:67:89:ab;    # MAC address of PXE host 
     	  fixed-address 192.168.17.42;            # IP address of PXE host
     	
     	  # stage 1:
     	  filename "pxeboot_ia32.bin";            # relative to /tftpboot
     	
     	  # stage 2:
     	  next-server 192.168.42.1;               # IP of NFS server
     	  option root-path "/nfsroot";            # path on NFS server
     	}

  3. copy pxeboot binary from /usr/mdec to /tftpboot (for boot stage 1)
  4. setup and export root filesystem via NFS (/nfsroot, for stage 2)
  5. tell PC to use PXE
The PC will then issue a DHCP request from which it knows which pxeboot binary to load (via tftp, stage 1), and that binary will then go and load a NetBSD kernel from NFS (stage 2). The NetBSD kernel in turn mounts the root filesystem via NFS, too, and starts /etc/rc as usual.

[Tags: , , ]


Disclaimer: All opinion expressed here is purely my own. No responsibility is taken for anything.

Access count: 36037191
Copyright (c) Hubert Feyrer