On Tue, Jun 05, 2018 at 12:51:54PM +0300, Nikolay Ivanets wrote:
Well, I've played with disk geometry and translation mode options for attached disk to Qemu but it didn't help.
Maximum I could do is to make correct VBR sector to load at boot process setting secs=32,trans=large or secs=32,trans=none but then bootstrap code from VBR fails with "Disk read error". It reads next N sectors into a memory trying to find bootloader (NTLDR) and fails. I also noticed Volume Boot Record (first partition sector) contains "sectors per track" record at offset 0x18 (from beginning of partition).
Finally I've replace all entries of '63' to '32' in src/block.c. Now number of sectors/track becomes 32 instead of hard-coded 63 in LBA translation mode . Compiled BIOS and supplied to Qemu. Now Windows boots successfully even without manually specifying of disk geometry.
Definetely it is not a permanent fix. But might be considered as a workaround for disks with 32 sectors/track.
p.s. It seems HP servers have an option 32/63 sectors per track and 32 is default choese.
Did anyone face with 32/63 sectors per track problem? How did you solve it, if any? May be I miss something and Seabios developers can point me a right direction?
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
-Kevin
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.
I have attached 4 logs:
serial-no-chs.log - launch Qemu with original Seabios. No manual CHS modifications. serial-1024-16-32.log - launch Qemu with original Seabios. Manual CHS(1024, 16, 32). serial-8192-16-32.log - launch Qemu with original Seabios. Manual CHS(8192, 16, 32). serial-patched-bios.log - launch Qemu with PATCHED Seabios. No manual CHS modification.
-- +380979184774 Mykola Ivanets