Almost ready with diskless setup

Nagy László nagylzs at
Thu Aug 10 13:20:33 UTC 2006

I used this article:

to create a diskless configuration. Here is my /etc/rc script for the 


PATH=/sbin:/bin:/usr/sbin:/usr/bin:/usr/X11R6/bin; export PATH

boot_ip=`kenv boot.netif.ip`
mount -t nfs${boot_ip}/etc /etc
mount -t nfs${boot_ip}/var /var
#mount -t nfs /usr
swapon /var/swap
rm -rf /var/tmp/*; rm -rf /var/tmp/.*;

. /etc/rc2

exit 0

The /etc/rc2 is different for each client. Here is an example for


mount -a
/sbin/ldconfig -elf /usr/lib/compat /usr/X11R6/lib /usr/local/lib


exit 0

Finally, here is my fstab:

# Device                                        Mountpoint      FStype  
Options         Dump    Pass                        /               nfs     
ro              0       0      /etc            nfs     
rw              0       0      /var            nfs     
rw              0       0                                /usr            nfs     
ro              0       0

When booting this machine, I get this screen:


1. mount_nfs is complaining. It cannot update mounttab. However, the 
mounttab is in /var/db and /var is not mounted yet. Is there a nice way 
to supress these annoying messages?
2. syslogd tells that it cannot open the pid file. (Operation not 
supported)  However, it creates /var/log/ But that file is 
empty. What can be the problem?

Last (silly) question: when I boot the diskless system, it checks the 
login name but it does not ask for a password. I can login with any 
user, without providing a password. I guess this is because I replaced 
the standard /etc/rc script. Is there a simple command that I can use to 
switch to multiuser mode and have the system do the authentication?



More information about the freebsd-questions mailing list