grub-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[bug #29464] util/i386/pc/grub-setup: fails to write Buggy BIOS boot-sec


From: TJ
Subject: [bug #29464] util/i386/pc/grub-setup: fails to write Buggy BIOS boot-sector drive-number detection in boot.img
Date: Wed, 07 Apr 2010 22:43:22 +0100

I wonder if someone that is familiar with the setting of disk->id for pc
could take a look at this bug.

Although I think I've found the reason for the bug I'm not clear on what
the correct solution would be.

In summary:

disk->id has not been set by the time util/i386/pc/grub-setup.c does the
buggy BIOS test:

 /* If DEST_DRIVE is a hard disk, enable the workaround, which is
    for buggy BIOSes which don't pass boot drive correctly. Instead,
    they pass 0x00 or 0x01 even when booted from 0x80. */
 if (dest_dev->disk->id & 0x80)
 /* Replace the jmp (2 bytes) with double nop's. */
 *boot_drive_check = 0x9090;

and as a result the system fails to boot on PCs where the BIOS provides
the wrong drive number.

I'm not sure quite what is missing - I see several functions that do set
disk->id but cannot be sure which, if any, would be an appropriate call
from grub-setup.c or one of the function calls it relies upon.





reply via email to

[Prev in Thread] Current Thread [Next in Thread]