All of lore.kernel.org
 help / color / mirror / Atom feed
* [bug #29464] util/i386/pc/grub-setup: fails to write Buggy BIOS boot-sector drive-number detection in boot.img
@ 2010-04-07 21:43 TJ
  0 siblings, 0 replies; only message in thread
From: TJ @ 2010-04-07 21:43 UTC (permalink / raw)
  To: grub-devel

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.




^ permalink raw reply	[flat|nested] only message in thread

only message in thread, other threads:[~2010-04-07 21:43 UTC | newest]

Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-04-07 21:43 [bug #29464] util/i386/pc/grub-setup: fails to write Buggy BIOS boot-sector drive-number detection in boot.img TJ

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.