[comp.os.minix] fsck fix to check the hard-disk

smagt@cs.vu.nl (Smagt v der PPP) (01/22/88)

I haven't read MINIX-news for some time, so possibly I'm telling
something everybody knows already.
   Fsck seemed not to be able to check my (XT-) hard-disk, so
I tried to find out what was wrong and found that the number
of sectors per cylinders seemed to be assigned wrongly (as 
opposed to version 1.0 MINIX.) Here's what I've done:

diff old_fsck.c new_fsck.c:
1867c1867
<			cylsiz = 85;	/* sectors per cylinder */
---
>			cylsiz = 68;	/* sectors per cylinder */

i.e. I reset the number of sectors per cylinder to the 1.0 version
value. Why was it set to 85? There must be some reason, I'm afraid.

Hoping to astonish the world.

ast@cs.vu.nl (Andy Tanenbaum) (01/23/88)

In article <1179@ark.cs.vu.nl> smagt@cs.vu.nl (Smagt v der PPP) writes:
 >   Fsck seemed not to be able to check my (XT-) hard-disk, so
 >I tried to find out what was wrong and found that the number
 >of sectors per cylinders seemed to be assigned wrongly (as 
 >opposed to version 1.0 MINIX.) Here's what I've done:
 >
 >diff old_fsck.c new_fsck.c:
 >1867c1867
 ><			cylsiz = 85;	/* sectors per cylinder */
 >---
 >>			cylsiz = 68;	/* sectors per cylinder */
 >

I checked the "official" current version, and sure enough it is 85.  I
suspect I know what happened.  I must have gotten this version from
someone (I forget who) who did something useful to it (I forget what) for
no doubt a good reason (I forget why).  This person undoubtedly had a
drive with 5 heads.  Since there are 17 sectors per track (circles are
round and pi is not a power of 2), he logically set cylsiz to 5 * 17 = 85.
For us ordinary four-headed monsters, 68 is indeed a better value.  Thanks
for the fix.

Andy Tanenbaum (ast@cs.vu.nl)