Bug#503344: Grub-pc fails on IBM x3250 configured with RAID-1
Bob Gilligan
gilligan at vyatta.com
Fri Oct 24 23:19:59 UTC 2008
Package: grub-pc
Version: 1.96+20080724-10
After installing grub-pc on an IBM x3250 with two 160 GB drives, with
the root filesystem configured using mdadm for RAID-1, grub fails to
boot, printing:
Welcome to GRUB!
error: unknown device fd1
Entering rescue mode ...
grub rescue>
After troubleshooting, I found that the failure was occurring in
grub_file_open() when grub_dl_load_file() was attempting to load the
normal mode module. The grub_file_open() function checks the return
status of its call to grub_file_get_device_name() by checking the value
of grub_errno. If grub_errno is non-zero, grub_file_open() returns
failure. But grub_file_get_device_name() can succeed, but the error
test fail, if grub_errno was set in some earlier operation. In this
case, apparently an early attempt to open a non-existent device set
grub_errno.
The fix is to assign grub_errno before making the call to
grub_file_get_device_name():
diff --git a/kern/file.c b/kern/file.c
index adf55da..5e605f9 100644
--- a/kern/file.c
+++ b/kern/file.c
@@ -59,6 +59,7 @@ grub_file_open (const char *name)
char *device_name;
char *file_name;
+ grub_errno = GRUB_ERR_NONE; /* Used as error flag */
device_name = grub_file_get_device_name (name);
if (grub_errno)
return 0;
More information about the Pkg-grub-devel
mailing list