*BSD News Article 19021


Return to BSD News archive

Newsgroups: comp.os.386bsd.questions
Path: sserve!newshost.anu.edu.au!munnari.oz.au!network.ucsd.edu!swrinde!cs.utexas.edu!uunet!psinntp!newstand.syr.edu!rodan.acs.syr.EDU!dhhoveme
From: dhhoveme@rodan.acs.syr.EDU (David H. Hovemeyer)
Subject: newfs travails
Message-ID: <1993Jul29.210143.29664@newstand.syr.edu>
Keywords: NetBSD newfs
Organization: Syracuse University, Syracuse, NY
Date: Thu, 29 Jul 93 21:01:42 EDT
Lines: 60

    I have finally gotten my second IDE drive working under NetBSD.
Here is a brief summary of my experience:

Disklabelling:
    Working out the disklabel on paper was (interestingly) the
easiest part of the process.  Section 2.5.1.1 of the FAQ told me
everything I needed to know.  Using the installation generated entry
for my 1st drive as a guide, I created an entry in /etc/disktab.  So
far, so good.  disklabel created the first hurdle.  When I tried

# disklabel -w -r wd1 cp30174e

I got the message

Bootstrap doesn't leave room for disk label

After I posted this problem, a kind netter identified the problem
as corrupted /usr/mdec files.  Sure enough, after copying bootwd
and wdboot from /usr/mdec on the 1st install disk, this problem
cleared up.

Using newfs:

    After the disklabel was written, I tried

# newfs /dev/wd1a

which caused the machine to promptly hang.  The man page was not
particularly helpful.  Here is how I solved this problem.
    After suspecting that I had a bum copy of newfs (and making
a post suggesting this) it occurred to me that newfs must have
worked during the install process (considering that disk #1 was
up and running), perhaps the install script would shed some light
on my problem.  Sure enough, here is the line initializing the
root filesystem:

newfs /dev/r${drivename}a $name

Tracing back in the script, I found that name contains the label
name written to /etc/disktab.  I then tried

# newfs /dev/rwd1a cp30174e

which proceeded without a hitch.  After

# fsck /dev/rwd1a

I was all done.
    The reason I am posting this is that the syntax for newfs
is not especially clear in the FAQ (section 2.5.1.1).  Where it
mentions "newfs /dev/rwd?x" it really ought to say
"newfs /dev/rwd?x <drivetype>", if my experience is a good
indication of the practice of using newfs.  Otherwise the FAQ
is excellent.
    Now I just need to decide what to do with the extra 170 megs.

Dave

--
dhhoveme@rodan.acs.syr.edu