Subject: Re: problems with 1024 byte/sector disks?
To: Jon Buller <jonb@metronet.com>
From: Michael L. Hitch <osymh@lightning.oscs.montana.edu>
List: current-users
Date: 06/12/1996 08:38:59
On Jun 11, 11:22pm, Jon Buller wrote:
} I have an old ST296N drive that I wanted to use as an emergency
} boot disk, in case I had a bad crash on my real drive.  It will
} give me an extra 5MB or so if I format it with 1024 byte sectors
} instead of 512 byte sectors.  However, when I did that, I had no
} problems writing the disklabel, getting a boot image on it, etc.
} but when I tried to newfs a root partition on it, I got an error
} that I won't be able to decipher until I dig into the source.  I
} am asking the group if this is a known problem, or if there are
} easy work arounds, so as not to waste too much time with things
} that might already be in the queue...  If nothing turns up, I'll
} probably waste the extra 5MB and just reformat it.  What follows

  NetBSD will not work with 1024 byte sectors (or any size other
than 512 bytes).  The "block size" is used inconsistently in various
places in the kernel.  The page and swap handling all assume 512
byte blocks, while newfs and the rest of the FFS stuff use the
actual physical block size.  To confuse FFS and newfs, the partition
stuff and disk drivers treat things as 512-byte blocks (if I remember
correctly).  This has been discussed before (I ran into it trying
to help someone get a MO drive working with 1024 byte sectors).  I've
been keeping patches to scsi/sd.c and scsi/cd.c that should allow
the use of non-512 byte blocks for file access, but I never did try
to do anything about paging/swapping.  The machine-dependant label
processing also required some changes - the amiga port has these, but
I don't think any other port does.

Michael

-- 
Michael L. Hitch			INTERNET:  osymh@montana.edu
Computer Consultant
Information Technology Center
Montana State University	Bozeman, MT	USA