From owner-freebsd-current@FreeBSD.ORG Tue Aug 23 16:46:11 2005 Return-Path: X-Original-To: current@freebsd.org Delivered-To: freebsd-current@FreeBSD.ORG Received: from mx1.FreeBSD.org (mx1.freebsd.org [216.136.204.125]) by hub.freebsd.org (Postfix) with ESMTP id 0B78F16A41F for ; Tue, 23 Aug 2005 16:46:11 +0000 (GMT) (envelope-from oberman@es.net) Received: from postal1.es.net (postal1.es.net [198.128.3.205]) by mx1.FreeBSD.org (Postfix) with ESMTP id 9B0D943D45 for ; Tue, 23 Aug 2005 16:46:10 +0000 (GMT) (envelope-from oberman@es.net) Received: from ptavv.es.net ([198.128.4.29]) by postal1.es.net (Postal Node 1) with ESMTP (SSL) id IBA74465; Tue, 23 Aug 2005 09:46:08 -0700 Received: from ptavv (localhost [127.0.0.1]) by ptavv.es.net (Tachyon Server) with ESMTP id 3048A5D07; Tue, 23 Aug 2005 09:46:09 -0700 (PDT) To: Tobias Roth In-reply-to: Your message of "Tue, 23 Aug 2005 08:39:28 +0200." <20050823063928.GA16469@droopy.unibe.ch> Date: Tue, 23 Aug 2005 09:46:09 -0700 From: "Kevin Oberman" Message-Id: <20050823164609.3048A5D07@ptavv.es.net> Cc: current@freebsd.org Subject: Re: Unable to do mdconfig(8) early in boot X-BeenThere: freebsd-current@freebsd.org X-Mailman-Version: 2.1.5 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: Tue, 23 Aug 2005 16:46:11 -0000 > Date: Tue, 23 Aug 2005 08:39:28 +0200 > From: Tobias Roth > > On Mon, Aug 22, 2005 at 03:27:45PM -0700, Kevin Oberman wrote: > > I just updated my current system which had last been updated about > > Aug. 7. Suddenly profile.sh fails to run because mdconfig is returning > > an error: > > mdconfig: ioctl(/dev/mdctl): Read-only file system > > > > It looks like it is not writable until after root is done. Why? > > I haven't had time to try profile.sh on current, so I did't run into > this problem yet. Can you pinpoint on which of the mdconfig or mdmfs > statements this is happening? It is the vnodeloopback="`mdconfig -a -t vnode -f ${profile_prefix}/${loc}... line at about line 208. I booted up in single-usr and it fails. I do 'rc.d/fsck start' and it fails. (This is where it normally runs.) I then do 'rc.d/root start' and it succeeds, so -current wants root to be mounted R/W. (That is all rc.d/root does.) > > > Right now, profile.sh requires fsck and must be run before root. It > > seems that starting it after root and before mountcritlocal works, but > > there may be some subtleties that I am missing that makes this a bad > > idea. > > I think moving it after root would work. The only reason it is before > root is that it historically was put as early as possible in the rcorder > chain, so that it gets maximum control over the boot process. Only later > it was moved after fsck to avoid problems that showed up after an > unclean shutdown. The reason it is between fsck and root should be > interpreted as "after fsck, but as early as possible", and not "after > fsck, and before root". I have after root and before mountcritlocal and it is working fine. I'd really want it before mounting devices so that I could use different fstabs in different profiles, so before mountcritlocal does the job. > > Is the inability to create an md device before root has run a problem or > > something expected? > > I'd like to investigate this before having profile.sh executed after root > as default. After all, it is supposed to work on read-only root devices, > and the behaviour you experienced may be a bug in profile.sh. > > As a side note, how is profile.sh running on -CURRENT? I had a lot of > problems with 6.1BETA: dhclient issues, problems with hangs due to > unexpected nic status changes. But then, I not only updated to 6 at > that time, I am also using a different laptop with a different nic > (before: fxp, now: bge). I'll try updating to BETA2 to see if this > improves anything. Beta1 had some nasty DHCP issues depending on which interface you were using. Sam has done a lot on both dhclient and patching the more popular drivers and it's working much better for me (wi, fxp). Try Beta3 (should be out today, I hope) and I think it will be OK, although there may be some work required on suspend/resume. -- R. Kevin Oberman, Network Engineer Energy Sciences Network (ESnet) Ernest O. Lawrence Berkeley National Laboratory (Berkeley Lab) E-mail: oberman@es.net Phone: +1 510 486-8634