Subject: Re: Config ...
To: None <tech-kern@netbsd.org>
From: Eduardo E. Horvath <eeh@one-o.com>
List: tech-kern
Date: 08/21/1998 12:32:07
On Fri, 21 Aug 1998, Matthew Jacob wrote:

> > You don't want to have to depend on anything to get into single-user mode.
> > In fact you don't want to have to even mount the root partition
> > read/write.
> 
> I'm not worried *too* much about single-user as you really don't have
> anything mounted yet- you just know (via the current config mechanism)
> which device instance (Umm- I haven't checked single user nfs on this,
> someone correct me if this is wrong) inside it takes to read and write 
> blocks, filesystems, etc... The trick here is in getting the names
> redone on the way out of single user. Currently this requires that
> /etc/fstab is correct, and yes, this is a read-only mount. I fix
> this regularly by forcemounting the new 'correct' root manually
> and editting fstab when I change locations of the disk. I see
> nothing wrong in principle in automating this operation, either
> in the rewriting of fstab or in requiring a VFS mount on the
> way out of single user in order to get the unique names in
> fstab matched up to the actual wiring underneath.

Problem #1: you need to have the device nodes available to mount
the root partition R/W by hand to edit the fstab.  You need to have
the root partition mounted R/W to generate the device nodes to mount the
root partition R/W to generate the device nodes....  Catch 22.

Problem #2: The primary use for single-user mode is to run fsck because
Something Bad Happened (TM) to a disk.  You need the device nodes for
that.  You don't want to be forced to mount your root partition R/W to
generate the device nodes to fsck the possibly corrupted root partition
because your root partition might be corrupt and changing it is not a safe
operation.

=========================================================================
Eduardo Horvath				eeh@one-o.com
	"I need to find a pithy new quote." -- me