From owner-freebsd-questions@FreeBSD.ORG Thu Aug 10 13:20:33 2006 Return-Path: X-Original-To: freebsd-questions@freebsd.org Delivered-To: freebsd-questions@freebsd.org Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 5890316A4E7 for ; Thu, 10 Aug 2006 13:20:33 +0000 (UTC) (envelope-from nagylzs@enternet.hu) Received: from smtp.enternet.hu (smtp.enternet.hu [62.112.192.21]) by mx1.FreeBSD.org (Postfix) with ESMTP id F1E6D43D53 for ; Thu, 10 Aug 2006 13:20:30 +0000 (GMT) (envelope-from nagylzs@enternet.hu) Received: from [62.68.177.139] (helo=[172.16.0.43]) by smtp.enternet.hu with esmtpa (Exim 4) id 1GBASa-000I2v-70 for freebsd-questions@freebsd.org; Thu, 10 Aug 2006 15:20:28 +0200 Message-ID: <44DB32B7.8080602@enternet.hu> Date: Thu, 10 Aug 2006 15:20:55 +0200 From: =?ISO-8859-2?Q?Nagy_L=E1szl=F3?= User-Agent: Thunderbird 1.5.0.5 (Windows/20060719) MIME-Version: 1.0 To: freebsd-questions@freebsd.org Content-Type: text/plain; charset=ISO-8859-2; format=flowed Content-Transfer-Encoding: 7bit Subject: Almost ready with diskless setup X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 10 Aug 2006 13:20:33 -0000 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