Also, you might consider compiling a new kernel for your client. If you use the DISKLESS config file, it will produce a smaller kernel (without SCSI, HP-IB, NFS server, and a few other things), which will load more quickly, and will use less RAM. This is detailed in the How to build a kernel NetBSD Kernel FAQ item.
Another suggestion is to gzip the kernel on the nfs server, as this will load over the network faster (even with a slow client). The client will boot from this, even though it isn't named netbsd, it merely has to figure out that netbsd doesn't exist on the nfs server and try the next kernel name, which happens to be netbsd.gz. The NetBSD bootloader will attempt to load each of the following files in sequence until it loads one successfully and then executes it:
netbsd netbsd.gz netbsd.bak netbsd.bak.gz netbsd.old netbsd.old.gz onetbsd onetbsd.gz
Finishing up, NetBSD
Finishing up, OpenBSD
Finishing up, FreeBSD
Finishing up, Mac OS X and Darwin
Finishing up, Linux
Finishing up, SunOS
Finishing up, Solaris
Finishing up, NEWS-OS
Finishing up, NEXTSTEP
Finishing up, HP-UX 9
Finishing up, HP-UX 10
rbootd=YES rbootd_flags=""
mopd=YES mopd_flags="-a"
rarpd=YES rarpd_flags="-a" bootparamd=YES bootparamd_flags=""
dhcpd=YES dhcpd_flags="-q"
nfs_server=YES # enable server daemons mountd_flags="" nfsd_flags="-6tun 4"
Congratulations, you're done!
rbootd=""
mopd_flags="-a"
rarpd="-a" bootparamd=""
dhcpd_flags="-q"
nfs_server=YES
Congratulations, you're done!
echo -n ' rbootd' /usr[/local]/libexec/rbootd echo -n ' bootparamd' /usr/sbin/bootparamd
echo -n ' mopd' /usr/local/sbin/rbootd echo -n ' bootparamd' /usr/sbin/bootparamd
rarpd_enable="YES" rarpd_flags="-a -s"
mount -t nfs -a -o -I=1024,-r=1024,-w=1024 nfsserver:/export/client/root/ /
Also, some versions of FreeBSD have problems with NFS3. If you encountered this when trying out nfs, then be sure to include the -r2 flag when starting mountd.
Edit /etc/rc.conf (or /etc/sysconfig for earlier
versions) and make sure the following lines are set:
nfs_server_enable="YES" mountd_flags="-[2]r"
!rbootd *.* /var/log/bootlog !rarpd *.* /var/log/bootlog
Congratulations, you're done!
The /etc/hostconfig describes which built-in services are automatically started. To prevent the native bootpd from starting (since it doesn't work and conflicts with dhcpd), make sure that the following lines are set:
CONFIGSERVER=-NO- NETBOOTSERVER=-NO-
The SystemStarter HOWTO is a good reference if you want to learn more about creating your own startup bundles.
{ Description = "NetBoot services for NetBSD clients"; Provides = ("DHCPD", "bootparams", "rbootd"); Requires = ("NetInfo", "Network"); OrderPreference = "None"; Messages = { start = "Starting NetBSD NetBoot services"; stop = "Stopping NetBSD NetBoot services"; }; }
#!/bin/sh . /etc/rc.common ## # Start up NetBSD NetBoot services ## ConsoleMessage "Starting NetBSD NetBoot Services" ## # Start NetBSD NetBoot services ## /usr/libexec/rbootd bootparamd dhcpd -q
Congratulations, you're done!
mount -t nfs -a -o -I=1024,-r=1024,-w=1024 nfsserver:/export/client/root/ /
Also, some flavors of linux have problems with NFS3. If you encountered this when trying out nfs, then be sure to include the --no-nfs-version 3 flag when starting rpc.mountd.
Each flavor of linux deals with starting the daemons in a different way. Pick your distribution from the list below and follow those directions.
#Start the daemons to netboot a NetBSD client echo -n 'Starting diskless server daemons:' if [ -f /usr/local/bin/rbootd ]; then echo -n ' rbootd'; /usr/local/bin/rbootd > /dev/null fi
#Start the daemons to netboot a NetBSD client echo -n 'Starting diskless server daemons:' if [ -f /usr/local/sbin/mopd ]; then echo -n ' mopd'; /usr/local/sbin/mopd > /dev/null fi
echo -n ' arp' /sbin/arp -s client CC:CC:CC:CC:CC:CC /sbin/rarp -s client CC:CC:CC:CC:CC:CC if [ -f /usr/[local]/sbin/rpc.bootparamd ]; then echo -n ' rpc.bootparamd'; /usr/[local]/sbin/rpc.bootparamd > /dev/null fi echo '.'
echo -n ' dhcpd' if [ -f /usr/[local]/sbin/dhcpd ]; then /usr/[local]/sbin/dhcpd -q fi echo '.'
if [ -f ${NET}/rpc.portmap ]; then # Start the NFS server daemons. if [ -f ${NET}/rpc.mountd ]; then echo -n " mountd" ${NET}/rpc.mountd fi if [ -f ${NET}/rpc.nfsd ]; then echo -n " nfsd" ${NET}/rpc.nfsd fi fi # Done starting various SUN RPC servers.
Congratulations, you're done!
The VAX Network Booting HOWTO discusses how to set up SysV style scripts for Red Hat linux.
If you don't want to bother with that, you can just add the daemons to your /etc/rc.d/rc.local.
#Start the daemons to netboot a NetBSD client echo -n 'Starting diskless server daemons:' if [ -f /usr/local/bin/rbootd ]; then echo -n ' rbootd'; /usr/local/bin/rbootd > /dev/null fi
#Start the daemons to netboot a NetBSD client echo -n 'Starting diskless server daemons:' if [ -f /usr/local/sbin/mopd ]; then echo -n ' mopd'; /usr/local/sbin/mopd > /dev/null fi
echo -n ' arp' /sbin/arp -s client CC:CC:CC:CC:CC:CC /sbin/rarp -s client CC:CC:CC:CC:CC:CC if [ -f /usr/[local]/sbin/rpc.bootparamd ]; then echo -n ' rpc.bootparamd'; /usr/[local]/sbin/rpc.bootparamd > /dev/null fi echo '.'
echo -n ' dhcpd' if [ -f /usr/[local]/sbin/dhcpd ]; then /usr/[local]/sbin/dhcpd -q fi echo '.'
daemon rpc.mountd --no-nfs-version 3
Congratulations, you're done!
The VAX Network Booting HOWTO discusses how to set up SysV style scripts for Red Hat Linux. The only notable difference is that Red Hat uses /etc/rc.d/init.d/ and Debian uses /etc/init.d/.
Note that the Debian rbootd package will have already installed a SysV init script for rbootd and bootparam if you installed this.
If you don't want to bother with that, you can just add the daemons to your /etc/rc.local.
#Start the daemons to netboot a NetBSD client echo -n 'Starting diskless server daemons:' if [ -f /usr/local/bin/rbootd ]; then echo -n ' rbootd'; /usr/local/bin/rbootd > /dev/null fi
#Start the daemons to netboot a NetBSD client echo -n 'Starting diskless server daemons:' if [ -f /usr/local/sbin/mopd ]; then echo -n ' mopd'; /usr/local/sbin/mopd > /dev/null fi
/sbin/arp -s client CC:CC:CC:CC:CC:CC /sbin/rarp -s client CC:CC:CC:CC:CC:CC if [ -f /usr/[local]/sbin/rpc.bootparamd ]; then /usr/[local]/sbin/rpc.bootparamd > /dev/null fi echo '.'
echo -n ' dhcpd' if [ -f /usr/[local]/sbin/dhcpd ]; then /usr/[local]/sbin/dhcpd -q fi echo '.'
Congratulations, you're done!
#Start the daemons to netboot a NetBSD client echo -n 'Starting diskless server daemon:' if [ -f /usr/local/sbin/sun-rbootd ]; then echo ' rbootd.'; /usr/local/sbin/sun-rbootd -a > /dev/null fi
#Start the daemons to netboot a NetBSD client echo -n 'Starting diskless server daemon:' if [ -f /usr/local/sbin/dhcpd ]; then echo ' dhcpd.'; /usr/local/sbin/dhcpd -q fi
Congratulations, you're done!
If you later decide to remove these services, don't forget to:
# rm -rf /tftpboot
Remove the share lines in /etc/dfs/dfstab
Congratulations, you're done!
#Start the daemons to netboot a NetBSD client echo -n 'Starting diskless server daemon:' if [ -f /usr/local/bin/rbootd ]; then echo ' rbootd.'; /usr/local/sbin/sun-rbootd -a > /dev/null fi
if [ -f /usr/etc/rpc.bootparamd ]; then /usr/etc/rpc.bootparamd & (echo -n ' bootparamd' >/dev/console) fi if [ -f /etc/rarpd ]; then /etc/rarpd; (echo -n ' rarpd' >/dev/console) fi
Congratulations, you're done!
NETMASTER=-YES-
Congratulations, you're done!
# if /usr/bin/rtprio 64 /etc/rbootd $RBOOTD_DEVICES; then # echo "remote boot daemon started" [...] # if /usr/bin/rtprio 64 /etc/rbootd; then # echo "remote boot daemon started"Now edit one of the startup files (preferably /etc/netlinkrc) and add the following lines:
#Start the daemons to netboot a NetBSD client echo -n 'Starting diskless server daemon:' if [ -f /usr/local/sbin/sun-rbootd ]; then echo ' rbootd.'; /usr/local/sbin/sun-rbootd -a > /dev/null fi
#Start the daemons to netboot a NetBSD client echo -n 'Starting diskless server daemon:' if [ -f /usr/local/sbin/dhcpd ]; then echo ' dhcpd.'; /usr/local/sbin/dhcpd -q fi
Congratulations, you're done!
Congratulations, you're done!
|
|