From owner-freebsd-arm@freebsd.org Fri Jul 3 15:28:44 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 8D9AD9938B6 for ; Fri, 3 Jul 2015 15:28:44 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from pmta2.delivery4.ore.mailhop.org (pmta2.delivery4.ore.mailhop.org [54.200.247.200]) by mx1.freebsd.org (Postfix) with SMTP id 7136D128E for ; Fri, 3 Jul 2015 15:28:44 +0000 (UTC) (envelope-from ian@freebsd.org) Received: from ilsoft.org (unknown [73.34.117.227]) by outbound1.ore.mailhop.org (Halon Mail Gateway) with ESMTPSA; Fri, 3 Jul 2015 15:28:46 +0000 (UTC) Received: from rev (rev [172.22.42.240]) by ilsoft.org (8.14.9/8.14.9) with ESMTP id t63FSgGC026197; Fri, 3 Jul 2015 09:28:42 -0600 (MDT) (envelope-from ian@freebsd.org) Message-ID: <1435937322.1648.152.camel@freebsd.org> Subject: Re: Mounting /usr during boot on RPI2 From: Ian Lepore To: bob prohaska Cc: freebsd-arm@freebsd.org Date: Fri, 03 Jul 2015 09:28:42 -0600 In-Reply-To: <20150702060216.GA65911@www.zefox.net> References: <20150702060216.GA65911@www.zefox.net> Content-Type: text/plain; charset="us-ascii" X-Mailer: Evolution 3.12.10 FreeBSD GNOME Team Port Mime-Version: 1.0 Content-Transfer-Encoding: 7bit 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: Fri, 03 Jul 2015 15:28:44 -0000 On Wed, 2015-07-01 at 23:02 -0700, bob prohaska wrote: > 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 > The solution to mounting a usb device as root when it takes a while to probe is to add kern.cam.boot_delay="10000" to /boot/loader.conf. You may need to rename loader.conf.sample to loader.conf first. The value is in milliseconds, so the above gives a 10 second delay, adjust as needed. -- Ian