From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mailman by lists.gnu.org with archive (Exim 4.43) id 1MUUHP-0001W2-04 for mharc-grub-devel@gnu.org; Fri, 24 Jul 2009 19:34:23 -0400 Received: from mailman by lists.gnu.org with tmda-scanned (Exim 4.43) id 1MUUHN-0001Rp-4g for grub-devel@gnu.org; Fri, 24 Jul 2009 19:34:21 -0400 Received: from exim by lists.gnu.org with spam-scanned (Exim 4.43) id 1MUUHI-0001D8-4T for grub-devel@gnu.org; Fri, 24 Jul 2009 19:34:20 -0400 Received: from [199.232.76.173] (port=57036 helo=monty-python.gnu.org) by lists.gnu.org with esmtp (Exim 4.43) id 1MUUHI-0001Cq-11 for grub-devel@gnu.org; Fri, 24 Jul 2009 19:34:16 -0400 Received: from moutng.kundenserver.de ([212.227.126.186]:52815) by monty-python.gnu.org with esmtp (Exim 4.60) (envelope-from ) id 1MUUHH-0004OC-F0 for grub-devel@gnu.org; Fri, 24 Jul 2009 19:34:15 -0400 Received: from [85.180.4.132] (e180004132.adsl.alicedsl.de [85.180.4.132]) by mrelayeu.kundenserver.de (node=mreu1) with ESMTP (Nemesis) id 0MKv1o-1MUUHG2Cco-0008VM; Sat, 25 Jul 2009 01:34:14 +0200 From: Felix Zielcke To: The development of GRUB 2 Content-Type: text/plain Date: Sat, 25 Jul 2009 01:35:02 +0200 Message-Id: <1248478502.3510.96.camel@fz.local> Mime-Version: 1.0 X-Mailer: Evolution 2.27.4 Content-Transfer-Encoding: 7bit X-Provags-ID: V01U2FsdGVkX1/ixkxCBrGNEZcJkbYk3wiFNu/KZf0XWy+ZFfP +WC5xw4naWDPepalW4cSg/mh2c14r61h4GEqIx7BDpn+6aIWBg tIjgOP3jkfyMpVcrxTKsA== X-detected-operating-system: by monty-python.gnu.org: Genre and OS details not recognized. Subject: [Fwd: Bug#503344: Grub-pc fails on IBM x3250 configured with RAID-1] X-BeenThere: grub-devel@gnu.org X-Mailman-Version: 2.1.5 Precedence: list Reply-To: The development of GRUB 2 List-Id: The development of GRUB 2 List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 24 Jul 2009 23:34:21 -0000 Is this an acceptable fix? Though I have the feeling this isn't a proper one. -------- Weitergeleitete Nachricht -------- > Von: Bob Gilligan > Reply-to: Bob Gilligan , 503344@bugs.debian.org > An: submit@bugs.debian.org > Betreff: Bug#503344: Grub-pc fails on IBM x3250 configured with RAID-1 > Datum: Fri, 24 Oct 2008 16:19:59 -0700 > > 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; -- Felix Zielcke Proud Debian Maintainer