Subject: Re: Cannot mount root partition
To: None <amiga-dev@sun-lamp.cs.berkeley.edu>
From: Michael L. Hitch <osymh@gemini.oscs.montana.edu>
List: amiga-dev
Date: 05/19/1994 13:09:15
On May 19, 10:48am,  (Cheng-Chung Song) wrote:
> >  I think the May 15 sources may still have a bug in the A3000/A2091 scsi
> >code.  Look in .../dev/ahasc.c and find the call to sbicintr(i) - that needs
> >to be changed to sbicintr(dev) if I remember right.
> 
> I did change that. Otherwise, it probably won't go that far.

  Probably not - I think it hangs the first time it tries to access the
disk using interrupts.

> After digging into the code, I find that the 'cannot mount root' were sent by
> main() in init_main.c after an unsuccessful ufs_mountroot().  I think the
> problem is probably in mountfs() where so many things can go wrong.  Is it
> possible to go this far if something's wrong in the scsi driver code.

  Yes, it is.  Some of the initial disk accesses are done without DMA or
interrupts.  These could succeed, while following accesses that use DMA
could be failing.  The mountfs() probably fails because what it is reading
doesn't appear to be a valid file system.

  If you still have your root partition setup with the DOStype 'BSDR', you
should get a message printed out when the readdisklabel routine processes
the RDB partitions.

  There used to be a slight bug in the root device selection that could
cause some confusion.  I haven't checked to see if the problem still exists
in the current kernel.  The bug is that if no root partition was found on
any disks, and a working SCSI drive was found on ID 0, it would attempt
to use drive 0 as the root, and panic because there wasn't an 'a' partition.
(If drive 0 didn't exist, the kernel would say "no suitable root found"
and halt.)  I don't know if the current kernel will still have this
behaviour - I'd have to dig through the code to see how it does things
now.

  I'm not sure what else may be causing the problem.  I don't know if
there's enough debugging code left in the new drivers to be able to
track down what may be happening.

> In my config file, I have 'config netbsd swap on generic' statement.  I wonder
> if thing will be better if I specify the root and swap partitions like
> 'config netbsd root on sd0a swap on sd0b'.

  I doubt this would make any difference.  The "swap on generic" just
uses the 'b' partition on the drive containing the 'a' partition for the
swap area.  Changing the config file shouldn't change the behaviour on
your system (assuming NetBSD is using /dev/sd0a as the root).

Michael

-- 
Michael L. Hitch			INTERNET:  osymh@montana.edu
Computer Consultant			BITNET:  OSYMH@MTSUNIX1.BITNET
Office of Systems and Computing Services
Montana State University	Bozeman, MT	USA

------------------------------------------------------------------------------