[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:
- setup tftp, dhcpd and nfs servers
- 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
}
- copy pxeboot binary from /usr/mdec to /tftpboot (for boot stage 1)
- setup and export root filesystem via NFS (/nfsroot, for stage 2)
- 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: netboot, networking, pxe]
|
|