To help users diagnose boot errors, especially with external devices
such as USB flash memory mass-storage, I've created this diagnostic
MBR.
It succinctly reports the values received from the BIOS, locates and
reads the active partition boot sector, reports the magic bytes and
and read-sector error code.
Holding down a shift key during boot will force CHS mode even if LBA is
detected.
Detailed information on reported data and usage is in the header commentary
of mbr/mbr-diag.S; here is an example:
DIAG L D80h C3FFh H10h S3Fh P1 O00000020 MAA55h E00h
which means:
[L]BA addressing mode (alternative is [C]HS),
[D]isk 0x80,
[C]ylinders 0x3FF,
[H]eads 0x10,
[S]ectors 0x3F,
[P]artition active 1,
[O]ffset to boot-sector 0x00000020,
[M]agic bytes (of boot-sector) 0xAA55,
[E]rror code (from AH=0x42/0x02, int 0x13) 0x00
TJ (1):
Add Diagnostic MBR for trouble-shooting
mbr/Makefile | 6 +-
mbr/mbr-diag.S | 371 ++++++++++++++++++++++++++++++++++++++++++++++++++++++++
2 files changed, 376 insertions(+), 1 deletions(-)
create mode 100644 mbr/mbr-diag.S