Hi,
http://www.freedos.org/bugs/bugzilla/show_bug.cgi?id=1797
suggests that OnTrack (driver which you install in the MBR
or on a floppy and which provides improved LBA services if
your BIOS does not have them) messes up the REAL MBR beyond
of what FreeDOS can handle right now.

While OnTrack is in RAM, it will shift all accesses by e.g.
one track to make itself invisible. While it is not in RAM,
the real MBR will be visible. It will contain some special
partition for OnTrack itself, or alternatively OnTrack will
just use the first track (which is usually empty apart from
the MBR and boot loaders like LILO - but you better do NOT
load LILO into track 0, better install it inside your Linux
partition if you ask me - it has a boot sector, and the MBR
can load that boot sector if the partition is a primary one...).

So without OnTrack in RAM, FreeDOS should be able to recognize
that there are either no DOS partitions or at least no WORKING
DOS partitions. Strange enough, OnTrack seems to put / keep
values in the real MBR which make FreeDOS believe that a DOS
partition would be accessible even without OnTrack loaded.

Suggestion: FreeDOS should check if the boot sector actually
has the 55 aa magic value at the end (or should do some other
sanity checks) before allowing full access (you still need
limited access to be able to FORMAT a fresh partition, though).
Any suggestions on how to implement this?

Actually it should already BE implemented: If not valid boot
sector is found, FreeDOS usually reverts to some default /
recommended filesystem parameters for the affected drive letter,
based on the size of the partition and the type (FAT12, 16 or 32)
of the partition.

The bug report tells: Compaq DeskPro 4000 BIOS has an 8 GB limit
(i.e. it can translate to 1024x255x63 or something but has no
full LBA support!?), so OnTrack Disk Manager is installed in
"BIOS format" mode. Drive is 80 GB and has 2 primary partitions
and 1 extended partition which contains 2 logical partitions...).

If you tell the BIOS to "translate", you get the error:
> WARNING: using suspect partition Pri:3 FS 0b: with calculated values 
> 727-37-63 instead of 729-254-63
but FreeDOS seems to be able to acccess everything (this is strange,
looks like this OnTrack version does NOT shift all accesses by some
offset. Still I would feel better if the error message would be more
verbose (e.g. display BIOS opinion about disk geometry and whether the
boot sector has the magic value). I assume that the partition table
mentions 729-254-63 while the BIOS geometry is set to 256 instead of
255 heads (for example) which means that CHS positions get wrong but
FreeDOS is still able to use the partition by using LBA mode...?

If you tell the BIOS not to translate (which geometry is set in the
CMOS setup for the disk then?), error messages get more:

WARNING: using suspect partition Pri:3 FS 0b: with calculated values 15-15-1 
instead of 1-0-1
WARNING: using suspect partition Pri:3 FS 0b: with calculated values 11634-5-63 
instead of 729-254-63
WARNING: partition ID does not suggest LBA - part Pri:3 FS 0
Please run FDISK to correct this - using LBA to access partition, start 15-15-
1, end 11634-5-63
C: HD1, Pri[3], CHS = 15-15-1, start = 7MB, size = 5718MB
WARNING: using suspect partition Ext:1 FS 0b: with calculated values 11634-7-1 
instead of 730-1-1

However, nothing strange is displayed about D:, which is opened in LBA mode
because it reaches beyond CHS-reachable first 1024 cylinders for all possible
CHS geometries:

D: HD1, Ext[1], CHS = 11634-7-1, start = 5726MB, size = 36248MB

Still, FreeDOS crashes right after that:

Interrupt divide by zero, stack
2A94 F000 7A47 0100 1E00 0000 E2C6 0000 2796 2696 0008 9DA3 0007

The FAT16 version skips the errormessages landing directly by the division 
error.

[I guess "non translated" geometry is something like 1024x16x63 here?]

[Either something went wrong with cut+paste or the max intended head number
... uhm, no. Max intended head number IS 254 (255 heads). 730-0-1 is one of
the extra partition sectors and 730-1-1 is the partition in there ... So:
Set the BIOS to ?x255x63 geometry and FreeDOS will be happy. But then why
on earth is OnTrack installed on the system? Maybe the BIOS not only has an
8 GB limit but also some LBA size limit of e.g. 32 GB? So accessing data
beyond that point without OnTrack would fail...? What is the first 7 MB...?]

[Maybe FreeDOS gets an overflow because ?x16x63 means lots of cylinders and
FreeDOS internally still uses CHS values somewhere? That would explain why
the crash only happens if neither OnTrack nor appropriate geometry are found?]

Hm. That mail is a mess. Maybe it still helps something...

Eric.




-------------------------------------------------------
This SF.Net email is sponsored by the new InstallShield X.
>From Windows to Linux, servers to mobile, InstallShield X is the
one installation-authoring solution that does it all. Learn more and
evaluate today! http://www.installshield.com/Dev2Dev/0504
_______________________________________________
Freedos-kernel mailing list
[EMAIL PROTECTED]
https://lists.sourceforge.net/lists/listinfo/freedos-kernel

Reply via email to