Subject: BIOS drive cylinder limits?
To: None <port-cobalt@netbsd.org>
From: Chas Posinoff <wkm00jtd02@sneakemail.com>
List: port-cobalt
Date: 08/13/2003 13:47:42
This is a multi-part message in MIME format.
--------------090807020902070207040706
Content-Type: text/plain; charset=us-ascii; format=flowed
Content-Transfer-Encoding: 7bit

Hi -

I was just noticing that on my Qube2 the BIOS, fdisk, and disklabel all 
report discrepencies in the number of cylinders available and in use on 
my WD300 "30.0 GB" disk.

I am setting this machine up for deployment soon, and don't want to run 
into issues down the road when I try to use the higher numbered 
cylinders as the disk fills up.

In short:

    * the kernel reports 16383 cylinders making up a 28629 MB drive
    * fdisk says cylinders 195 - 823 make up a 28533MB partition which
      enloses my:
    * disklabel that reports a partition spanning the ~13G -- ~22G
      portion of the disk as spanning Cyl. 13699 - 22021.
    * and i haven't even labeled the rest of the disk yet

Can someone please explain what is going on?

I've attached the commands' results.

Chas

--------------090807020902070207040706
Content-Type: text/plain; x-mac-type="0"; x-mac-creator="0";
 name="cylinders.txt"
Content-Transfer-Encoding: 7bit
Content-Disposition: inline;
 filename="cylinders.txt"

# dmesg | grep wd
wd0 at pciide0 channel 0 drive 0: <WDC WD300AB-00BVA0>
wd0: drive supports 16-sector PIO transfers, LBA addressing
wd0: 28629 MB, 16383 cyl, 16 head, 63 sec, 512 bytes/sect x 58633344 sectors
wd0: 32-bit data port
wd0: drive supports PIO mode 4, DMA mode 2, Ultra-DMA mode 5 (Ultra/100)
wd0(pciide0:0:0): using PIO mode 4, Ultra-DMA mode 2 (Ultra/33) (using DMA data transfers)

# fdisk wd0
Disk: /dev/rwd0d
NetBSD disklabel disk geometry:
cylinders: 16383 heads: 16 sectors/track: 63 (1008 sectors/cylinder)

BIOS disk geometry:
cylinders: 16383 heads: 16 sectors/track: 63 (1008 sectors/cylinder)

Partition table:
0: sysid 131 (Linux native)
    start 1, size 64404 (31 MB), flag 0x0
        beg: cylinder    0, head   0, sector  2
        end: cylinder   63, head  14, sector 19
1: sysid 130 (Linux swap or Prime or Solaris)
    start 64404, size 132386 (64 MB), flag 0x0
        beg: cylinder   63, head  14, sector 19
        end: cylinder  195, head   3, sector 41
2: sysid 169 (NetBSD)
    start 196790, size 58436554 (28533 MB), flag 0x0
        beg: cylinder  195, head   3, sector 42
        end: cylinder  823, head  15, sector 63
3: <UNUSED>

# disklabel wd0
# /dev/rwd0d:
type: ESDI
disk: WDC WD300AB-00BV
label: fictitious
flags:
bytes/sector: 512
sectors/track: 63
tracks/cylinder: 16
sectors/cylinder: 1008
cylinders: 16383
total sectors: 58633344
rpm: 3600
interleave: 1
trackskew: 0
cylinderskew: 0
headswitch: 0		# microseconds
track-to-track seek: 0	# microseconds
drivedata: 0 

8 partitions:
#        size    offset     fstype  [fsize bsize cpg/sgs]
 a:   8388608   5420670     4.2BSD   2048 16384   328   # (Cyl. 5377*- 13699*)
 b:    132386     64404       swap                      # (Cyl.   63*- 195*)
 c:  58436554    196790     unused      0     0         # (Cyl.  195*- 58167)
 d:  58633344         0     unused      0     0         # (Cyl.    0 - 58167)
 e:     64403         1 Linux Ext2      0     0         # (Cyl.    0*- 63*)
 f:   4196994    196790     4.2BSD   2048 16384   330   # (Cyl.  195*- 4358*)
 g:   1026886   4393784     4.2BSD   1024  8192    86   # (Cyl. 4358*- 5377*)
 h:   8388608  13809278     4.2BSD      0     0     0   # (Cyl. 13699*- 22021*)

--------------090807020902070207040706--