On 09/08/2010 06:31 PM, Andreas Born wrote:
> Am 08.09.2010 17:46, schrieb Colin Watson:
>> On Wed, Sep 08, 2010 at 05:28:07PM +0200, Andreas Born wrote:
>>   
>>>   - Starting Grub2 fails on my pretty new desktop (the only such report
>>> as far as I'm concerned)
>>>      
>> Fails how?
>>    
> After selecting to boot from cdrom in the bios it outputs the following:
> Welcome to GRUB!
>
> error: hd111 cannot get C/H/S values.
> Enetering rescue mode...
> grub rescue>
>
> Then I'm at the rescue prompt.
>
Looks like your BIOS has problems with cd drive. I attach 2 patches. One
to try to gather more info for better workaround and another one to
basically ignore cdinfo altogether. Could you test them?
> The problem is reproducible with SalixLive or a minimal image I've
> created for testing purpose, but so far only on that one machine of
> mine. You can acquire the latter here:
> http://gaia.homelinux.org/misc/grub-test.iso (4.3M)
>
> I've experimented a bit with ls on the rescue prompt here's the output:
> > ls
> (hd0)
> > ls (hd0)
> error: unknown filesystem
>
> If you need anything else, just let me know and I'll try to do my best
> to help you.
>
> Regards,
> Andreas
>
> _______________________________________________
> Grub-devel mailing list
> [email protected]
> http://lists.gnu.org/mailman/listinfo/grub-devel
>


-- 
Regards
Vladimir 'φ-coder/phcoder' Serbinenko

=== modified file 'grub-core/disk/i386/pc/biosdisk.c'
--- grub-core/disk/i386/pc/biosdisk.c	2010-09-18 22:04:31 +0000
+++ grub-core/disk/i386/pc/biosdisk.c	2010-12-25 20:41:28 +0000
@@ -620,10 +620,19 @@
   grub_memset (cdrp, 0, sizeof (*cdrp));
   cdrp->size = sizeof (*cdrp);
   cdrp->media_type = 0xFF;
-  if ((! grub_biosdisk_get_cdinfo_int13_extensions (grub_boot_drive, cdrp)) &&
-      ((cdrp->media_type & GRUB_BIOSDISK_CDTYPE_MASK)
-       == GRUB_BIOSDISK_CDTYPE_NO_EMUL))
-    cd_drive = cdrp->drive_no;
+  {
+    int a;
+    a = grub_biosdisk_get_cdinfo_int13_extensions (grub_boot_drive, cdrp);
+    
+    if ((! a) && 0 &&
+	((cdrp->media_type & GRUB_BIOSDISK_CDTYPE_MASK)
+	 == GRUB_BIOSDISK_CDTYPE_NO_EMUL))
+      cd_drive = cdrp->drive_no;
+    grub_printf ("%d %x %x\n", a, cdrp->media_type, cdrp->drive_no);
+    grub_getkey ();
+    grub_getkey ();
+    grub_getkey ();
+  }
 
   grub_disk_dev_register (&grub_biosdisk_dev);
 }

=== modified file 'grub-core/disk/i386/pc/biosdisk.c'
--- grub-core/disk/i386/pc/biosdisk.c	2010-09-18 22:04:31 +0000
+++ grub-core/disk/i386/pc/biosdisk.c	2010-12-25 20:42:08 +0000
@@ -624,6 +624,8 @@
       ((cdrp->media_type & GRUB_BIOSDISK_CDTYPE_MASK)
        == GRUB_BIOSDISK_CDTYPE_NO_EMUL))
     cd_drive = cdrp->drive_no;
+  if (grub_boot_drive >= 0x90)
+    cd_drive = grub_boot_drive;
 
   grub_disk_dev_register (&grub_biosdisk_dev);
 }

Attachment: signature.asc
Description: OpenPGP digital signature

_______________________________________________
Grub-devel mailing list
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel

Reply via email to