From owner-freebsd-hackers@freebsd.org Tue Apr 19 14:16:03 2016 Return-Path: Delivered-To: freebsd-hackers@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id DFD37B134EB for ; Tue, 19 Apr 2016 14:16:03 +0000 (UTC) (envelope-from asomers@gmail.com) Received: from mail-oi0-x235.google.com (mail-oi0-x235.google.com [IPv6:2607:f8b0:4003:c06::235]) (using TLSv1.2 with cipher ECDHE-RSA-AES128-GCM-SHA256 (128/128 bits)) (Client CN "smtp.gmail.com", Issuer "Google Internet Authority G2" (verified OK)) by mx1.freebsd.org (Postfix) with ESMTPS id A33BA1389; Tue, 19 Apr 2016 14:16:03 +0000 (UTC) (envelope-from asomers@gmail.com) Received: by mail-oi0-x235.google.com with SMTP id k142so10037739oib.1; Tue, 19 Apr 2016 07:16:03 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:date:message-id:subject :from:to:cc; bh=QgsobtqvT5EXu+0LHN3Fi/6SYIb4cBZmF27TdNQil5Q=; b=SQ5cR2eWH8SIk1TN083lIgS5Yeq0aaj+WIquEN8kSQSEN7xpqjbhouvE8lDtdFd0XZ KZWeZ28ysmbG+OzRW23b55EQ/sWJaBpOuSz+MOJigazHtzDreUlLvijiD34H/lGqgaSe FXIDscXmFt0MSo5i6tKWm7Vb/5CdJhjzQl6YGjvls89Fu+1gWfBJ3aLUDozfuWl5swN4 AYE8dFroXJw8ubID+ox/dTzvOWoGAbnY7p2d8GOqGUV8bznItfORozONW7eG+HSaE5mT frE7Rm/nNuEKqie8z/QVaJ087yzCBX+cF7urEQV188vJPYKqP0c54ZlSUIjO8ZqQyN6w OXzg== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:date :message-id:subject:from:to:cc; bh=QgsobtqvT5EXu+0LHN3Fi/6SYIb4cBZmF27TdNQil5Q=; b=mk+87tAj75+GnfiSWzGdzx2cmAryLduNCIZyGyrxgsD6XceW8cMuxXn82HFsOFu/Xn T8uJsYESsv1l7dxG8lxFT4vNoNVS2iIT2iq/jpZP51o/JK7mEa+eBzjZnXS+4EC5XY++ F7ywufme3lC/U9gJpkOv3ZrK+PjZHyDdQnTqj5ip65e3jbE6Lh2lUimZngDwzEDShC5Z iru/lAK+sFK6sGUwl4LBkjhg/CkhR1G5BcX5/KVL/lt0lnPFJ0oS52cBDdDiWN2vAzkP SKUjXczl5W7k7fsOMxR4dzMbHAZQdC57+prE1G8/ToaQ1dvLgOiY3QoNvBIqzd5OnyIv VPpw== X-Gm-Message-State: AOPr4FXJmHfoRZmL9dCaEZOH0Kbu2YUuJIBWU0z/Xp2Ciwxx+22D9T3AeiUmz+MrsHbqPcqFNUJ4I05JJf8VXQ== MIME-Version: 1.0 X-Received: by 10.202.77.146 with SMTP id a140mr528765oib.86.1461075363047; Tue, 19 Apr 2016 07:16:03 -0700 (PDT) Sender: asomers@gmail.com Received: by 10.202.64.138 with HTTP; Tue, 19 Apr 2016 07:16:02 -0700 (PDT) In-Reply-To: <1461075243.1232.9.camel@freebsd.org> References: <57163991.4000100@systella.fr> <1461075243.1232.9.camel@freebsd.org> Date: Tue, 19 Apr 2016 08:16:02 -0600 X-Google-Sender-Auth: di_G7w0CWi2mOBfJhfzuyxSj_Ic Message-ID: Subject: Re: Diskless workstation and some minor issues From: Alan Somers To: Ian Lepore Cc: =?UTF-8?Q?BERTRAND_Jo=C3=ABl?= , "freebsd-hackers@freebsd.org" Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable X-Content-Filtered-By: Mailman/MimeDel 2.1.21 X-BeenThere: freebsd-hackers@freebsd.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: Technical Discussions relating to FreeBSD List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Tue, 19 Apr 2016 14:16:04 -0000 On Tue, Apr 19, 2016 at 8:14 AM, Ian Lepore wrote: > On Tue, 2016-04-19 at 15:58 +0200, BERTRAND Jo=C3=ABl wrote: > > > Hello, > > > > > I have installed a diskless workstation (10.2-RELEASE-p14) that > mounts > > its rootfs from a NetBSD nfs server. My fstab is : > > > > root@pythagore:~ # cat /etc/fstab > > # Device Mountpoint FStype Options Dump Pass# > > 192.168.10.128:/srv/pythagore / nfs nfsv3,tcp,soft,intr,rw > > 0 0 > > ... > > 192.168.10.128:/home /home nfs nfsv3,tcp,soft,intr,rw > > 0 0 > > root@pythagore:~ # > > > > > First question. I have installed this diskless workstation with > an USB > > stick. Now, FreeBSD kernel mounts rootfs over NFS. But in a first time, > > it tries to mount usbus0 (!) : > > > > Apr 9 10:48:00 pythagore kernel: Root mount waiting for: usbus2 usbus1 > > usbus0 > > Apr 9 10:48:00 pythagore kernel: uhub0: 2 ports with 2 removable, self > > powered > > Apr 9 10:48:00 pythagore kernel: uhub2: 2 ports with 2 removable, self > > powered > > Apr 9 10:48:00 pythagore kernel: uhub1: 21 ports with 21 removable, > > self powered > > Apr 9 10:48:00 pythagore kernel: Root mount waiting for: usbus2 usbus1 > > usbus0 > > Apr 9 10:48:00 pythagore kernel: ugen0.2: at usbus0 > > Apr 9 10:48:00 pythagore kernel: ugen2.2: at usbus2 > > Apr 9 10:48:00 pythagore kernel: uhub3: > > class 9/0, rev 2.00/0.00, addr 2> on usbus2 > > Apr 9 10:48:00 pythagore kernel: ugen1.2: at usbus1 > > Apr 9 10:48:01 pythagore kernel: uhub4: > > class 9/0, rev 2.00/0.00, addr 2> on usbus1 > > Apr 9 10:48:01 pythagore kernel: Root mount waiting for: usbus2 usbus1 > > usbus0 > > Apr 9 10:48:01 pythagore kernel: uhub4: 6 ports with 6 removable, self > > powered > > Apr 9 10:48:01 pythagore kernel: uhub3: 8 ports with 8 removable, self > > powered > > Apr 9 10:48:01 pythagore kernel: ugen0.3: at usbus0 > > Apr 9 10:48:01 pythagore kernel: ukbd0: > > 0/0, rev 1.10/1.12, addr 2> on usbus0 > > Apr 9 10:48:01 pythagore kernel: kbd2 at ukbd0 > > Apr 9 10:48:01 pythagore kernel: Root mount waiting for: usbus0 > > Apr 9 10:48:01 pythagore kernel: usbd_setup_device_desc: getting devic= e > > descriptor at addr 3 failed, USB_ERR_IOERROR > > Apr 9 10:48:01 pythagore kernel: Root mount waiting for: usbus0 > > Apr 9 10:48:01 pythagore kernel: usbd_setup_device_desc: getting devic= e > > descriptor at addr 3 failed, USB_ERR_IOERROR > > Apr 9 10:48:01 pythagore kernel: Root mount waiting for: usbus0 > > Apr 9 10:48:01 pythagore kernel: Root mount waiting for: usbus0 > > Apr 9 10:48:01 pythagore kernel: usbd_setup_device_desc: getting devic= e > > descriptor at addr 3 failed, USB_ERR_IOERROR > > Apr 9 10:48:02 pythagore kernel: Root mount waiting for: usbus0 > > Apr 9 10:48:02 pythagore kernel: usbd_setup_device_desc: getting devic= e > > descriptor at addr 3 failed, USB_ERR_IOERROR > > Apr 9 10:48:02 pythagore kernel: Root mount waiting for: usbus0 > > Apr 9 10:48:02 pythagore kernel: Root mount waiting for: usbus0 > > Apr 9 10:48:02 pythagore kernel: usbd_setup_device_desc: getting devic= e > > descriptor at addr 3 failed, USB_ERR_IOERROR > > Apr 9 10:48:02 pythagore kernel: ugen0.4: at usbus0 > > (disconnected) > > Apr 9 10:48:02 pythagore kernel: uhub_reattach_port: could not allocat= e > > new device > > Apr 9 10:48:02 pythagore kernel: Trying to mount root from > > nfs:192.168.10.128:/srv/pythagore [nfsv3,tcp,soft,intr,rw]... > > Apr 9 10:48:02 pythagore kernel: NFS ROOT: 192.168.10.128: > /srv/pythagore > > > > > I don't understand why kernel tries to mount an USB rootfs... > And I > > haven't found how fix this trouble. > > > > At this point during booting, the system doesn't know what physical > device may hold the rootfs, so it waits until it has enumerated all the > devices on all the USB busses, in case one of them is required to mount > root (even in the NFS case, it could require a USB network device). > > To disable this wait, put hw.usb.no_boot_wait=3D1 in loader.conf. > > > Second trouble. /var/log/message contains a lot of : > > Apr 9 10:50:00 pythagore atrun[862]: cannot lock /var/at/jobs/: > > Permission denied > > > > > Of course, lockd and statd are running on nfs server. Permissio= n > on > > /var/at are : > > > > root@pythagore:/var/at # ls -al > > total 8 > > drwxr-xr-x 4 root wheel 512 Aug 12 2015 . > > drwxr-xr-x 28 root wheel 512 Apr 15 09:14 .. > > drwxr-xr-x 2 daemon wheel 512 Aug 12 2015 jobs > > drwxr-xr-x 2 daemon wheel 512 Aug 12 2015 spool > > root@pythagore:/var/at # > > > > > I don't understand where is the mistake. > > > > This is a more serious problem. I have found it to be impossible to > run a diskless workstation with a persistant /var mounted via NFS > (either by itself or as a directory within the nfs rootfs). It's been > this way for several years. You can add varmfs=3Dyes to your rc.conf to > get a working system, but then you have a non-persistant /var which > really isn't very useful. > > Hmm, but the problems I usually have are with /var/run and pidfiles. > I've never noticed this /var/at problem (maybe just because I gave up > trying to run with an nfs-mounted /var before I noticed them). > > > An third trouble, this workstation runs cupsd. When I send a job = to > > printer, cupsd run as expected but aborts after job is completed. In > > /var/log/cups/error_log, I have : > > > > E [19/Apr/2016:12:44:34 +0200] Unable to create > > "/usr/local/etc/cups/printers.conf.N": Operation not permitted > > E [19/Apr/2016:12:45:12 +0200] Unable to create > > "/var/cache/cups/job.cache.N": Operation not permitted > > E [19/Apr/2016:12:45:12 +0200] Unable to create > > "/var/spool/cups/c00032.N": Operation not permitted > > > > > I have checked permissions on directories (and config file) > without any > > result, but I have seen that permissions on /var/spool/cups are > > overwrittem by cups (to drwx--x---). > > > > This one I can't help with at all, because I gave up on trying to get > printers to work on freebsd about 10 years ago and haven't had the > energy to ever try again. :( > > -- Ian > Check your /etc/exports on the server. Both of these problems could be explained if your server has -maproot set (or whatever NetBSD calls it). For diskless workstations, you must turn that off at the server. -Alan