Subject: Re: Supporting sector size != DEV_BSIZE
To: Bill Studenmund <wrstuden@netbsd.org>
From: Trevin Beattie <trevin@xmission.com>
List: tech-kern
Date: 06/04/2002 18:42:57
Oops!

>At 09:49 AM 6/4/2002 -0700, Bill Studenmund wrote:
>>Did you try compiling a NetBSD kernel (and userland) with DEV_BSIZE set to
>>2048?
>>
>>That's the supported way of handling 2k-sector disks. And unless we broke
>>it, it works (and has worked for YEARS).
>
>I do'ed it just now.  When I booted it, after the rest of the
configuration messages, here's what I got:
>
>boot device: wd0
>root on wd0a dumps on wd0b
>mountroot: trying msdos...
>mountroot: trying cd9660...
>mountroot: trying ffs...
>no file system for wd0 (dev 0x0)
>cannot mount root, error = 79
>root device (default wd0a): _
>
>kewl!

When I did that, I had neglected to remove the patches I had made to the
ffs file system.  So the results were skewed.  Sorry about that.

I just built NetBSD again in a separate source tree, where the only change
made was "#define DEV_BSHIFT 11" (in i386/include/param.h).  Here's what I
should have reported:

boot device: wd0
root on wd0a dumps on wd0b
mountroot: trying msdos...
kernel: integer divide fault trap, code=0
Stopped in pid 0 (swapper) at   bounds_check_with_label+0xdb:   divl
%ebx,%eax
db> _

Not quite as kewl, but something about that function name seems vaguely
familiar...

(hint: line 511)

-----------------------
Trevin Beattie          "Do not meddle in the affairs of wizards,
trevin@xmission.com     for you are crunchy and good with ketchup."
      {:->                                     --unknown