From owner-freebsd-current@freebsd.org Wed May 11 20:14:13 2016 Return-Path: Delivered-To: freebsd-current@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 5CE7CB37E58 for ; Wed, 11 May 2016 20:14:13 +0000 (UTC) (envelope-from graham@menhennitt.com.au) Received: from homiemail-a81.g.dreamhost.com (sub5.mail.dreamhost.com [208.113.200.129]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 40C591836 for ; Wed, 11 May 2016 20:14:12 +0000 (UTC) (envelope-from graham@menhennitt.com.au) Received: from homiemail-a81.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a81.g.dreamhost.com (Postfix) with ESMTP id A7284A806F for ; Wed, 11 May 2016 13:14:06 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=menhennitt.com.au; h= subject:to:references:from:message-id:date:mime-version :in-reply-to:content-type:content-transfer-encoding; s= menhennitt.com.au; bh=NY8lOim/u7DTS/rcYUS6epasebc=; b=aKULIS8SCc TOu19kQ4C6BPhhE+sHhYLp9ns7HmoX7BvVk82korsknU7LSKrD3nGQOt6YBmCpU0 pXVCVFmeRaeRhpgkgQd1XAkWUSDPwsNzRONp6rH9mKgcC7JSMRhngrwes5e4r+a2 f9hyDIa+//XYzZB9/418+TZkA52Pq3W90= Received: from [203.2.73.68] (c122-107-214-88.mckinn3.vic.optusnet.com.au [122.107.214.88]) (using TLSv1 with cipher DHE-RSA-AES128-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: graham@menhennitt.com.au) by homiemail-a81.g.dreamhost.com (Postfix) with ESMTPSA id 34FB8A806C for ; Wed, 11 May 2016 13:14:05 -0700 (PDT) Subject: Re: boot fails "Can't stat /dev/da0a: No such file or directory" To: freebsd-current@freebsd.org References: <57247294.4050607@menhennitt.com.au> <57266A7E.1070500@menhennitt.com.au> <20160503084251.GB5892@brick> <57286DC6.3010403@menhennitt.com.au> <20160503095925.GC5892@brick> <4ec4e751-5ac7-d793-9356-5af4327b824d@menhennitt.com.au> <20160505114123.GA1289@brick> <20160510084612.GA2215@brick> From: Graham Menhennitt Message-ID: <9f297325-a75c-8f60-05fa-8d7edd4e999b@menhennitt.com.au> Date: Thu, 12 May 2016 06:14:03 +1000 User-Agent: Mozilla/5.0 (X11; FreeBSD amd64; rv:45.0) Gecko/20100101 Thunderbird/45.1.0 MIME-Version: 1.0 In-Reply-To: <20160510084612.GA2215@brick> Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.22 Precedence: list List-Id: Discussions about the use of FreeBSD-current List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Wed, 11 May 2016 20:14:13 -0000 On 10/05/2016 06:46 PM, Edward Tomasz Napiera=C5=82a wrote: > On 0508T0944, Graham Menhennitt wrote: >> On 5/05/2016 09:41 PM, Edward Tomasz Napiera=C5=82a wrote: >>> On 0505T1847, Graham Menhennitt wrote: >>>> On 3/05/2016 07:59 PM, Edward Tomasz Napiera=C5=82a wrote: >>>>> On 0503T1922, Graham Menhennitt wrote: >>>>>> On 3/05/2016 06:42 PM, Edward Tomasz Napiera=C5=82a wrote: >>>>>>> On 0502T0643, Graham Menhennitt wrote: >>>>>>>> On 30/04/2016 06:53 PM, Graham Menhennitt wrote: >>>>>>>>> Hi all, >>>>>>>>> >>>>>>>>> I have a USB disk that I use for backup. Up till now, it's moun= ted >>>>>>>>> without any problems at boot time. After updating to -current a= s of >>>>>>>>> yesterday, it doesn't mount and causes the boot to fail. >>>>>>>>> >>>>>>>>> My /etc/fstab looks like: >>>>>>>>> >>>>>>>>> # Device Mountpoint FStype Options Dump Pass= # >>>>>>>>> >>>>>>>>> /dev/ada0s1a / ufs rw 1 1 >>>>>>>>> /dev/ada0s1b none swap sw 0 0 >>>>>>>>> /dev/da0a /backup ufs rw,late 1 1 >>>>>>>>> >>>>>>>>> >>>>>>>>> I tried adding the "late" to fix the problem, but it doesn't he= lp. >>>>>>>>> >>>>>>>>> The error message is: >>>>>>>>> >>>>>>>>> /dev/ada0s1a: clean... >>>>>>>>> Can't stat /dev/da0a: No such file or directory >>>>>>>>> Unknown error; help! >>>>>>>>> ERROR: ABORTING BOOT (sending SIGTERM to parent)! >>>>>>>>> >>>>>>>>> >>>>>>>>> (hand transcribed - maybe typos) >>>>>>>>> >>>>>>>>> Can anybody help, please. >>>>>>>>> >>>>>>>>> Thanks, >>>>>>>>> Graham >>>>>>>> Sorry, I forgot to mention... >>>>>>>> >>>>>>>> I commented out that line from fstab which allows the boot to co= mplete. >>>>>>>> I can then manually mount it without any problems. It looks like= the >>>>>>>> device doesn't get created early enough. >>>>>>> Have you run mergemaster after upgrade? In particular, do you ha= ve >>>>>>> the current version of /etc/rc.d/mountcritlocal? >>>>>>> >>>>>> Thanks for replying, Edward. Yes I've installed that file. The del= ay >>>>>> that Dave told me about has fixed the problem. >>>>> Still, it would be nice if this worked by default. The updated >>>>> mountcritlocal script should wait for USB to release root tokens >>>>> if the mount initially fails, >>>>> >>>> Ok, I tried to do a bit of diagnosis here. I took out the delay from >>>> /boot/loader.conf and I added "set -x" to the top of >>>> /etc/rc.d/mountcritlocal (before the start of the mountcritlocal_sta= rt() >>>> function definition). I then rebooted. I didn't see any shell comman= d >>>> output from the "set -x" before the error occurred. That means that = the >>>> error is happening before /etc/rc.d/mountcritlocal is being read. >>>> >>>> When I put the delay back in and boot, I see the shell commands afte= r >>>> the filesystems are mounted (and, hence, after the error would have >>>> occurred if the delay wasn't there). So I don't think mountcritlocal= is >>>> going to help me. >>>> >>>> I'm not sure what else to try. if you have any suggestions, I can do >>>> some experimenting. Is there a simple way to capture the output from= the >>>> rc.d scripts? >>> Huh, you've nailed it - it was a different script, /etc/rc.d/fsck; it >>> runs before mountcritlocal. Could you try the following patch? You = can >>> apply it directly to /etc/rc.d: >> Yep, that worked. I saw >> Can't stat /dev/da0a: No such file or directory >> Then a bit later >> Restarting file system checks >> which succeeded. >> >> Thank you, Edward. > Thanks for testing; committed in a slightly different form as r299349. > I've svn'd to latest and run mergemaster. All working. Thanks again, Edwa= rd. Graham