All of lore.kernel.org
 help / color / mirror / Atom feed
* Issue with boot != root and chainloading
@ 2008-07-22 13:34 Andy Kittner
  2008-07-22 13:50 ` Pavel Roskin
  0 siblings, 1 reply; 27+ messages in thread
From: Andy Kittner @ 2008-07-22 13:34 UTC (permalink / raw)
  To: grub-devel

[-- Attachment #1: Type: text/plain, Size: 2122 bytes --]

Hi all,

First of all I hope I've come to the right place with my little bug 
(from what I've read this list seems to be preferred to the tracker?).

Anyway here it goes: I have two hard drives in my notebook, and tried 
installing grub (svn r1724) with it's root on the second one (/dev/sdb5 
to be precise)

    grub-install /dev/sda

Everything went smooth, however after rebooting I get dropped in rescue 
mode with this message: "unknown device fd1,5"

As I had a bit of free time I investigated where the fd1 might come 
from and it turned out that grub_root_device seems to contain a wrong 
value:

diff --git a/grub2/kern/i386/pc/init.c b/grub2/kern/i386/pc/init.c
index e47cbfd..01e8d7d 100644
--- a/grub2/kern/i386/pc/init.c
+++ b/grub2/kern/i386/pc/init.c
@@ -236,8 +236,10 @@ grub_machine_init (void)
   void
   grub_machine_set_prefix (void)
   {
+  char *prefix = make_install_device();
     /* Initialize the prefix.  */
-  grub_env_set ("prefix", make_install_device ());
+  grub_env_set ("prefix", prefix);
+  grub_printf("0x%x, 0x%x, %s\n", grub_boot_drive, grub_root_drive, prefix ? prefix : "<null>");
   }
   
   void


With this patch it prints
"0x80, 0x1, (fd1,5)/boot/grub/"
and I presume the 0x1 should actually be a 0x81, however I have no clue 
why it is wrong and as it seems to be initialized in startup.S I thought 
I'd leave it to the experts at this point. 

After:

    set prefix=(hd1,5)/boot/grub
    set root=(hd1,5)
    insmod normal
    normal

I end up in the menu and can boot my linux kernels just fine.

Now for my second problem:
If I try to chainload grub legacy on another partition it just hangs 
after printing "GRUB ". The command I used to do this was:
    chainloader (hd0,5)+1

Chainloading my windows partition using:
    chainloader (hd0,1)+1
has a similar result, namely a blank screen with a blinking cursor.

I would need some advice on how to debug this, but I guess the first 
interesting bit would be if this is broken for others as well, or just 
a peculiarity of my system.


Best regards
Andy

[-- Attachment #2: Type: application/pgp-signature, Size: 197 bytes --]

^ permalink raw reply related	[flat|nested] 27+ messages in thread

end of thread, other threads:[~2008-08-03 19:20 UTC | newest]

Thread overview: 27+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-07-22 13:34 Issue with boot != root and chainloading Andy Kittner
2008-07-22 13:50 ` Pavel Roskin
2008-07-22 14:01   ` Felix Zielcke
2008-07-22 23:58     ` Pavel Roskin
2008-07-24  9:12     ` Felix Zielcke
2008-07-24 10:25       ` Felix Zielcke
2008-07-24 11:00     ` Felix Zielcke
2008-07-24 16:49       ` Pavel Roskin
2008-07-25 21:08         ` Robert Millan
2008-07-25 21:47           ` Pavel Roskin
2008-07-25 22:10             ` [PATCH] use UUIDs for cross-disk installs (Re: Issue with boot != root and chainloading) Robert Millan
2008-07-26  1:08               ` Pavel Roskin
2008-07-27 12:19                 ` Robert Millan
2008-07-27 16:29                   ` Pavel Roskin
2008-07-27 18:37                     ` Robert Millan
2008-07-27 19:28                       ` UUID boot on ieee1275 (Re: [PATCH] use UUIDs for cross-disk installs (Re: Issue with boot != root and chainloading)) Robert Millan
2008-07-27 20:13                         ` [PATCH] " Robert Millan
2008-07-27 20:36                           ` Robert Millan
2008-07-30 10:41                             ` Robert Millan
2008-08-03 11:09                       ` [PATCH] use UUIDs for cross-disk installs (Re: Issue with boot != root and chainloading) Isaac Dupree
2008-08-03 12:08                         ` Robert Millan
2008-08-03 12:23                           ` Robert Millan
2008-08-03 17:04                           ` Isaac Dupree
2008-08-03 19:19                             ` Treacherous Computing (Re: [PATCH] use UUIDs for cross-disk installs) Robert Millan
2008-07-27 18:27               ` [PATCH] use UUIDs for cross-disk installs (Re: Issue with boot != root and chainloading) Robert Millan
2008-07-30 10:43                 ` Robert Millan
2008-07-22 15:09   ` Issue with boot != root and chainloading Andy Kittner

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.