Subject: Cause of floppy boot fail on IBM TP755CX found.
To: Perry E. Metzger <perry@piermont.com>
From: Deng Hongwei <dhongwei@sz.cei.gov.cn>
List: port-i386
Date: 01/10/1998 15:19:23
After 2 days works again, I think I've looked out the cause of floppy
booting fail on IBM Thinkpad 755CX Laptop.
My IBM TP755CX's floppy driver is 2.88M, but the install floppy will
normally be 1.44M.
I then traced codes in 'sys/arch/i386/stand/lib', and found the
bios_disk.S using BIOS INT 0x13 (function 0x08) to get the geometry
of floppy, but the INT 0x13 only return the geometry of *floppy driver*
(which may be different from the floopy disk insert in it).
In my case, the get_diskinfo() in bios_disk.S return the geometry of
my floopy driver is:
max cylinders: 79
max sectors/track: 36
as a 2.88M floppy driver,
then set_geometry(&d) in bootsectmain.c(../stand/lib/crt/bootsect/) use
this geometry and the rest of codes read sectors using this geometry
whick cause booing procedure fail.
I manully force the get_diskinfo() in bios_disk.S return the floopy
geometry:
max cylinders: 79
max sectors/track: 18
as a 1.44M floppy driver,
and NOW I boot NetBSD install floppy successfully !
To solve these problems, I think perhaps we should get disk geometry
from the bootsect itself, just as DOS and other *BSDs do it. But to
a same bootsect for both floppy disk and hard disk, we should think
more.
Regards,
Deng.