Network booting under FreeBSD/powerpc
First, set up a complete distribution to be booted over the network in some local directory. This is can be done with the following commands :
#cd /where/are/the/sources #make buildworld buildkernel WITHOUT_BOOT=1 #cp /usr/obj/<arch>/.../sys/boot/loader/<arch>/.../loader /tftpdir/loader.foo
Where <arch> is the platform you are building for. Note that you may cross-compile for another platerform by specifying TARGET_ARCH=<arch> when building and installing. You need to copy the boot loarder and place it in some TFTP directory.
#make installworld installkernel DESTDIR=/some/nfs/export WITHOUT_BOOT=1
Having it under /usr/netboot/ can be a good choice.
You then have to set up a DHCP server. This can be done by installing the net/isc-dhcp41-server port. Here is the section of dhcpd.conf which is about network boot.
subnet 10.0.1.0 netmask 255.255.255.0 {
range 10.0.1.10 10.0.1.100;
range dynamic-bootp 10.0.1.101 10.0.1.110;
option routers 10.0.1.1;
filename "loader.foo";
option root-path "/some/nfs/export";
next-server 10.0.1.1;
}
The next-server option designates your netboot server. The filename option is the name of the boot loader, which should be in some tftp directory. The root-path option determines where the system to be booted over the network is.
Set up TFTP, in order to be able to get the boot loader (loader.foo in the examples). Uncomment the appropriate lines in /etc/inetd.conf and turn inetd on. The loader is the one you copied after make buildwolrd and its filename has to be in dhcpd.conf, as described in the above paragraph. (It appears that in some cases where it will not work, you may need to have TFTP over TCP).
Set up NFS and export the directory you specified as DESTDIR when installing the system intended to be booted over the network (here /some/nfs/export). It is the same directory as in the root-path option in dhcpcd.conf, in the example given. Be sure to export it as read-only in a first place or you might have nasty results. You may later customize the setup by following the instructions given in the man page diskless(8).
We here assume the client and the server are directly connected. Finally, when everything is done on the server side, enter the Open Firmware prompt by holding down the Command-Option-O-F keys when you turn on the computer and issue the following command :
>boot enet:0,loader.foo
This will load loader.foo from the server. Everything should then be downloaded via NFS.
