grub-devel.gnu.org archive mirror
 help / color / mirror / Atom feed
From: "Vladimir 'φ-coder/phcoder' Serbinenko" <phcoder@gmail.com>
To: grub-devel@gnu.org
Cc: Andreas Born <futur.andy@googlemail.com>
Subject: Re: GRUB2 fails when booting from CD
Date: Sat, 25 Dec 2010 21:45:28 +0100	[thread overview]
Message-ID: <4D1657E8.40202@gmail.com> (raw)
In-Reply-To: <4C87BA4D.4070807@googlemail.com>


[-- Attachment #1.1: Type: text/plain, Size: 1443 bytes --]

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
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>


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


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.2: cdfailinf.diff --]
[-- Type: text/x-diff; name="cdfailinf.diff", Size: 978 bytes --]

=== 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);
 }


[-- Warning: decoded text below may be mangled, UTF-8 assumed --]
[-- Attachment #1.3: cdfailwa.diff --]
[-- Type: text/x-diff; name="cdfailwa.diff", Size: 463 bytes --]

=== 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 #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]

  parent reply	other threads:[~2010-12-25 20:45 UTC|newest]

Thread overview: 27+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-08  2:42 LiveCD bootloader Teresa e Junior
2010-09-08  5:09 ` Brendan Trotter
2010-09-08  5:24   ` Brendan Trotter
2010-09-08  8:34     ` Robert Millan
2010-09-08 22:47     ` Teresa e Junior
2010-09-08 22:52       ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-09-08 23:00         ` Teresa e Junior
2010-09-08 23:29           ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-09-08 23:46             ` Teresa e Junior
2010-09-09  1:33           ` Brendan Trotter
2010-09-09  6:51             ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-09-08  8:36 ` Robert Millan
2010-09-08 22:46   ` Teresa e Junior
2010-09-09  7:53     ` future of grub commands setup and install ? Treutwein Bernhard
2010-09-09 12:14       ` Robert Millan
2010-09-10  6:28         ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-09-10  6:38         ` Treutwein Bernhard
2010-09-08 15:28 ` LiveCD bootloader Andreas Born
2010-09-08 15:46   ` Colin Watson
2010-09-08 16:31     ` GRUB2 fails when booting from CD Andreas Born
2010-09-26 20:22       ` Andreas Born
2010-09-27 15:17         ` Phillip Susi
     [not found]           ` <4CA1FEF0.4000209@googlemail.com>
     [not found]             ` <4CA215C9.9060000@cfl.rr.com>
     [not found]               ` <4CA219B9.3020209@googlemail.com>
     [not found]                 ` <4CA22FC6.9000701@cfl.rr.com>
2010-09-28 20:19                   ` Andreas Born
2010-12-25 20:45       ` Vladimir 'φ-coder/phcoder' Serbinenko [this message]
2010-12-27 12:30         ` Andreas Born
2011-01-04 14:45           ` Vladimir 'φ-coder/phcoder' Serbinenko
2010-09-08 22:48   ` LiveCD bootloader Teresa e Junior

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=4D1657E8.40202@gmail.com \
    --to=phcoder@gmail.com \
    --cc=futur.andy@googlemail.com \
    --cc=grub-devel@gnu.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).