* [Fwd: Bug#503344: Grub-pc fails on IBM x3250 configured with RAID-1]
@ 2009-07-24 23:35 Felix Zielcke
2009-07-25 8:37 ` Vladimir 'phcoder' Serbinenko
2009-07-25 16:45 ` Robert Millan
0 siblings, 2 replies; 5+ messages in thread
From: Felix Zielcke @ 2009-07-24 23:35 UTC (permalink / raw)
To: The development of GRUB 2
Is this an acceptable fix?
Though I have the feeling this isn't a proper one.
-------- Weitergeleitete Nachricht --------
> Von: Bob Gilligan <gilligan@vyatta.com>
> Reply-to: Bob Gilligan <gilligan@vyatta.com>, 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
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Fwd: Bug#503344: Grub-pc fails on IBM x3250 configured with RAID-1]
2009-07-24 23:35 [Fwd: Bug#503344: Grub-pc fails on IBM x3250 configured with RAID-1] Felix Zielcke
@ 2009-07-25 8:37 ` Vladimir 'phcoder' Serbinenko
2009-07-25 9:31 ` Felix Zielcke
2009-07-25 16:45 ` Robert Millan
1 sibling, 1 reply; 5+ messages in thread
From: Vladimir 'phcoder' Serbinenko @ 2009-07-25 8:37 UTC (permalink / raw)
To: The development of GRUB 2
On Sat, Jul 25, 2009 at 1:35 AM, Felix Zielcke<fzielcke@z-51.de> wrote:
> Is this an acceptable fix?
> Though I have the feeling this isn't a proper one.
>
>>
>> The fix is to assign grub_errno before making the call to
>> grub_file_get_device_name():
Just check whether returned device_name is 0 or not
>>
>> 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
>
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>
--
Regards
Vladimir 'phcoder' Serbinenko
Personal git repository: http://repo.or.cz/w/grub2/phcoder.git
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Fwd: Bug#503344: Grub-pc fails on IBM x3250 configured with RAID-1]
2009-07-25 8:37 ` Vladimir 'phcoder' Serbinenko
@ 2009-07-25 9:31 ` Felix Zielcke
0 siblings, 0 replies; 5+ messages in thread
From: Felix Zielcke @ 2009-07-25 9:31 UTC (permalink / raw)
To: The development of GRUB 2
Am Samstag, den 25.07.2009, 10:37 +0200 schrieb Vladimir 'phcoder'
Serbinenko:
> On Sat, Jul 25, 2009 at 1:35 AM, Felix Zielcke<fzielcke@z-51.de> wrote:
> > Is this an acceptable fix?
> > Though I have the feeling this isn't a proper one.
> >
> >>
> >> The fix is to assign grub_errno before making the call to
> >> grub_file_get_device_name():
> Just check whether returned device_name is 0 or not
Ok, I should have checked the actual code. That was pretty clear.
Sorry for the noise.
> >>
> >> 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
> >
> >
> >
> > _______________________________________________
> > Grub-devel mailing list
> > Grub-devel@gnu.org
> > http://lists.gnu.org/mailman/listinfo/grub-devel
> >
>
>
>
--
Felix Zielcke
Proud Debian Maintainer
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Fwd: Bug#503344: Grub-pc fails on IBM x3250 configured with RAID-1]
2009-07-24 23:35 [Fwd: Bug#503344: Grub-pc fails on IBM x3250 configured with RAID-1] Felix Zielcke
2009-07-25 8:37 ` Vladimir 'phcoder' Serbinenko
@ 2009-07-25 16:45 ` Robert Millan
2009-07-25 16:58 ` Felix Zielcke
1 sibling, 1 reply; 5+ messages in thread
From: Robert Millan @ 2009-07-25 16:45 UTC (permalink / raw)
To: The development of GRUB 2
On Sat, Jul 25, 2009 at 01:35:02AM +0200, Felix Zielcke wrote:
> Is this an acceptable fix?
> Though I have the feeling this isn't a proper one.
>
> -------- Weitergeleitete Nachricht --------
> > Von: Bob Gilligan <gilligan@vyatta.com>
> > Reply-to: Bob Gilligan <gilligan@vyatta.com>, 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>
ISTR we disabled floppy support completely in debian in order to avoid this
kind of trouble (I would disable it in official GRUB as well, but I can
already feel there'd be some opposition :-)).
Anyway, my point is that floppies are too unreliable. We detect them when
iterating even if they're not readable. Perhaps we could actually probe them
for read during iteration to solve this.
> > + grub_errno = GRUB_ERR_NONE; /* Used as error flag */
> > device_name = grub_file_get_device_name (name);
> > if (grub_errno)
> > return 0;
This looks like a hack.
--
Robert Millan
The DRM opt-in fallacy: "Your data belongs to us. We will decide when (and
how) you may access your data; but nobody's threatening your freedom: we
still allow you to remove your data and not access it at all."
^ permalink raw reply [flat|nested] 5+ messages in thread
* Re: [Fwd: Bug#503344: Grub-pc fails on IBM x3250 configured with RAID-1]
2009-07-25 16:45 ` Robert Millan
@ 2009-07-25 16:58 ` Felix Zielcke
0 siblings, 0 replies; 5+ messages in thread
From: Felix Zielcke @ 2009-07-25 16:58 UTC (permalink / raw)
To: The development of GRUB 2
Am Samstag, den 25.07.2009, 18:45 +0200 schrieb Robert Millan:
> On Sat, Jul 25, 2009 at 01:35:02AM +0200, Felix Zielcke wrote:
> > Is this an acceptable fix?
> > Though I have the feeling this isn't a proper one.
> >
> > -------- Weitergeleitete Nachricht --------
> > > Von: Bob Gilligan <gilligan@vyatta.com>
> > > Reply-to: Bob Gilligan <gilligan@vyatta.com>, 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>
>
> ISTR we disabled floppy support completely in debian in order to avoid this
> kind of trouble (I would disable it in official GRUB as well, but I can
> already feel there'd be some opposition :-)).
Only for util/hostdisk.c
> Anyway, my point is that floppies are too unreliable. We detect them when
> iterating even if they're not readable. Perhaps we could actually probe them
> for read during iteration to solve this.
>
> > > + grub_errno = GRUB_ERR_NONE; /* Used as error flag */
> > > device_name = grub_file_get_device_name (name);
> > > if (grub_errno)
> > > return 0;
>
> This looks like a hack.
>
r2444 should fix this. I just check now if it returns 0 and not for
grub_errno.
--
Felix Zielcke
Proud Debian Maintainer
^ permalink raw reply [flat|nested] 5+ messages in thread
end of thread, other threads:[~2009-07-25 16:58 UTC | newest]
Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-24 23:35 [Fwd: Bug#503344: Grub-pc fails on IBM x3250 configured with RAID-1] Felix Zielcke
2009-07-25 8:37 ` Vladimir 'phcoder' Serbinenko
2009-07-25 9:31 ` Felix Zielcke
2009-07-25 16:45 ` Robert Millan
2009-07-25 16:58 ` Felix Zielcke
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.