From owner-freebsd-questions@FreeBSD.ORG Mon Nov 16 18:22:07 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 B93EF1065670; Mon, 16 Nov 2009 18:22:07 +0000 (UTC) (envelope-from freebsd@abv.bg) Received: from smtp-out.abv.bg (smtp-out.abv.bg [194.153.145.70]) by mx1.freebsd.org (Postfix) with ESMTP id 14CDD8FC08; Mon, 16 Nov 2009 18:22:06 +0000 (UTC) Received: from mail53.abv.bg (mail53.ni.bg [192.168.151.29]) by smtp-out.abv.bg (Postfix) with ESMTP id 7C56C3EE445; Mon, 16 Nov 2009 20:22:04 +0200 (EET) DomainKey-Signature: a=rsa-sha1; s=smtp-out; d=abv.bg; c=simple; q=dns; b=nc17nhiUJ/bUs7tET4x8gA8ke17anvpuZj+LXufCf1QCsTIie1BR5d+IEsxfIbkd+ v9d1jKkTaSvs+6LPwG61mthcYwH6IIbeGbK3o7MJZWeZBVLeiLNFjIn4xaa+oYrq5i9 xR2CtP0XLLTTv+Cq/1l+5ESIpPlqkH3Mcd31y0w= DKIM-Signature: v=1; a=rsa-sha256; c=simple/simple; d=abv.bg; s=smtp-out; t=1258395724; bh=Qd4XTKivQc2+KqluC9RyuU4LWp4HX4Bzn+V7FXdcQSM=; h=Date:From:To:Cc:Message-ID:Subject:MIME-Version:Content-Type: Content-Transfer-Encoding:DKIM; b=k/C63Oi/was0N6+IcNiVbgM21iUF36/M OfG9+1Qg/vGzXFTKx+jqbwl8UIvRWCcuVG01LXUqNigYEnVqaX4ljKmHlAlY4RIxav5 tJN0GTwwWViAePxtaqZjiwEfkKXDfNwqTQU+NDOTo0GeIiFfC1IiqX6YgzCZHap0IJs RoEFo= Received: from mail53.abv.bg (localhost.localdomain [127.0.0.1]) by mail53.abv.bg (Postfix) with ESMTP id B72DB241BEA; Mon, 16 Nov 2009 20:22:13 +0200 (EET) Date: Mon, 16 Nov 2009 20:22:13 +0200 (EET) From: Mario Pavlov To: Tim Judd Message-ID: <1827106023.12813.1258395733748.JavaMail.apache@mail53.abv.bg> MIME-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 8bit X-Priority: 3 X-Mailer: AbvMail 1.0 X-Originating-IP: 78.128.21.208 Cc: freebsd-stable@freebsd.org, freebsd-questions@freebsd.org Subject: Re: 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: Mon, 16 Nov 2009 18:22:08 -0000 Hi, thanks again for your response: here's what I have, what I do and what I want to happen 1. I have my desktop machine which is running FreeBSD-7.2-STABLE-amd64 from June. I created a new distribution like that (as shown in the handbook - http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/network-diskless.html): ================================================================================ mkdir /storage0/diskless cd /usr/src export DESTDIR=/storage0/diskless make buildworld buildkernel installworld distribution installkernel ================================================================================ and created /storage0/diskless/etc/fstab with the following content: ================================================================================ 192.168.0.1:/storage0/diskless / nfs ro 0 0 ================================================================================ and I put this in /etc/exports (having in mind your advice about the group) ================================================================================ /storage0/diskless -maproot=0:0 -ro -alldirs 192.168.0.3 /usr -ro -alldirs 192.168.0.3 ================================================================================ and this is in my dhcpd.conf (I tried with and without the comments - no difference, same result) ================================================================================ host laptop { hardware ethernet 00:1E:68:45:0D:98; # option host-name "laptop"; # ddns-hostname "laptop"; # next-server 192.168.0.1; fixed-address 192.168.0.3; filename "pxeboot"; option root-path "192.168.0.1:/storage0/diskless"; } ================================================================================ 2. And I do this: ================================================================================ rpcbind nfsd -u -t -n 4 mountd -r /etc/rc.d/ineted onestart # I have my TFTP root set to /boot /usr/local/etc/rc.d/isc-dhcpd onestart ================================================================================ then I start my laptop (which has a 64bit CPU therefore it should be compatible with my amd64 kernel) enter the boot menu and choose the network boot option and I can see that it acquires its IP address then fetches pxeboot over TFTP then pxeboot loads the kernel and the kernel starts bringing the system up...and these are the last few lines where the system stops: ================================================================================ ... ... Trying to mount root from nfs:192.168.0.1:/storage0/diskless NFS ROOT: 192.168.0.1:/storage0/diskless nfs send error 13 for server 192.168.0.1:/storage0/diskless bge0: link state changed to DOWN bge0: link state changed to UP ================================================================================ 3. What I want is to have a server that multiple clients can boot from (diskless-ly as you say). And I want all file systems provided by the server to be read-only (which means I don't need lockd, do I...) Do you have an idea what could be my problem? ...obviously my TFTP and DHCP services are fine, even the NFS as pxeboot is able to download the kernel...maybe something in my distribution in /storage0/diskless is not OK? thanks mgp >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 >_______________________________________________ >freebsd-stable@freebsd.org mailing list >http://lists.freebsd.org/mailman/listinfo/freebsd-stable >To unsubscribe, send any mail to "freebsd-stable-unsubscribe@freebsd.org" > ----------------------------------------------------------------- Вижте водещите новини от Vesti.bg! http://www.vesti.bg