Forums before death by AOL, social media and spammers... "We can't have nice things"
|    alt.os.development    |    Operating system development chatter    |    4,255 messages    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
|    Message 3,144 of 4,255    |
|    wolfgang kern to muta...@gmail.com    |
|    Re: BPB    |
|    31 Mar 22 15:31:35    |
      From: nowhere@nevernet.at              On 31/03/2022 08:37, muta...@gmail.com wrote:       > 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?              the BIOS may be able to get correct geometry data       by using Identify-Device (you can do that as well).              CHS<->LBA conversions must be aware of faked head-       numbers,it were quite common to abuse heads>>tracks       to achieve a larger CHS range. IIRC std-limit=2GB.       24 bits addressing 512 byte sectors: 2^24*512=8GB              If the CHS value in the MBR is wrong then blame the       formatting tool. But perhaps you misinterpreted it.       __       wolfgang              --- SoupGate-Win32 v1.05        * Origin: you cannot sedate... all the things you hate (1:229/2)    |
[   << oldest   |   < older   |   list   |   newer >   |   newest >>   ]
(c) 1994, bbs@darkrealms.ca