From: harris@teaching.physics.ox.ac.uk (Stephen Harris) Subject: Re: Why is there a 1024 cylinder limit in Linux. Date: 7 Aug 1993 10:26:07 BST
jprater@rcnvms.rcn.mass.edu wrote:
: If there the limitation is in BIOS then I have three questions,
: 1) Why does BIOS work with a drive with 1224 cyl, I can format and
: and run test and even install dos on it (I has to be partitioned,
: but it still works)
: 2) Why is this drive type in the default table for BIOS, type #46
Okay, there seems to be some confusion here. Lets see if I can
explain things.
Traditionally the BIOS was limited for cylinder numbers 0...1023
(ie 10 bits). More recent BIOS's use a couple of spare bits
elsewhere to extend this to 12 bits (0...4095). However these extensions
are non-standard, so programs like DOS can not access above to 1023 limit
directly. A well known work around for this is Ontrack Disk Manager which
loads a device driver that bypasses the BIOS calls, and just acts as a
block device. Another work around is to remap the way the disk looks.
eg my disks are 1632x15x53 and I have the controller map this as 1283x16x63,
which gives me the mac 1024x16x63 that DOS can handle (504Mb) thru the BIOS,
but with a bit left over.
Under DOS there are two ways of remapping the disk:
1) BIOS calls - the BIOS onboard the controller takes a head/cyl/sect address
and calculates its real position on the disk.
2) Controller level - the controller itself remaps, and so needs no software
support.
Of course mapping that depends on the BIOS will *not* work with Linux, since
(once booted) the BIOS is not used again.
: 3) I still don't understand why Linux kernel should have this limit,
: it should just take the values from BIOS and build the appropriate
: model. It has to resources to do it. It claims to be a real 32bit
: OS not a 8bit one. (Flame not intended, I'm just frustrated)
Before Linux can boot it HAS to use the BIOS to load itself. This means
that the kernel has somehow to be loaded into memory. The traditional
boot schemes use the BIOS for ease of use - you try putting a disk handler
into 512 bytes.....:-)
Once Linux has loaded it can use the whole of the disk.
As I described above, but Linux partition sits totally above the 1024
cylinder mark (in the space DOS can't access). It means I can't use
LILO to boot the system (the kernel image is unavailable to the BIOS calls
being above 1024) so I use a DOS program called BOOTLIN to boot the
kernel.
Once Linix has booted then it works as expected - it is just the hardship
of booting the thing in a compatible way with other OS's that makes it
hard (ie we *could* forget totally about the partitioning scheme, use
the whole disk as a Linux system, and then we could put a 200Kb bootstrap
at the beginning to cope with everything, but forget about sharing the disk
with other OS's.....)
It all boils down to the bootstrap must be below 1024 cylinders :-(
: BTW, the SCSI drive I was trying to use, it had 1632cyl, 16 head and
15 heads maybe? Sounds like a Seagate drive (my 1632x15x54 is a ESDI seagate
disk).
: 54 sectors. I tried to fool Linux be giving it 626cyn,64heads and
: 32 sectors. It complained it could not handle that many heads but
: DOS kept on chugging along. Explain that one.
BIOS mapping?
What you could do here is leave the disk in native 1632x15x54 mode, and set up
a root partition that resides totally below the 1023 limit
eg 150Mb for /
Then this can be your / + /usr partition, and LILO will be able to boot off of
this. The rest of the disk can then be a /home partition or whatever, for
all your work.
Hope this clears up some confusion.