[SeaBIOS] CHS translation (BIOS incompatibility)

Kevin O'Connor kevin at koconnor.net
Tue Jun 5 14:59:51 CEST 2018


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



More information about the SeaBIOS mailing list