[Fwd: Bug#503344: Grub-pc fails on IBM x3250 configured with RAID-1]
Is this an acceptable fix?
Though I have the feeling this isn't a proper one.
-------- Weitergeleitete Nachricht --------
Quoted 44 lines
Von: Bob Gilligan <[email protected]>
Reply-to: Bob Gilligan <[email protected]>, [email protected]
An: [email protected]
Betreff: Bug#503344: Grub-pc fails on IBM x3250 configured with RAID-1
Datum: Fri, 24 Oct 2008 16:19:59 -0700Package: grub-pc
Version: 1.96+20080724-10After 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()whengrub_dl_load_file()was attempting to load the normal mode module. Thegrub_file_open()function checks the return status of its call togrub_file_get_device_name()by checking the value ofgrub_errno. Ifgrub_errnois non-zero,grub_file_open()returns failure. Butgrub_file_get_device_name()can succeed, but the error test fail, ifgrub_errnowas set in some earlier operation. In this case, apparently an early attempt to open a non-existent device setgrub_errno.The fix is to assign
grub_errnobefore making the call togrub_file_get_device_name():kern/file.c +1
-0@@ -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 ;
Signature · 2 lines
Felix Zielcke Proud Debian Maintainer
Quoted 6 lines · Felix Zielcke
Is this an acceptable fix?
Though I have the feeling this isn't a proper one.Quoted 3 lines
The fix is to assign
grub_errnobefore making the call togrub_file_get_device_name():
Just check whether returned device_name is 0 or not
Quoted 26 lines
kern/file.c grub_file_open (const char *name) · line 65
Quoted 13 lines
kern/file.c +1
-0@@ -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
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 4 lines
Regards Vladimir 'phcoder' Serbinenko Personal git repository: http://repo.or.cz/w/grub2/phcoder.git
Am Samstag, den 25.07.2009, 10:37 +0200 schrieb Vladimir 'phcoder' Serbinenko:
Quoted 8 lines · Felix Zielcke
Quoted 6 lines
Is this an acceptable fix?
Though I have the feeling this isn't a proper one.Quoted 3 lines
The fix is to assign
grub_errnobefore making the call togrub_file_get_device_name():Just check whether returned
device_nameis 0 or not
Ok, I should have checked the actual code. That was pretty clear. Sorry for the noise.
Quoted 29 lines
Quoted 26 lines
kern/file.c grub_file_open (const char *name) · line 65
Quoted 13 lines
kern/file.c +1
-0@@ -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
[email protected]
http://lists.gnu.org/mailman/listinfo/grub-devel
Signature · 2 lines
Felix Zielcke Proud Debian Maintainer
Quoted 22 lines · Felix Zielcke
Is this an acceptable fix?
Though I have the feeling this isn't a proper one.-------- Weitergeleitete Nachricht --------
Quoted 18 lines
Von: Bob Gilligan <[email protected]>
Reply-to: Bob Gilligan <[email protected]>, [email protected]
An: [email protected]
Betreff: Bug#503344: Grub-pc fails on IBM x3250 configured with RAID-1
Datum: Fri, 24 Oct 2008 16:19:59 -0700Package: grub-pc
Version: 1.96+20080724-10After 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.
Quoted 4 lines
Quoted 4 lines
+
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.
Signature · 5 lines
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."
Am Samstag, den 25.07.2009, 18:45 +0200 schrieb Robert Millan:
Quoted 20 lines · Felix Zielcke
Quoted 19 lines
Is this an acceptable fix?
Though I have the feeling this isn't a proper one.-------- Weitergeleitete Nachricht --------
Quoted 15 lines
Von: Bob Gilligan <[email protected]>
Reply-to: Bob Gilligan <[email protected]>, [email protected]
An: [email protected]
Betreff: Bug#503344: Grub-pc fails on IBM x3250 configured with RAID-1
Datum: Fri, 24 Oct 2008 16:19:59 -0700Package: grub-pc
Version: 1.96+20080724-10After 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!
Quoted 7 lines
Quoted 3 lines
Quoted 3 lines
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
Quoted 11 lines
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.
Quoted 4 lines
Quoted 4 lines
+
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.
Signature · 2 lines
Felix Zielcke Proud Debian Maintainer