[syslinux] BIOS bug? USB + "Missing operating system"
TJ
ubuntu at tjworld.net
Mon Mar 30 06:34:54 PDT 2009
On Mon, 2009-03-30 at 12:08 +0100, TJ wrote:
> A follow-up to report my findings using my "mbr-diag" diagnostic MBR
> (see Patch "Add Diagnostic MBR for trouble-shooting") to determine why
> an external USB flash mass-storage device fails to boot when the PC's
> hard disk is attached.
>
> Hard-disk present:
>
> DIAG L D81h C3FEh HFFh S3Fh P1 O00000020h M0000h E00h
>
> Hard-disk not present:
>
> DIAG L D80h C3FFh H10h S3Fh P1 O00000020h MAA55h E00h
Revealing results at last!
I suspected that the sector being read was from the IDE hard-disk.
Luckily sector 0x20 (32) on the hard-disk is unused (being between
partition table and start of first partition in the first track).
I wrote the magic bytes 0xBEEF to sector 0x20, offset 0x01FE.
The next hard-disk-present test reported:
DIAG L D81h C3FEh HFFh S3Fh P1 O00000020h MBEEFh E00h
Which seems to confirm that the drive being read as 0x81 is in fact the
hard drive.
This definitely looks like a BIOS bug, although it could make some kind
of sense in a weird way.
If the user-configured boot order in BIOS puts the USB device ahead of
the hard disk the drive numbers assigned to each (bootable) device
should be:
0x80 USB mass-storage
0x81 IDE hard-disk
The problem seems to be that this BIOS reports the boot-device in DL
using a different calculation to the read-sector interrupt 0x13
functions.
I'm just squeezing a couple more bytes out of mbr-diag.bin so that I can
include an over-ride that will force drive_number = 0x80 when a Ctrl key
is pressed at boot.
I'm hoping/expecting that this might then cause the correct device to be
read.
More information about the Syslinux
mailing list