Subject: Re: I am booting from the disk, but...
To: None <raub@kushana.aero.ufl.edu, pappires@vortex.leg.ufrj.br>
From: Gordon W. Ross <gwr@mc.com>
List: port-sun3
Date: 01/09/1996 13:59:45
> From: raub@kushana.aero.ufl.edu (Mauricio Tavares)
> Date: Tue, 9 Jan 1996 10:38:50 -0500 (EST)

> While shopping for shruberries, Paulo Alexandre Pinto Pires pondered:
> > 
> [...]
> > ncr5380_command: short transfer: wanted 10 got 6.
> > si(0,0,0)-28,0,0,2b,9c,9d,0,0,1,0-
> > sd0(si0:0:0): medium error, info = 2858166 (decimal), data = 00 00 00 00 11 00
> > 00 20 00 0d
> > 
> 	I've got a similar error yesterday when I was finally getting 
> NetBSD to work with my Sun 3/50.  It turned out to be a disagreement 
> between what the docs I had on the drive said and what NetBSD think the 
> drive was.

This is a common annoyance:  Disk manufacturers usually specify the
"RAW, unformatted" capacity, because that's the largest.  Another
trick I've seen is to define MB as (10**6) instead of (2**20).
(The busineess of quoting specifications smells like fraud!)

> I was using a CDC 94161-155 FH drive -- I am still waiting for my 1GB 
> beast.  Hopefully it will be here tomorrow -- as sd0.  The documentation 
> for the drive, found in Seagate's ftp site, claims the drive has 155MB 
> formatted capacity.  I set the drive parameters using edlabel according 
> to that.  No problem.  I copied moniroot to /dev/rsd0b.  Still no 
> problem.  I rebooted to run miniroot.  No problem.  Then I ran the 
> install program.  When it was mounting the partitions, it barked.  I 
> decided to run newfs in /dev/rsd0a (my root).  It worked fine.  Then, I 
> tried it in /dev/rsd0f (/usr), it barked saying that notorious "wanted 10 
> got 6" message.  

Interesting!  Aparently, some drives stop reading the SCSI command
block as soon as they get the block number, if the block number is
found to be out of range.  ("I know all I need to know; go away!",
says the drive.)

> As I kept trying different partitions to find out what was going on, I 
> eventually began paying attention to the boot messages.  One of those 
> claimed the drive to be 148MB instead of 155.  So, just for the fun of 
> it, I repartitioned it using that value.  Guess what?  It worked!
> 
> Moral of the story:  the 3/50 seems to know about hard drives better than 
> their manufacturers.  Go figure. :P

The SCSI disk driver asks the disk for its capacity, and the result
should be completely authoritative (more so than paper documentation).

Thanks for the note!

Gordon Ross