Subject: README: setroot changes that affect you!
To: None <current-users@NetBSD.ORG>
From: Jason Thorpe <thorpej@nas.nasa.gov>
List: current-users
Date: 01/30/1997 23:25:11
Ok, now that I have your attention... :-)
I've just committed a rather large number of changes that affect every
port in the source tree. The relevant entries from doc/CHANGES:
Change NFSCLIENT -> NFS. We "mount -t nfs", and the vfs ops
are "nfs_vfsops". [thorpej 970130]
Implement machine-indepdendent mountroothook code, derived
from similar code implemented by me in the sparc
and x68k ports. This is used to execute a special
operation before a device is mounted as root (such
as ejecting a floppy, and prompting for a new disk.)
[thorpej 970130]
Implement a new machine-independent setroot() function, which
sets the root/swap device and, optionally, the
root file system. "options GENERIC" is obsolete.
[thorpej 970130]
Implement a new, fault-tolerant vfs_mountroot(), which is
capable of determining the root file system type
if the operator didn't specify one in the kernel
configuration file. Change file system mountroot
functions to return errors properly, rather than
panic'ing. If the file system can not be mounted,
the operator will be prompted for a root device
and file system type, or be given the option to halt
the system. [thorpej 970130]
Change config(8) to support generic vfs_mountroot() and
machine-independent setroot(). File systems are
now configured with the "file-system" keyword.
Kernel configurations must now always specify
a root device, which may be wildcarded ("?").
Operator may specify a root file system type,
as well. [thorpej 970130]
The first item... NFSCLIENT -> NFS. The file system name is "NFS".
Everyone, please note that to use the NFS file system, you must
configure "file-system NFS" into your kernel config file. The NFSCLIENT
option no longer has any meaning.
The second item... mountroothooks. Two ports used an identical set
of code to execute special instructions before mounting the root
file system. This has been made MI so that all ports can use it.
Third item... Every port in the source tree had it's own, slightly
different way of selecting the root device. The "best" implementations
of this function were those used in the alpha, hp300, sparc, mac68k,
and mvme68k ports (they were all derived from the same code base).
I have abstracted that code, and placed it in a common file. All ports
now have consistent behavior. Note, this new code completely obsoletes
any notion of "options GENERIC". It no longer has any meaning. Also
note that all kernels now understand RB_ASKNAME, and RB_ASKNAME will
also prompt for the root file system type.
...which brings me to the fourth item. The root file system mount
process is now much more fault-tolerant. If the root mount fails,
the operator will be prompted for a new root device and file system
type. In addition, if the root file system is wildcarded in the
kernel configuration file, the kernel will attempt to mount all
statically-compiled file systems that have mountroot funtions
until one succeeds. Obvious uses of this are "generic" kernels
that support booting from CD-ROM.
...and, last but not least, there were a fair number of changes to
config(8) to support all of this. First of all, file systems are
compiled into the kernel with a new "file-system" keyword:
# File systems
file-system FFS # Berkeley Fast Filesystem
file-system MFS # memory file system
file-system NFS # Network File System
file-system CD9660 # ISO 9660 + Rock Ridge file system
file-system FDESC # /dev/fd
file-system KERNFS # /kern
file-system PROCFS # /proc
file-system UNION # union file system
Other file system options, such as NFSSERVER, FIFO, and QUOTA,
remain as before:
# File system options
options NFSSERVER # Network File System server
options FIFO # FIFOs; RECOMMENDED
In addition, the root device specification has changed somewhat.
Now, a "root" spec is _required_, but may be wildcarded. Optionally,
the root file system type can be specified or wildcarded. An
unspecified type is the same as a wild carded type. Specification
of swap and dumps remains as before. So, the major differences you'll
notice... the following:
config netbsd swap generic
config netbsd root on nfs
have become:
config netbsd root on ? type ?
config netbsd root on ? type nfs
Note also that you can e.g. nail down the network interface used
for NFS root:
config netbsd root on le0 type nfs
To wrap this all up, you will need to rebuild config(8) in order
to compile kernels. These changes have been well tested, but it's
always possible that something falls though the cracks. If you have
any problems, please send a bug report w/ send-pr, and I'll address it.
If you have any questions, please post them here, and I'll answer them
as quickly as I can.
Ciao!
Jason R. Thorpe thorpej@nas.nasa.gov
NASA Ames Research Center Home: 408.866.1912
NAS: M/S 258-6 Work: 415.604.0935
Moffett Field, CA 94035 Pager: 415.428.6939