Subject: Re: root on sd10a - what??
To: None <mouse@Collatz.McRCIM.McGill.EDU>
From: Gordon W. Ross <gwr@mc.com>
List: port-sun3
Date: 12/21/1995 09:36:54
> Date: Wed, 20 Dec 1995 07:04:26 -0500
> From: der Mouse <mouse@Collatz.McRCIM.McGill.EDU>

> But the stupid thing is brain-dead and insists on being at SCSI ID 5 or
> 6.  Now, half the point of this is to make it bootable, as a crash
> recovery disk.  So I built a kernel with the hard-wiring of sd0-3,
> st0-1, cd0 yanked out, just "sd* at scsibus? target ? lun ?" and
> similar for st and cd.  Booted it from the zip disk, and...

> si0 at vmes0 addr 0xff200000 level 2 vector 0x40
> scsibus0 at si0
> si0 targ 5 lun 0: <IOMEGA, ZIP 100, N*32> SCSI2 0/direct removable
> sd0 at scsibus0sd0(si0:5:0): illegal request, data = 00 00 00 00 24 00 00 00 00 00 ff fe 01 02 2d 00 00
> sd0: could not mode sense (4); using fictitious geometry
> : 96MB, 96 cyl, 64 head, 32 sec, 512 bytes/sec
> vmel0 at mainbus0
> rd0 at mainbus0
> rd1 at mainbus0
> root on sd10a
> swap on sd10b
> dump on sd10b
> panic: cannot mount root
> Stopped at      _Debugger+0x6:  unlk    a6
> db> 
> 
> Why did it decide it wanted to put root and swap on sd10, of all
> places??  If I boot it with -a, and tell it to use sd0a/sd0b, it works.
> The kernel is configured "config netbsd swap generic".

That is because the dynamic assignment of sd* numbers does not match
the fixed mapping the PROM passes to the kernel.  You can work around
that by booting with "-a" and specifying sd0 for everything.

NetBSD could use some way for bootable device drivers (like sd.c)
to make available devices known to port-specific swapgeneric code,
including things like what the real target ID was, or which sub-
device on an xy controller, etc.  Then, swapgeneric could use the
info from the PROM to reliably determine which kernel driver best
matches the parameters used by the PROM to specify that device.

That's a project for someone...

Gordon