[syslinux] [PATCH 0/3] mbr: Ctrl-key press forces load from first hard disk

TJ ubuntu at tjworld.net
Mon Mar 30 12:08:48 PDT 2009


The following series of patches add a work-around for a BIOS bug to the
MBR code. The user can press a Ctrl key at boot-time to force the MBR to
ignore the BIOS-reported drive number (passed in register DL) and use
the first hard-disk device (0x80).

This works around a common problem that otherwise results in the
"Missing operating system" message.

If the BIOS-defined boot device order lists an external device (e.g. a
USB flash mass-storage device) before the IDE/SCSI hard disk the USB
device is the 'first' hard disk and should have drive number 0x80.

The problem is some BIOSs report the wrong boot device number in DL but
use the correct device number when the read_sector functions
(AH=0x02/0x42, int 0x13) are called.

This was discovered using the new diagnostic MBR: mbr-diag.

mbr and isohdpfx are relatively straight-forward patches.

gptmbr needed its ASCII strings shortened to create the space required
for the new code. The space-saving changes were briefly discussed with H
Peter Alvin on IRC prior to these patches being finalised.

TJ (3):
  mbr: Ctrl-key press forces load from first hard disk
  gptmbr: Ctrl-key press forces load from first hard disk
  isohdpfx: Ctrl-key press forces load from first hard disk

 mbr/gptmbr.S   |   16 ++++++++++++++--
 mbr/isohdpfx.S |   12 ++++++++++++
 mbr/mbr.S      |   12 ++++++++++++
 3 files changed, 38 insertions(+), 2 deletions(-)




More information about the Syslinux mailing list