From owner-freebsd-arm@freebsd.org Thu Jul 2 06:31:34 2015 Return-Path: Delivered-To: freebsd-arm@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 830C4992445 for ; Thu, 2 Jul 2015 06:31:34 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (www.zefox.net [69.239.235.194]) (using TLSv1 with cipher DHE-RSA-CAMELLIA256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 60F251F1A for ; Thu, 2 Jul 2015 06:31:34 +0000 (UTC) (envelope-from fbsd@www.zefox.net) Received: from www.zefox.net (localhost [127.0.0.1]) by www.zefox.net (8.14.9/8.14.5) with ESMTP id t6262HJX048959; Wed, 1 Jul 2015 23:02:17 -0700 (PDT) (envelope-from fbsd@www.zefox.net) Received: (from fbsd@localhost) by www.zefox.net (8.14.9/8.14.5/Submit) id t6262GZJ048958; Wed, 1 Jul 2015 23:02:17 -0700 (PDT) (envelope-from fbsd) Date: Wed, 1 Jul 2015 23:02:16 -0700 From: bob prohaska To: freebsd-arm@freebsd.org Subject: Mounting /usr during boot on RPI2 Message-ID: <20150702060216.GA65911@www.zefox.net> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline User-Agent: Mutt/1.4.2.3i X-BeenThere: freebsd-arm@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: "Porting FreeBSD to ARM processors." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 02 Jul 2015 06:31:34 -0000 Got an RPI2 system up and running for a few weeks now. For the most part it's astoundingly robust, but there are a few small mysteries. If /etc/fstab is edited with the line /dev/da0p3 /usr ufs rw,noatime,late,failok 1 2 boot fails and drops into single user, saying device not found, as if /dev isn't fully populated yet. In single user, a manual fsck -y cleans up the problem and exit starts multiuser. Adding a mount command in /etc/rc.conf works but there are several attempts, with repeated "device busy" and "device already in use" reports. Eventually /usr mounts from the usb hard disk and everything works very well. Another oddity is that adding fsck -Cy before the mount command always seems to result in a full fsck, even when the machine went through a clean reboot. Adding swap in /etc/rc.conf likewise works, but with repeated "device already in use" reports during boot. I've tried adding SCSI_DELAY=20000 to the kernel config file in hopes it might let the usb device catch up, but the variable seems to have no effect- It looks as if the boot process runs too fast for the usb daemons to keep up. Is there some way to slow it down? For now, the solution seems to be in leaving /etc/fstab strictly alone and mount /usr in /etc/rc.conf without invoking fsck -Cy. If the /usr partition is dirty, it simply must be fsck'd and mounted by hand. Altogether the machine works astonishingly well, despite the little niggles. With my compliments and thanks to everybody involved, bob prohaska