Re: Problems with EIDE driver (I think)

Robert Nichols (rnichols@interaccess.com)
Thu, 7 Mar 96 18:44 CST


On Wed, 6 Mar 1996 19:13:24 -0400 (AST)
macleajb@ednet.ns.ca (James MacLean) wrote:
[SNIP]
>I too was getting the same(similar) messages as above and after a few E-mails
>to/from "mark (m.s.) lord" <mlord@bnr.ca> (thanks Mark:-)) he showed how the
>fdisk(cfdisk) I had used set my hda with incorrect sizes :
>
>Command (m for help): p
>
>Disk /dev/hda: 16 heads, 63 sectors, 1057 cylinders
>Units = cylinders of 1008 * 512 bytes
>
> Device Boot Begin Start End Blocks Id System
>/dev/hda1 * 1 1 51 25619 83 Linux native
>Partition 1 does not end on cylinder boundary:
> phys=(200, 14, 17) should be (200, 15, 63)
>/dev/hda2 * 202 51 661 307147+ 83 Linux native
>Partition 2 does not end on cylinder boundary:
> phys=(1023, 14, 17) should be (1023, 15, 63)
>/dev/hda3 1024 661 726 32767+ 82 Linux swap
>Partition 3 does not start on cylinder boundary:
> phys=(1023, 14, 17) should be (1023, 0, 1)
>Partition 3 does not end on cylinder boundary:
> phys=(1023, 14, 17) should be (1023, 15, 63)
>/dev/hda4 1024 726 1058 167407+ 83 Linux native
>Partition 4 does not start on cylinder boundary:
> phys=(1023, 14, 17) should be (1023, 0, 1)
>Partition 4 does not end on cylinder boundary:
> phys=(1023, 14, 17) should be (1023, 15, 63)
>
>>From Mark :
>---------------------------------------
>Okay. Let's try some basic math here:
>
>The basic hard disk geometry you are using is:
> 16 * 63 * 1057 = 1065456 sectors
>
>The partition block-counts add up as follows:
> 25619 + 307147 + 32767 + 167407 = 532940 blocks
> a block is two sectors, so this = 1065880 sectors
>
>Somehow fdisk has allocated 1065880 sectors on a disk with only 1065456
>sectors.That is the problem.
>---------------------------------------
>Mark went even further to check and see if it had gotten incorrect information
>from firmware by looking at hdparm -i /dev/hda:
>
> Model=ST3660A, FwRev=06.06.01ST3660A, SerialNo=DZ159078
> Config={ HardSect NotMFM HdSw>15uSec Fixed DTR>10Mbs }
> RawCHS=1057/16/63, TrkSize=36240, SectSize=584, ECCbytes=16
> BuffType=3(DualPortCache), BuffSize=120KB, MaxMultSect=16, MultSect=off
> DblWordIO=no, maxPIO=2(fast), DMA=yes, maxDMA=2(fast)
> CurCHS=1057/16/63, CurSects=1065456, LBA=yes, LBAsects=1065456
> tDMA={min:150,rec:150}, DMA modes: *mword0 mword1
> IORDY=yes, tPIO={min:363,w/IORDY:180}, PIO modes: mode3
>
>So we were (I believe) not certain where exactly the misinteruptation of
>disk size originated. But the fix is ofcourse is to repartition the disk
>and get 'er right this time :-).

A quick check at Seagate's web site <http://www.seagate.com> shows that
the actual LBA capacity of the ST-5660A is 1,066,184 sectors, which
works out to 1057.7222... cylinders at 16 x 63 sectors per cylinder.
The 4181/15/17 geometry apparently used by 'cfdisk' is within this total
capacity.

Since the logical geometry is fairly arbitrary and bears essentially no
relation to the physical construction of the drive, it is highly
unlikely that a modern IDE, EIDE, or SCSI drive is fully utilized by
such a geometry. The 4181/15/17 geometry used by 'cfdisk' makes
somewhat better use of the available real estate (1,066,155 of 1,066,184
sectors). Once you get past the possibility of a geometry mismatch that
prevents booting, using the higher capacity should not cause you any
problems.

I'm not sure where this geometry came from (it's not one of the
recommended geometries on Seagate's data sheet), but I think it is
highly unlikely that this geometry is the source of your problem.

-- 
Bob Nichols         rnichols@interaccess.com