Subject: Re: BIG Problem
To: Grant Stockly <gussie@stockly.com>
From: Bill Studenmund <wrstuden@nas.nasa.gov>
List: port-i386
Date: 08/02/1999 18:54:04
On Mon, 2 Aug 1999, Grant Stockly wrote:

> I don't know when the problem started, but I can't use my NetBSD hard drive
> anymore.
> 
> I'd just got a Packard Bell "Multimedia" computer (used) and tried to move
> the 230MB IDE drive from my older 486 to this new PB 486.  No matter what
> BIOS settings, it would alaways say "rwd0a isn't a character device".
> 
> Its never done this on my older 486DX-20 (PB is 486DX-66) but I just moved
> the drive from the Packard Bell back to the older 486.
> 
> Now, the older 486 does exactly what the PB did.
> 
> Transcript of drive now on older 486 (ran perfect for 2 months).
> ...
> ...
> ...
> root on wd0a dumps on wd0b
> root file system type: ffs
> swapctl: adding /dev/wd0b as swap device priority 0
> Automatic boot in progress: starting file system checks.
> /dev/rwd0a is not a character device
> /dev/rwd0a is not a character device
> /dev/wd0a is not a character device
> /dev/wd0a is not a character device
> /dev/wd0a: UNEXPECTED INCONSISTENCY: RUN fsck_ffs MANUALLY
> Automatic file system check failed: help!
> Enter pathname of shell or RETURN for sh: {RETURN}
> # {fsck_ffs /dev/rwd0a}
> /dev/rrwd0a (No such file or directory)Can't stat /dev/rrwd0a
> /dev/rwd0a is not a character device
> CONTINUE? [yn] {y}
> 
> Can't open /dev/rwd0a: Device not configured
> # {fsck_ffs /dev/wd0a}
> /dev/rwd0a is not a character device
> /dev/wd0a is not a character device
> CONTINUE? [yn] {y}
> 
> Can't open /dev/wd0a: Device busy
> # {cat /etc/fstab}
> /dev/wd0a       /       ffs       rw       1 1
> /dev/wd0b       none    swap      sw       0 0
> /dev/wd0e       /usr    ffs       rw       1 2
> /kern           /kern   kernfs    rw

I think the device nodes in /dev have gotten corrupted.

Do an ls -l /dev/*wd0* and look at what you see. I see something like:

crw-r-----  1 root  operator  3, 0 Dec 16  1997 /dev/rwd0a
crw-r-----  1 root  operator  3, 1 Dec 16  1997 /dev/rwd0b
crw-r-----  1 root  operator  3, 2 Dec 16  1997 /dev/rwd0c
crw-r-----  1 root  operator  3, 3 Dec 16  1997 /dev/rwd0d
crw-r-----  1 root  operator  3, 4 Jul  8 11:44 /dev/rwd0e
crw-r-----  1 root  operator  3, 5 Jul  8 11:44 /dev/rwd0f
crw-r-----  1 root  operator  3, 6 Feb  1  1999 /dev/rwd0g
crw-r-----  1 root  operator  3, 7 Dec 16  1997 /dev/rwd0h
brw-r-----  1 root  operator  0, 0 Dec 16  1997 /dev/wd0a
brw-r-----  1 root  operator  0, 1 Jun  4 15:24 /dev/wd0b
brw-r-----  1 root  operator  0, 2 Dec 16  1997 /dev/wd0c
brw-r-----  1 root  operator  0, 3 Dec 16  1997 /dev/wd0d
brw-r-----  1 root  operator  0, 4 Dec 16  1997 /dev/wd0e
brw-r-----  1 root  operator  0, 5 Jan 25  1999 /dev/wd0f
brw-r-----  1 root  operator  0, 6 Dec 16  1997 /dev/wd0g
brw-r-----  1 root  operator  0, 7 Dec 16  1997 /dev/wd0h
^^                            ^^^^

The dates aren't important... Just the info in the indicated columns.

boot single user and then mount /kern. If there's a /kern/rrootdev node,
use it for fsck (fsck /kern/rrootdev).

Good luck!

Take care,

Bill