Subject: NeXT formatted disks (was Re: next68k port status?)
To: Darrin B. Jewell <dbj@NetBSD.org>
From: Michael Wolfson <michael@nosflow.com>
List: port-next68k
Date: 10/16/2003 21:16:44
On Thursday, October 16, 2003, at 06:27  AM, Darrin B. Jewell wrote:

> NeXT used 1024 byte sectors by default, but although i'm pretty
> sure that by NeXTstep 3.3 at least it could use filesystems with
> other sector sizes.

Well, I can confirm that.  I plugged a new disk into NeXTSTEP 3.3 and 
it newfs'ed it and set it up as a 512 byte/sector disk.  It did not do 
a low level format.

 From the NeXTSTEP dmesg:
  SCSI 53C90A Controller, Target 7, as sc0 at 0x2114000
  SEAGATE ST51080N Rev 0958 as sd0 at sc0 target 0 lun 0
    Disk Label: Disk
    Disk Capacity 1030MB, Device Block 512 bytes
  QUANTUM FIREBALL1080S Rev 1Q04 as sd1 at sc0 target 2 lun 0
    Disk Label: Fubar
    Disk Capacity 1042MB, Device Block 512 bytes

The interesting thing is that to the OS (NeXTSTEP), it believed that 
they were 1024 byte sectors.  In particular /etc/disktab says that the 
only sector size supported is 1024 bytes (DEV_BSIZE).  Also, the 
disklabel shows that it's just like NetBSD:  fsize is 1024 and bsize is 
8192.

And, when NetBSD probes these disks:
sd0 at scsibus0 target 0 lun 0: <SEAGATE, ST51080N, 0958> disk fixed
sd0: 1030 MB, 4826 cyl, 4 head, 109 sec, 512 bytes/sect x 2109840 
sectors
sd0: async, 8-bit transfers
sd1 at scsibus0 target 2 lun 0: <QUANTUM, FIREBALL1080S, 1Q04> disk 
fixed
sd1: 1042 MB, 3835 cyl, 4 head, 139 sec, 512 bytes/sect x 2134305 
sectors
sd1: async, 8-bit transfers

Still 512 bytes/sector.

My vaguely educated guess is that they just hid that layer of 
complexity and called the "sector" size of the disk 1024 bytes.

I'd be happy to send you a sample files system for analysis if you 
wanted to support the NeXT filesystem.

   -- MW