Bug 55224 - GRUB 0.90 bootloader confuses Windows APM driver
Summary: GRUB 0.90 bootloader confuses Windows APM driver
Status: CLOSED DUPLICATE of bug 54375
Alias: None
Product: Red Hat Linux
Classification: Retired
Component: grub   
(Show other bugs)
Version: 7.2
Hardware: i386
OS: Linux
Target Milestone: ---
Assignee: Jeremy Katz
QA Contact:
Depends On:
TreeView+ depends on / blocked
Reported: 2001-10-27 17:01 UTC by Erich Boleyn
Modified: 2008-05-01 15:38 UTC (History)
0 users

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Last Closed: 2001-10-27 17:02:03 UTC
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---

Attachments (Terms of Use)

Description Erich Boleyn 2001-10-27 17:01:58 UTC
From Bugzilla Helper:
User-Agent: Mozilla/5.0 (X11; U; Linux i686; en-US; rv:0.9.5) Gecko/20011012

Description of problem:
There is APM detection code in the GRUB bootloader version 0.90 which
leaves it in an inconsistent state before booting, and this confuses the
Windows APM driver, therefore disabling it.

I have not tested it on every machine/Windows combination, but on my
machines it is entirely reproducible.

In any case, the code was incorrect.  I debugged this for the GRUB folks (I
am the original author getting back into the development again), and
thought you might like the patch, included below...  I don't know if you
follow the development list.

You may even want to grab the 0.91 version that's coming out in a few

Version-Release number of selected component (if applicable):

How reproducible:

Steps to Reproduce:
1. Install RH 7.2 on a system with Windows (98/ME) installed.
2. Boot into Windows.
3. Note that in the "System" control panel, the Advanced Power Management
driver is marked as not functioning.

Additional info:

-------------------------(start patch here)-----------------------
--- grub.orig/stage2/apm.S      Tue Oct 24 23:16:16 2000
+++ grub/stage2/apm.S           Fri Oct 26 11:45:04 2001
@@ -91,12 +91,12 @@
   xorw   %cx, %cx
   int     $0x15
   /* error -> should not happen, tidy up */
-  jc apm_disconnect
+  jc done_apm_bios
        /* check for "PM" signature */
        cmpw     $0x504d, %bx
        /* no signature -> should not happen, tidy up */
-       jne   apm_disconnect
+       jne   done_apm_bios
        /* record the APM BIOS version */
        movw      %ax, ABS(EXT_C(apm_bios_info))
@@ -104,19 +104,17 @@
   movw    %cx, ABS(EXT_C(apm_bios_info)) + 12
   jmp     done_apm_bios
-       /* Disconnect */
-       movw          $0x5304, %ax
-       xorw          %bx, %bx
-       /* ignore return code */
-       int     $0x15
-       jmp     done_apm_bios
        /* remove 32 bit support bit */
        andw     $0xfffd, ABS(EXT_C(apm_bios_info)) + 12
+       /* Some paranoia here: Always Disconnect from APM */
+       movw    $0x5304, %ax
+       xorw    %bx, %bx
+       /* ignore return code */
+       int     $0x15
        DATA32  call    EXT_C(real_to_prot)
-------------------------(end patch here)-----------------------

Comment 1 Jeremy Katz 2001-10-27 17:45:25 UTC
Yep, I grabbed the patch off of the list yesterday and have a test package up at
http://people.redhat.com/~katzj/RPMS/grub-0.90-12.i386.rpm... waiting for
confirmation from the other filed bugs that this fixes the problem. 

*** This bug has been marked as a duplicate of 54375 ***

Comment 2 Erich Boleyn 2001-10-27 20:03:31 UTC
Err, I just tried your RPM, and it hung my test system!  (a Pentium 4 machine)

Hmm.  In trying to isolate this a bit further, it seems that all of them
including your new one runs fine from a floppy.  Further, the problem existed
when I changed back to the old version of GRUB, but it worked with the original
install from the CD obviously.  It *does* work with a stage2 from the CVS
version of GRUB.

Argh, I found the problem.  You're going to absolutely *love* this (not)...  the
problem is that the disk cache is incoherent with the raw device!!!!

So, when "grub-install" copies the stage2 over, Ext3 hasn't updated all of it's
state enough so that the raw device reflects it.

The *real* problem is that there was no "sync" command in the "grub-install"
script in places where the grub shell was being called.

I am posting a patch to the "bug-grub" list momentarily...

But, after that patch, all works well.  ;-)

Note You need to log in before you can comment on or make changes to this bug.