If OpenBSD's MBR bootcode works for you (fdisk -u), you can hexedit
it so that it will boot a fixed MBR partition (instead of the
``active'' one) if the user holds down either Alt key during boot.

The marked byte at offset 0x35 tells the fixed MBR partition
(04=first, 01=last).

Offset 0x2B
  old: 03
  new: 08

Offset 0x2E
  old: B0 07 E8 CB 00 80 0E B4 01 01
  new: E8 1A 01 EB 05 83 F9 01 EB 17
                            ^^

Offset 0x148
  old: 6C 64 20 42 49 4F 53 0D 0A 00
  new: 0D 0A 00 C7 06 4D 00 EB E4 C3

Works with src/sys/arch/i386/stand/mbr/mbr.S revisions 1.19--1.21
(OpenBSD 3.5--4.2).

The patched MBR bootcode will print "MBR on floppy or o" instead
of "MBR on floppy or old BIOS", and the user cannot force CHS reads
by holding down Shift (biosboot(8)).

Reply via email to