[SeaBIOS] CHS translation (BIOS incompatibility)

Nikolay Ivanets stenavin at gmail.com
Tue Jun 5 11:51:54 CEST 2018


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?

Thanks.

--
    Mykola Ivanets
--
    +380979184774
    Mykola Ivanets


сб, 2 черв. 2018 о 17:49 Nikolay Ivanets <stenavin at gmail.com> пише:
>
> Hello.
>
> I have a bootable disk image taken from physical machine. Original BIOS is unknown. Operating system installed is Windows 2003 R2.
>
> I'm trying to boot it with Qemu and Seabios and get "Error loading operating system".
>
> After investigation I found:
> - image contains MBR partition table and single NTFS partition
> - partition starts at CHS (0,1,1) and absolute offset is 0x20 (32 sectors)
>
> Debugging MBR bootstrap code I found it makes several INT13 calls to BIOS: AH=08, AH=02 to get disk parameters and load first partition sector.
>
> It appeared BIOS returns CHS as (x,y,63) and thus MBR bootstrap loads 63rd sector instead 32nd and "Error loading operating system" happens.
>
> It seems well-known BIOS incompatibility issue.
>
> Is there any way to workaround this in Seabios?
> I would appreciate for any tips.
>
> --
>   Mykola Ivanets



More information about the SeaBIOS mailing list