Comment 30 for bug 277903

Revision history for this message
TJ (tj) wrote :

I've debugged this issue by creating a diagnostic MBR (see http://syslinux.zytor.com/archives/2009-March/011906.html) that reports the values the BIOS passes (see http://syslinux.zytor.com/archives/2009-March/011876.html).

It transpires that the system BIOS has a bug (in this case a Phoenix BIOS).

Although the boot specifications for Plug and Play require the device numbering be based on the order of bootable devices the value passed to the MBR at boot from BIOS in register DL does not use this order.

Therefore when the BIOS is configured with a boot-order such as:

0x80 USB masss-storage device
0x81 IDE hard-disk drive

The numbering of the devices for Plug'n'Play should be as shown above.

In some cases the BIOS (in the existing case a Phoenix BIOS in a Sony Vaio VGN-FE41Z) incorrectly passes 0x81 in register DL, causing the MBR to read from the wrong device when loading the active partition's boot-sector.

I've created a work-around which patches the MBR and allows the user to force the MBR to use drive 0x80 if a Ctrl key is pressed when the MBR boots, regardless of what the BIOS passes in register DL.

With this MBR installed on the USB flash mass-storage device, if the Ctrl key is pressed at boot the device boots successfully.

I'm preparing an updated syslinx patch with this MBR patch installed and it will be available from my PPA shortly.

For most users, all that is needed is the ~440-byte MBR file. I've attached mbr.bin.gz to this bug report. To install it on the device:

1. download the new MBR (mbr.bin.gz)
2. unpack it

gunzip mbr.bin.gz

3. connect the device
4. determine what device node it is (e.g. /dev/sdc)

DEV=/dev/sd?

5. write the modified MBR to the device

sudo dd if=mbr.bin of=$DEV

6. Start the affected PC
7. Press one of the Ctrl keys and hold it down whilst the USB device boots