On Tue, Jun 05, 2018 at 06:09:54PM +0300, Nikolay Ivanets wrote:
As far as I know, QEMU should be able to tell SeaBIOS the exact geometry to use (eg, via qemu -hdachs c,h,s[,t] option). If you're not getting the expected behavior, be sure to include the seabios log file - see: https://www.seabios.org/Debugging
Here is geometry when I have with patched bios (Windows boot): drive 0x000f57f0: PCHS=16383/16/63 translation=lba LCHS=1024/255/32 s=143305920
Here is geometry I have with original Seabios (boot fails): drive 0x000f0bd0: PCHS=16383/16/63 translation=lba LCHS=1024/255/63 s=143305920
Qemu limits what we can specify in CHS to 16383, 16 and 63 respectively and I don't see any combinations which will perform necessary translation from PCHS=16383/16/63 to LCHS=1024/255/32.
If I understand it correctly, you're looking for LCHS=1024/255/32. I don't know why QEMU wont let you specify heads=255, but short of doing that, I don't see a way for SeaBIOS to obtain that logical mapping.
The disk geometry translation stuff is arcane - the SeaBIOS code is translated from the original Bochs bios code. If it needs to be enhanced, it would require both a qemu patch (to specify the desired translation/geometry) and a seabios patch (to implement it).
-Kevin