muta...@gmail.com
2022-03-31 06:37:25 UTC
Currently I read the FAT boot sector which contains,
among other things, the number of heads and the
number of sectors per track.
I use those values in the boot sector code to convert
an LBA into CHS.
Someone has reported the "University Challenge" disk,
which is only 40 MB instead of the normal 1 GB, not
working on Hyper V under Windows 11.
The UC disk works fine on real hardware and qemu
and Bochs.
I haven't proven 100% but it is certainly getting to the
boot sector and I think it has an issue in there, not
loading the 3 sectors of the boot loader properly.
I suspect the problem is that the 40 MB drive uses
some "real" disk geometry values instead of the
fake ones needed for large disks.
Hunting around I found INT 13H AH=08H which looks
like it will retrieve the number of heads and sectors
per track actually being used by the BIOS, and I would
have thought that was the definitive values, which
should overwrite the values stored in the BPB of the
boot sector.
Is that the right approach?
Thanks. Paul.
among other things, the number of heads and the
number of sectors per track.
I use those values in the boot sector code to convert
an LBA into CHS.
Someone has reported the "University Challenge" disk,
which is only 40 MB instead of the normal 1 GB, not
working on Hyper V under Windows 11.
The UC disk works fine on real hardware and qemu
and Bochs.
I haven't proven 100% but it is certainly getting to the
boot sector and I think it has an issue in there, not
loading the 3 sectors of the boot loader properly.
I suspect the problem is that the 40 MB drive uses
some "real" disk geometry values instead of the
fake ones needed for large disks.
Hunting around I found INT 13H AH=08H which looks
like it will retrieve the number of heads and sectors
per track actually being used by the BIOS, and I would
have thought that was the definitive values, which
should overwrite the values stored in the BPB of the
boot sector.
Is that the right approach?
Thanks. Paul.