I used this article:

http://www.onlamp.com/pub/a/bsd/2004/09/30/diskless_clients.html

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

#!/bin/sh

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

boot_ip=`kenv boot.netif.ip`
mount -t nfs 172.16.0.1:/var/diskless/${boot_ip}/etc /etc
mount -t nfs 172.16.0.1:/var/diskless/${boot_ip}/var /var
#mount -t nfs 172.16.0.1:/usr /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 172.16.0.101:

#!/bin/sh

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

/usr/sbin/syslogd

exit 0

Finally, here is my fstab:

# Device Mountpoint FStype Options Dump Pass 172.16.0.1:/diskless / nfs ro 0 0 172.16.0.1:/var/diskless/172.16.0.101/etc /etc nfs rw 0 0 172.16.0.1:/var/diskless/172.16.0.101/var /var nfs rw 0 0 172.16.0.1:/usr /usr nfs ro 0 0

When booting this machine, I get this screen:

http://messias.selfip.org/download/disklessboot.jpg

Questions:

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/syslogd.pid. 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?

Thanks,

  Laszlo

_______________________________________________
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to "[EMAIL PROTECTED]"

Reply via email to