[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Issue with boot != root and chainloading

From: Andy Kittner
Subject: Issue with boot != root and chainloading
Date: Tue, 22 Jul 2008 15:34:16 +0200
User-agent: Mutt/1.5.18 (2008-07-21)

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)
  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 : 

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.

   set prefix=(hd1,5)/boot/grub
   set root=(hd1,5)
   insmod 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

Attachment: pgpKvvw2n5TW4.pgp
Description: PGP signature

reply via email to

[Prev in Thread] Current Thread [Next in Thread]