NetBSD Problem Report #3834

Received: (qmail 18421 invoked from network); 7 Jul 1997 17:43:14 -0000
Message-Id: <199707071744.TAA00682@zork.north.de>
Date: Mon, 7 Jul 1997 19:44:15 +0200 (MET DST)
From: gizmo@zork.north.de (Klaus Weber)
To: gnats-bugs@gnats.netbsd.org
Subject: fsck/mount fails while booting single-user when using ccds
X-Send-Pr-Version: 3.95

>Number:         3834
>Category:       port-i386
>Synopsis:       fsck/mount fails while booting single-user when using ccds
>Confidential:   no
>Severity:       non-critical
>Priority:       low
>Responsible:    port-i386-maintainer
>State:          closed
>Class:          change-request
>Submitter-Id:   net
>Arrival-Date:   Mon Jul 07 10:50:01 +0000 1997
>Closed-Date:    Thu Mar 27 13:49:36 +0000 2008
>Last-Modified:  Thu Mar 27 13:49:36 +0000 2008
>Originator:     Klaus Weber
>Release:        1.2
>Organization:
	none
>Environment:
System: NetBSD zork.north.de 1.2.1 NetBSD 1.2.1 (ZORK) #2: Mon Jul 7 17:24:29 MET DST 1997 gizmo@zork.north.de:/usr/src/sys/arch/i386/compile/ZORK i386


>Description:
	(this is probably a MI problem, but I can only verify it with
	 the i386 port)

	When using a ccd-device (e.g. for /usr), autobooting multi-user
	works fine, but when booting single-user, fsck and mount fail
	on the ccd-devices because no ccdconfig is called before the 
	fsck/mount command.

>How-To-Repeat:
	- Put /usr on a concatenated disk
	- Boot multi-user to verify that it works
	- Boot single-user, see fsck complain that rccd0 is not 
          configured

>Fix:
	Patch /.profile to check for /etc/ccd.conf and make it call
	'ccdconfig -Cv' if it exists (similar to what /etc/rc already
	does). (actually, do not patch /.profile directly, but rather
	/usr/src/distrib/i386/floppies/{inst,upgr}/dot.hdprofile)

	Note: This patch may not work with the new SSTO install disk, 
	but I thought I include it anyway.


	The problem of fsck(8)ing and mount(8)ing file systems is left
	to the system administrator.  It is not supposed to be done in
	/.profile.  This is especially bad, because a user with no home
	directory may use /.profile when it logs in during normal
	multi-user operation.

	The file you refer to is supposed to be overwritten by the
	/.profile in the `etc' distribution file.  Since /etc is usually
	merged manually during an upgrade, this is easy to overlook.

	This seems wrong, but it's not clear to me where the bug is.
	Perhaps making the default /.profile a symlink (rather than a
	hard link) would be sufficient.

	- mycroft

--- distrib/i386/floppies/inst/dot.hdprofile.orig	Mon Jul  7 19:02:49 1997
+++ distrib/i386/floppies/inst/dot.hdprofile	Mon Jul  7 19:04:42 1997
@@ -39,6 +39,12 @@
 if [ "X${DONEPROFILE}" = "X" ]; then
 	DONEPROFILE=YES

+	# Configure ccd devices.
+	if [ -f /etc/ccd.conf ]; then
+		echo "Configuring ccds..."
+		ccdconfig -Cv
+	fi
+
 	echo "Checking filesystems..."
 	fsck -y

--- distrib/i386/floppies/upgr/dot.hdprofile.orig	Mon Jul  7 19:03:18 1997
+++ distrib/i386/floppies/upgr/dot.hdprofile	Mon Jul  7 19:04:52 1997
@@ -39,6 +39,12 @@
 if [ "X${DONEPROFILE}" = "X" ]; then
 	DONEPROFILE=YES

+	# Configure ccd devices.
+	if [ -f /etc/ccd.conf ]; then
+		echo "Configuring ccds..."
+		ccdconfig -Cv
+	fi
+
 	echo "Checking filesystems..."
 	fsck -y

>Release-Note:
>Audit-Trail:
State-Changed-From-To: open->analyzed 
State-Changed-By: mycroft 
State-Changed-When: Tue Aug 19 10:29:36 PDT 1997 
State-Changed-Why:  
See PR for details. 
State-Changed-From-To: analyzed->suspended 
State-Changed-By: mycroft 
State-Changed-When: Thu Oct 9 22:44:29 PDT 1997 
State-Changed-Why:  
As previously explained in the PR, this really isn't a bug.  It may be `fixed' 
at some later date if we change init(8) to use a `runlevel' scheme (by running 
ccdconfig(8) at all run levels); until then, it is up to the system  
administrator to DTRT. 
Responsible-Changed-From-To: gnats-admin->port-i386-maintainer 
Responsible-Changed-By: fair 
Responsible-Changed-When: Mon Dec 28 09:52:51 PST 1998 
Responsible-Changed-Why:  
This PR is the responsibility of the portmaster, 
not the GNATS database administrator. 

From: "Erik E. Fair" <fair@clock.org>
To: NetBSD GNATS Bug Tracking System <gnats-bugs@netbsd.org>
Cc: tech-kern@netbsd.org
Subject: Re: port-i386/3834
Date: Thu, 29 Jun 2000 00:07:31 -0700

 There is another possible solution for this problem; we could declare 
 "ccd" a filesystem type, and have a mount_ccd command which 
 configures the ccd, and then looks at the ccd label to invoke the 
 next mount_* command (for FFS, LFS, etc).

 This could also work for RAIDframe.

 The upshot is that some filesystems require preparation at runtime 
 (e.g. ccd, RAIDframe, NFS, Coda, Arla), versus the ones that are 
 "just there already" like FFS, LFS, ext2fs. Perhaps our "fstab/mount" 
 system should be augmented to deal with invoking runtime prep, in 
 addition to just calling mount(2) with the right parameters.

 	just a thought,

 	Erik <fair@clock.org>

From: Greywolf <greywolf@starwolf.com>
To: "Erik E. Fair" <fair@clock.org>
Cc: NetBSD GNATS Bug Tracking System <gnats-bugs@netbsd.org>,
        tech-kern@netbsd.org
Subject: Re: port-i386/3834
Date: Thu, 29 Jun 2000 00:51:06 -0700 (PDT)

 On Thu, 29 Jun 2000, Erik E. Fair wrote:

 # The upshot is that some filesystems require preparation at runtime 
 # (e.g. ccd, RAIDframe, NFS, Coda, Arla), versus the ones that are 
 # "just there already" like FFS, LFS, ext2fs. Perhaps our "fstab/mount" 
 # system should be augmented to deal with invoking runtime prep, in 
 # addition to just calling mount(2) with the right parameters.

 I may be _way_ off base here, but I think that demodularizing the process
 would be asking for more trouble than it's worth.

 And actually, last I looked, NFS mounting doesn't need any prep --
 you only need prep if you're running an NFS server (I've been able
 to mount NFS filesystems from single-user mode with only a route).

 CCD as a filesystem isn't immediately making sense to me.  Maybe,
 as I suspect, "I lack vision".  Bear with me on that one, and if anyone
 can provide some insight into this one, I'd appreciate it.

 That notwithstanding, I stand by my opinion.  To integrate this into
 fstab/mount is just begging the Irish guy with the itchy trigger finger
 to be shooting us in the foot.  It's another thing to break/go wrong.

 # 	just a thought,
 # 
 # 	Erik <fair@clock.org>

 				--*greywolf;
 --
 NetBSD, Net Improvement.


From: "Erik E. Fair" <fair@clock.org>
To: greywolf@starwolf.com
Cc: NetBSD GNATS Bug Tracking System <gnats-bugs@netbsd.org>,
        tech-kern@netbsd.org
Subject: Re: port-i386/3834
Date: Thu, 29 Jun 2000 01:58:37 -0700

 Uh, it's a little hard to do NFS before the network is configured, 
 just like it's hard to use CCD or RAIDframe until the kernel has been 
 told what the components are. That initialization is done every time 
 the system boots, as distinct from one-time initialization like 
 "newfs" (though we have one counter-example in mount_mfs which has 
 newfs in its guts, and intializes every time).

 I'm just suggesting adding one level of indirection (a classic 
 method) to solve the problem cited in the PR, which is that in single 
 user mode, the "ccdconfig" isn't run for you already, so "mount -a" 
 or "fsck -p" will certainly fail. Add that functionality into the 
 mount/fstab system, and maybe we make it all cleaner and simpler.

 Hmm, though that does leave out the fsck step.

 	just thinking out loud,

 	Erik <fair@clock.org>

From: Andy Doran <ad@netbsd.org>
To: Greywolf <greywolf@starwolf.com>
Cc: "Erik E. Fair" <fair@clock.org>,
	NetBSD GNATS Bug Tracking System <gnats-bugs@netbsd.org>,
	tech-kern@netbsd.org
Subject: Re: port-i386/3834
Date: Thu, 29 Jun 2000 11:37:31 +0100

 Greywolf <greywolf@starwolf.com> wrote:

 > To integrate this into fstab/mount is just begging the Irish guy with the
 > itchy trigger finger to be shooting us in the foot.

 This is one of several comments I've seen you make that demonize me by means
 of attacking my nationality.

 This isn't the correct forum for expression of racist views - take it
 somewhere else or shut up.

From: Bill Studenmund <wrstuden@zembu.com>
To: "Erik E. Fair" <fair@clock.org>
Cc: NetBSD GNATS Bug Tracking System <gnats-bugs@netbsd.org>, 
    tech-kern@netbsd.org
Subject: Re: port-i386/3834
Date: Thu, 29 Jun 2000 09:30:47 -0700 (PDT)

 On Thu, 29 Jun 2000, Erik E. Fair wrote:

 > There is another possible solution for this problem; we could declare 
 > "ccd" a filesystem type, and have a mount_ccd command which 
 > configures the ccd, and then looks at the ccd label to invoke the 
 > next mount_* command (for FFS, LFS, etc).

 Well, you'd certainly also want to look at fstab. There could be multiple
 partitions on the ccd, and you might only want to mount a few of them at
 boot. :-)

 What might be better is to make "ccd" a fake partition mount point, and
 have the rc mount code catch it, and config the ccd at that point. Same
 thing would work for raidframe.

 Take care

 Bill


From: Greywolf <greywolf@starwolf.com>
To: Andy Doran <ad@netbsd.org>
Cc: "Erik E. Fair" <fair@clock.org>,
        NetBSD GNATS Bug Tracking System <gnats-bugs@netbsd.org>,
        tech-kern@netbsd.org
Subject: Re: port-i386/3834
Date: Thu, 29 Jun 2000 14:48:13 -0700 (PDT)

 On Thu, 29 Jun 2000, Andy Doran wrote:

 # Date: Thu, 29 Jun 2000 11:37:31 +0100
 # From: Andy Doran <ad@netbsd.org>
 # To: Greywolf <greywolf@starwolf.com>
 # Cc: Erik E. Fair <fair@clock.org>,
 #      NetBSD GNATS Bug Tracking System <gnats-bugs@netbsd.org>,
 #      tech-kern@netbsd.org
 # Subject: Re: port-i386/3834
 # 
 # Greywolf <greywolf@starwolf.com> wrote:
 # 
 # > To integrate this into fstab/mount is just begging the Irish guy with the
 # > itchy trigger finger to be shooting us in the foot.
 # 
 # This is one of several comments I've seen you make that demonize me by means
 # of attacking my nationality.

 Taking this off line.

 # 
 # This isn't the correct forum for expression of racist views - take it
 # somewhere else or shut up.
 # 


 				--*greywolf;
 --
 BSD: The power to Connect


From: Andy Doran <ad@netbsd.org>
To: tech-kern@netbsd.org
Cc: Greywolf <greywolf@starwolf.com>, gnats-bugs@netbsd.org, fair@clock.org
Subject: [ad@netbsd.org: Re: port-i386/3834]
Date: Fri, 30 Jun 2000 12:00:46 +0100

 I retract what I previously said here - apologies to all involved, especially
 Greywolf.

 I percieved something that wasn't there. The error was mine and mine alone.

 Sorry, folks.
State-Changed-From-To: suspended->closed
State-Changed-By: dholland@NetBSD.org
State-Changed-When: Thu, 27 Mar 2008 13:49:36 +0000
State-Changed-Why:
While we now have /etc/rc.d, changing things around to run /etc/rc.d/ccd
automatically when entering single-user mode would be a mistake - among
other things, the reason you're booting single user might be to fix a
borked ccd.conf. So this isn't really a bug and isn't going to be "fixed".


>Unformatted:

NetBSD Home
NetBSD PR Database Search

(Contact us) $NetBSD: query-full-pr,v 1.39 2013/11/01 18:47:49 spz Exp $
$NetBSD: gnats_config.sh,v 1.8 2006/05/07 09:23:38 tsutsui Exp $
Copyright © 1994-2007 The NetBSD Foundation, Inc. ALL RIGHTS RESERVED.