All of lore.kernel.org
 help / color / mirror / Atom feed
* Faulty grub-mkdevicemap file
@ 2009-04-25 17:26 BandiPat
  2009-04-25 19:29 ` BandiPat
  0 siblings, 1 reply; 5+ messages in thread
From: BandiPat @ 2009-04-25 17:26 UTC (permalink / raw)
  To: Grub2 Development

BandiPat writes:
 > Oh, has anyone experienced any problems with grub-mkdevicemap when 
installing Grub2 or updating?  I had one user complain about it 
segfaulting on his machine, but I've not seen any problems.  This is 
with svn2137.
---------------
Andreas wrote:
I'm experiencing also problems using it, but it's not segfaulting. Using 
a svn2130 build grub-mkdevicemap --no-floppy create a device.map with 
proper content like this:
(hd0) /dev/sda
But a svn2137 build (exactly the same BandiPat uses) creates this 
content, which might not be wrong, but at least the most important part 
my HDD is missing:
(fd0) (null)

Probably this problem was introduced by revision 2133 and obviously 
wasn't fixed in rev 2134 - 2137 and in 2138 - 2140 I can see nothing 
which might fix this.

It would be great if somebody could have a look what could cause this 
problem. Maybe davem as the author of that revision.
If you need any additional information give me a yell and I'll try my 
best to provide it.
==============

Decided to start a new topic more fitting to this problem.  Sorry for 
what looks like a double posting.

I just tested on one machine, running grub-mkdevicemap -v from the 
shell, which resulted in a segfault and blank device.map file in /boot/grub!

Looks like some bug was introduced after svn2130 in the file.

Thanks devs for your attention to this one.

Pat



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Faulty grub-mkdevicemap file
  2009-04-25 17:26 Faulty grub-mkdevicemap file BandiPat
@ 2009-04-25 19:29 ` BandiPat
  2009-04-25 23:32   ` David Miller
  2009-04-26  8:46   ` David Miller
  0 siblings, 2 replies; 5+ messages in thread
From: BandiPat @ 2009-04-25 19:29 UTC (permalink / raw)
  To: The development of GRUB 2

BandiPat wrote:

> Probably this problem was introduced by revision 2133 and obviously 
> wasn't fixed in rev 2134 - 2137 and in 2138 - 2140 I can see nothing 
> which might fix this.
> 
> It would be great if somebody could have a look what could cause this 
> problem. Maybe davem as the author of that revision.
> If you need any additional information give me a yell and I'll try my 
> best to provide it.
> ==============
> 
> Decided to start a new topic more fitting to this problem.  Sorry for 
> what looks like a double posting.
> 
> I just tested on one machine, running grub-mkdevicemap -v from the 
> shell, which resulted in a segfault and blank device.map file in 
> /boot/grub!
> 
> Looks like some bug was introduced after svn2130 in the file.
> 
> Thanks devs for your attention to this one.
______________________________________________

Here is the error when running grub-install:

grub-install /dev/sda
/usr/sbin/grub-install: line 203:  1362 Segmentation fault 
$grub_mkdevicemap --device-map=$device_map $no_floppy

This is using svn2140 release.




^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Faulty grub-mkdevicemap file
  2009-04-25 19:29 ` BandiPat
@ 2009-04-25 23:32   ` David Miller
  2009-04-26  8:46   ` David Miller
  1 sibling, 0 replies; 5+ messages in thread
From: David Miller @ 2009-04-25 23:32 UTC (permalink / raw)
  To: grub-devel, magicpage91

From: BandiPat <magicpage91@earthlink.net>
Date: Sat, 25 Apr 2009 15:29:11 -0400

> Here is the error when running grub-install:
> 
> grub-install /dev/sda
> /usr/sbin/grub-install: line 203: 1362 Segmentation fault
> $grub_mkdevicemap --device-map=$device_map $no_floppy
> 
> This is using svn2140 release.

Can you please run grub-mkdevicemap with the proper arguments
under gdb and get a backtrace?

With that, I can fix this bug.

Thanks!



^ permalink raw reply	[flat|nested] 5+ messages in thread

* Re: Faulty grub-mkdevicemap file
  2009-04-25 19:29 ` BandiPat
  2009-04-25 23:32   ` David Miller
@ 2009-04-26  8:46   ` David Miller
  2009-04-26  8:57     ` Andreas
  1 sibling, 1 reply; 5+ messages in thread
From: David Miller @ 2009-04-26  8:46 UTC (permalink / raw)
  To: grub-devel, magicpage91

From: BandiPat <magicpage91@earthlink.net>
Date: Sat, 25 Apr 2009 15:29:11 -0400

> Here is the error when running grub-install:

I just checked in the following patch which will fix this
bug.

2009-04-26  David S. Miller  <davem@davemloft.net>

	* util/grub-mkdevicemap.c (make_device_map): Add missing
	NESTED_FUNC_ATTR to process_device().

diff --git a/util/grub-mkdevicemap.c b/util/grub-mkdevicemap.c
index 4f544f8..ac8a390 100644
--- a/util/grub-mkdevicemap.c
+++ b/util/grub-mkdevicemap.c
@@ -42,9 +42,9 @@ make_device_map (const char *device_map, int floppy_disks)
   int num_fd = 0;
   FILE *fp;
 
-  auto int process_device (const char *name, int is_floppy);
+  auto int NESTED_FUNC_ATTR process_device (const char *name, int is_floppy);
 
-  int process_device (const char *name, int is_floppy)
+  int NESTED_FUNC_ATTR process_device (const char *name, int is_floppy)
   {
     grub_util_emit_devicemap_entry (fp, (char *) name,
 				    is_floppy, &num_fd, &num_hd);



^ permalink raw reply related	[flat|nested] 5+ messages in thread

* Re: Faulty grub-mkdevicemap file
  2009-04-26  8:46   ` David Miller
@ 2009-04-26  8:57     ` Andreas
  0 siblings, 0 replies; 5+ messages in thread
From: Andreas @ 2009-04-26  8:57 UTC (permalink / raw)
  To: The development of GRUB 2

Thanks a lot, this fixed it.

David Miller schrieb:
> From: BandiPat <magicpage91@earthlink.net>
> Date: Sat, 25 Apr 2009 15:29:11 -0400
>
>   
>> Here is the error when running grub-install:
>>     
>
> I just checked in the following patch which will fix this
> bug.
>
> 2009-04-26  David S. Miller  <davem@davemloft.net>
>
> 	* util/grub-mkdevicemap.c (make_device_map): Add missing
> 	NESTED_FUNC_ATTR to process_device().
>
> diff --git a/util/grub-mkdevicemap.c b/util/grub-mkdevicemap.c
> index 4f544f8..ac8a390 100644
> --- a/util/grub-mkdevicemap.c
> +++ b/util/grub-mkdevicemap.c
> @@ -42,9 +42,9 @@ make_device_map (const char *device_map, int floppy_disks)
>    int num_fd = 0;
>    FILE *fp;
>  
> -  auto int process_device (const char *name, int is_floppy);
> +  auto int NESTED_FUNC_ATTR process_device (const char *name, int is_floppy);
>  
> -  int process_device (const char *name, int is_floppy)
> +  int NESTED_FUNC_ATTR process_device (const char *name, int is_floppy)
>    {
>      grub_util_emit_devicemap_entry (fp, (char *) name,
>  				    is_floppy, &num_fd, &num_hd);
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>   




^ permalink raw reply	[flat|nested] 5+ messages in thread

end of thread, other threads:[~2009-04-26  8:57 UTC | newest]

Thread overview: 5+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-04-25 17:26 Faulty grub-mkdevicemap file BandiPat
2009-04-25 19:29 ` BandiPat
2009-04-25 23:32   ` David Miller
2009-04-26  8:46   ` David Miller
2009-04-26  8:57     ` Andreas

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.