On Sat, Feb 02, 2008 at 04:41:06PM -0500, George Lengel wrote:
> When I reboot I get thrown into rescue mode and typing set shows
> grub>prefix= (hd0,7)/boot/grub
> grub>root=hd0,7
> 
> If I manually set root to (hd2,7) and prefix to (hd2,7)/boot/grub I can 
> insmod normal and then running normal proceeds perfectly. It makes no 
> sense to me why it is prepending hd0 instead of hd2. I have searched all 
> over for a solution and the closest I came was someone a few months ago 
> posted a similar problem. It was suggested to delete system.map and 
> regenerate it, but this did not help.

Sounds like grub_boot_drive not having the right info.  It works when received
via multiboot, but not from boot.img.

Does the attached patch fix your problem?  Just a guess ...

-- 
Robert Millan

<GPLv2> I know my rights; I want my phone call!
<DRM> What use is a phone call… if you are unable to speak?
(as seen on /.)
diff -ur grub2/boot/i386/pc/boot.S tmp/boot/i386/pc/boot.S
--- grub2/boot/i386/pc/boot.S	2008-01-07 20:52:08.000000000 +0100
+++ tmp/boot/i386/pc/boot.S	2008-02-02 23:37:36.000000000 +0100
@@ -105,21 +105,6 @@
 /* general setup */
 	cli		/* we're not safe here! */
 
-        /*
-         * This is a workaround for buggy BIOSes which don't pass boot
-         * drive correctly. If GRUB is installed into a HDD, check if
-         * DL is masked correctly. If not, assume that the BIOS passed
-         * a bogus value and set DL to 0x80, since this is the only
-         * possible boot drive. If GRUB is installed into a floppy,
-         * this does nothing (only jump).
-         */
-boot_drive_check:
-        jmp     1f	/* grub-setup may overwrite this jump */
-        testb   $0x80, %dl
-        jnz     1f
-        movb    $0x80, %dl
-1:
-	
 	/*
 	 * ljmp to the next instruction because some bogus BIOSes
 	 * jump to 07C0:0000 instead of 0000:7C00.
diff -ur grub2/util/i386/pc/grub-setup.c tmp/util/i386/pc/grub-setup.c
--- grub2/util/i386/pc/grub-setup.c	2008-01-05 13:20:28.000000000 +0100
+++ tmp/util/i386/pc/grub-setup.c	2008-02-02 23:37:21.000000000 +0100
@@ -246,13 +246,6 @@
 
   free (tmp_img);
   
-  /* 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;
-  
   /* If the destination device can have partitions and it is the MBR,
      try to embed the core image into after the MBR.  */
   if (dest_dev->disk->has_partitions && ! dest_dev->disk->partition)
_______________________________________________
Grub-devel mailing list
Grub-devel@gnu.org
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to