From owner-freebsd-questions@FreeBSD.ORG Sun Nov 15 21:38:04 2009 Return-Path: Delivered-To: freebsd-questions@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id AD6A5106566C for ; Sun, 15 Nov 2009 21:38:04 +0000 (UTC) (envelope-from tajudd@gmail.com) Received: from mail-pz0-f185.google.com (mail-pz0-f185.google.com [209.85.222.185]) by mx1.freebsd.org (Postfix) with ESMTP id 848DB8FC12 for ; Sun, 15 Nov 2009 21:38:04 +0000 (UTC) Received: by pzk15 with SMTP id 15so3274227pzk.3 for ; Sun, 15 Nov 2009 13:38:04 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:mime-version:received:in-reply-to:references :date:message-id:subject:from:to:cc:content-type; bh=UsYMQb24asJBUSO1PI1hkxkxYKqOLiNvV7w/knZyc9c=; b=DGbP6Z02Yr1dklt7inVa9bUNkY+rxlfYTYww4bC+DXw9qb5JhlUTSwpSlaOJcbjZdv XlZmjj9Gxtv5UZ4R1I2R1POxUY7AX96zbrWnv7fp4KYmFK5FAjsz5pRBoqvcGJiZKifl Lg2OIO6X1hZKX5ccjcy7Y5DTEJSPzGiHNdedg= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=mime-version:in-reply-to:references:date:message-id:subject:from:to :cc:content-type; b=nlcpC1UCFxyTRTzlavJQMKo+FpYuL4Bz752yAhNpSdRoA0hki3FrO5i3mQ7oHala5G BSu3Zelgwlqq63C4D0mRwrjqmxK5UbqgsHccm75Wj/xwZiOwNOJaFv69sLmR0OLOF/xf kcgxmX44GyO3XX65N063cqMDPl/WW/dAfX3ys= MIME-Version: 1.0 Received: by 10.114.237.37 with SMTP id k37mr13140910wah.31.1258321084016; Sun, 15 Nov 2009 13:38:04 -0800 (PST) In-Reply-To: <1349537904.141314.1258277669303.JavaMail.apache@mail51.abv.bg> References: <1349537904.141314.1258277669303.JavaMail.apache@mail51.abv.bg> Date: Sun, 15 Nov 2009 14:38:03 -0700 Message-ID: From: Tim Judd To: Mario Pavlov Content-Type: text/plain; charset=ISO-8859-1 Cc: freebsd-stable@freebsd.org, freebsd-questions@freebsd.org Subject: Re: diskless - NFS root mount problem 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: Sun, 15 Nov 2009 21:38:04 -0000 Please compare my working configuration to yours to check. I found lots of odd problems in your post and I thought it'd be best to just run with this clean slate. Network config: One low-power PC Engines ALIX board running as the NFS server, with a microdrive partitioned off for it's own system, plus a separate mounted partition for diskless clients. This config works best with one diskless client, and is not the documented way from FreeBSD handbook to accomplish diskless workstations. I'll note what I immediately saw as an error in your config during these snippets. alix# bsdlabel /dev/ad0s1 # /dev/ad0s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 1048576 16 4.2BSD 2048 16384 8 c: 12000177 0 unused 0 0 # "raw" part, don't edit h: 10951585 1048592 4.2BSD 2048 16384 28552 alix# cat /etc/fstab /dev/ad0s1a / ufs rw 0 0 /dev/ad0s1h /diskless ufs rw 0 0 alix# cat /etc/exports /diskless -maproot=0:0 -network 192.168.0.0 -mask 255.255.255.0 *** maproot needs a user and group definition. alix# cat /etc/rc.conf rpcbind_enable="YES" nfs_server_enable="YES" rpc_statd_enable="YES" rpc_lockd_enable="YES" *** rpc_lockd provides file locking, rpc_lockd depends on rpc_statd ************** Diskless side *** I believe the root filesystem information is passed on from dhcp, to pxeboot, to the kernel, in order to mount the root filesystem. You can have a 0-size fstab file for read-write access, or provide the read-only nfs root here. If you want it read only, it's best to specify it here, such as below alix# cat /diskless/etc/fstab 192.168.0.1:/diskless / nfs ro 0 0 alix# cat /diskless/etc/rc.conf rpcbind_enable="YES" nfs_client_enable="YES" rpc_statd_enable="YES" rpc_lockd_enable="YES" *** File locking needed lockd/statd support on the client, also. Think of editing /etc/passwd (the proper way) when you need file locking. This will result in a basic, 1-workstation diskless setup working. The difference is that the FreeBSD rc startup looks for a /conf directory which can provide multiple overrides to multiple workstations. I tried setting up a livecd with a /conf directory only to find that the /conf is checked, no matter which medium it's booting off of. This config does NOT cover the DHCP scope, TFTP, IPs or other settings that might be pertinent to booting diskless-ly. Note that by sharing your exact / filesystem as an export is a bad idea. It will essentially create a NFS server on a NFS server round robin and probably won't connect. It's why you setup a separate partition (EVEN if it's a file-backed filesystem mounted with the help of mdconfig on a separate mountpoint on your filesystem). Once you revise your config, please try again. --Tim