Hi, does anybody remember in which situations the MBR
or whatever else calls the FreeDOS boot sector fails
to pass the drive number in DL? Because at the moment,
FreeDOS defaults to ignoring DL and using the value
in the boot sector, unless that value is 255. I hear
that only some CDROM boot BIOS bugs and exotic boot
menu systems fail to set DL, but which?

The problem is that 255 in a boot sector may look odd
for disk tools plus it is not the default of our SYS.
Setting 0 or 128 (0x80) is, but that causes problems
when you try to boot DOS from B: or D: via boot menu,
or when you boot from USB in a way where your BIOS is
trying to make your boot partition show up as A: drive
while it is a FAT16 partition on some USB stick ;-).

So... it might be an idea to make "use DL, ignore the
drive field in the boot sector" the default, but then
"do use the drive field" would have to be activated
by SYS by patching the boot code. To compare, for the
current version you just set the drive field to any
non-255 value to tell the boot sector to use it :-).



Another issue is that for example mtools and old mkdosfs
do not set the partition offset / hidden sectors field
in the boot sector. SYS works around, but non-DOS SYS
clones like sys-freedos-linux have extra hassles there:

A "generic" workaround would be to check the partition
table entry pointer: The MBR is supposed to give the
boot sector a pointer DS:SI to the partition table item
it boots (where is that documented?) and actually does
seem to do so quite often... :-) For example SYSLINUX
trusts this pointer if ds[si] & 7f is 0... Only the LBA
"partition offset" field of the table is useful at boot.



Last but not least, our boot sector uses the heads and
sectors per track value from the boot sector. Is that
useful? I would assume using the geometry returned by
int13.8 is a lot more foolproof for harddisks (but not
for overformatted floppy if anybody cares...?).

By the way, we never use LBA for A: drives yet, and a
comment in the source code says that BIOS cdrom boot
floppy emulation can have bugs in LBA support...


Eric

PS: Only our FAT32-LBA boot sector has any space left,
so all changes would have to be "replace style X by
style Y" and not "add check for Y".



-------------------------------------------------------------------------
Check out the new SourceForge.net Marketplace.
It's the best place to buy or sell services for
just about anything Open Source.
http://sourceforge.net/services/buy/index.php
_______________________________________________
Freedos-devel mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/freedos-devel

Reply via email to