All of lore.kernel.org
 help / color / mirror / Atom feed
* 1) too big kernel on 1.92. 2) unrecognized: %lex-param.
@ 2006-04-19 11:16 Jeff Chua
  2006-04-19 11:58 ` Yoshinori K. Okuji
  2006-04-19 13:06 ` Marco Gerards
  0 siblings, 2 replies; 7+ messages in thread
From: Jeff Chua @ 2006-04-19 11:16 UTC (permalink / raw)
  To: Grub Devel


I got this message trying to boot linux using grub2 on a Dell Optiplex 
GX620 which has 4GB RAM. The same kernel booted fine on a IBM notebook 
using the same grub2 with 2GB RAM.

version is Grub2 1.92.

"Too big kernel"

Why?


I tried to use the latest CVS, but got the following errors when compiling 
...


include/grub/script.h:27:29: grub_script.tab.h: No such file or directory

bison -d -p grub_script_yy -b grub_script ./normal/parser.y
./normal/parser.y:54: unrecognized: %lex-param
./normal/parser.y:54:    Skipping to next %
./normal/parser.y:55: unrecognized: %parse-param
./normal/parser.y:55:    Skipping to next %



Thanks,
Jeff



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

* Re: 1) too big kernel on 1.92. 2) unrecognized: %lex-param.
  2006-04-19 11:16 1) too big kernel on 1.92. 2) unrecognized: %lex-param Jeff Chua
@ 2006-04-19 11:58 ` Yoshinori K. Okuji
  2006-04-20  0:15   ` Jeff Chua
  2006-04-19 13:06 ` Marco Gerards
  1 sibling, 1 reply; 7+ messages in thread
From: Yoshinori K. Okuji @ 2006-04-19 11:58 UTC (permalink / raw)
  To: The development of GRUB 2

On Wednesday 19 April 2006 13:16, Jeff Chua wrote:
> I got this message trying to boot linux using grub2 on a Dell Optiplex
> GX620 which has 4GB RAM. The same kernel booted fine on a IBM notebook
> using the same grub2 with 2GB RAM.
>
> version is Grub2 1.92.
>
> "Too big kernel"
>
> Why?

Can you debug it yourself a bit? I cannot afford buying so much memory. ;)

In loader/i386/pc/linux.c, there is a piece of code like this:

  if (grub_file_size (file) > (grub_ssize_t) grub_os_area_size)
    {
      grub_error (GRUB_ERR_OUT_OF_RANGE, "too big kernel");
      goto fail;
    }

Can you see what is printed when you change this to:

  if (grub_file_size (file) > (grub_ssize_t) grub_os_area_size)
    {
      grub_error (GRUB_ERR_OUT_OF_RANGE, "too big kernel (0x%x > 0x%x)",
                  grub_file_size (file), grub_os_area_size);
      goto fail;
    }

Cheers,
Okuji



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

* Re: 1) too big kernel on 1.92. 2) unrecognized: %lex-param.
  2006-04-19 11:16 1) too big kernel on 1.92. 2) unrecognized: %lex-param Jeff Chua
  2006-04-19 11:58 ` Yoshinori K. Okuji
@ 2006-04-19 13:06 ` Marco Gerards
  2006-04-19 15:28   ` Jeff Chua
  1 sibling, 1 reply; 7+ messages in thread
From: Marco Gerards @ 2006-04-19 13:06 UTC (permalink / raw)
  To: The development of GRUB 2

Jeff Chua <jeff84@silk.corp.fedex.com> writes:

> I tried to use the latest CVS, but got the following errors when
> compiling ...
>
>
> include/grub/script.h:27:29: grub_script.tab.h: No such file or directory
>
> bison -d -p grub_script_yy -b grub_script ./normal/parser.y
> ./normal/parser.y:54: unrecognized: %lex-param
> ./normal/parser.y:54:    Skipping to next %
> ./normal/parser.y:55: unrecognized: %parse-param
> ./normal/parser.y:55:    Skipping to next %

Which bison version do you use?

I have bison version 2.0.

--
Marco




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

* Re: 1) too big kernel on 1.92. 2) unrecognized: %lex-param.
  2006-04-19 13:06 ` Marco Gerards
@ 2006-04-19 15:28   ` Jeff Chua
  0 siblings, 0 replies; 7+ messages in thread
From: Jeff Chua @ 2006-04-19 15:28 UTC (permalink / raw)
  To: The development of GRUB 2

> Jeff Chua <jeff84@silk.corp.fedex.com> writes:
>
>> ./normal/parser.y:54: unrecognized: %lex-param
> I have bison version 2.0.

Bison was bison-1.35, so updated to bison-2.1 and problem went away.

Thank you.


Jeff.



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

* Re: 1) too big kernel on 1.92. 2) unrecognized: %lex-param.
  2006-04-19 11:58 ` Yoshinori K. Okuji
@ 2006-04-20  0:15   ` Jeff Chua
  2006-04-20  0:50     ` Jeff Chua
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Chua @ 2006-04-20  0:15 UTC (permalink / raw)
  To: The development of GRUB 2


On Wed, 19 Apr 2006, Yoshinori K. Okuji wrote:
> Can you debug it yourself a bit? I cannot afford buying so much memory. ;)

It says ...

error: tog big kernel (0x187a58 > 0xa7825100)

I would like to help debug further, but don't really know how or where to 
start ...

Again, the same kernel works on system with less memory. Also, the same 
4GB machine can still boot up with "loadlin".

Thanks,
Jeff.




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

* Re: 1) too big kernel on 1.92. 2) unrecognized: %lex-param.
  2006-04-20  0:15   ` Jeff Chua
@ 2006-04-20  0:50     ` Jeff Chua
  2006-04-20  2:34       ` Yoshinori K. Okuji
  0 siblings, 1 reply; 7+ messages in thread
From: Jeff Chua @ 2006-04-20  0:50 UTC (permalink / raw)
  To: The development of GRUB 2


> On Wed, 19 Apr 2006, Yoshinori K. Okuji wrote:
>> Can you debug it yourself a bit? I cannot afford buying so much memory. ;)
>
> error: tog big kernel (0x187a58 > 0xa7825100)

Wait a second, it's obviously wrong, huh?

Thanks for pointing this out. 0xa7825100 has a leading "1", so needs to 
cast as unsigned.


Thank you,
Jeff.


Here's a patch to fix the problem ...

--- ./loader/i386/pc/linux.c.org	2006-04-20 08:39:51 +0800
+++ ./loader/i386/pc/linux.c	2006-04-20 08:33:39 +0800
@@ -81,9 +81,10 @@
    if (! file)
      goto fail;

-  if (grub_file_size (file) > (grub_ssize_t) grub_os_area_size)
+  if ((unsigned) grub_file_size (file) > (unsigned) (grub_ssize_t) grub_os_area_size)
      {
-      grub_error (GRUB_ERR_OUT_OF_RANGE, "too big kernel");
+      grub_error (GRUB_ERR_OUT_OF_RANGE, "too big kernel (0x%x > 0x%x)",
+      	grub_file_size (file), (grub_ssize_t) grub_os_area_size);
        goto fail;
      }




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

* Re: 1) too big kernel on 1.92. 2) unrecognized: %lex-param.
  2006-04-20  0:50     ` Jeff Chua
@ 2006-04-20  2:34       ` Yoshinori K. Okuji
  0 siblings, 0 replies; 7+ messages in thread
From: Yoshinori K. Okuji @ 2006-04-20  2:34 UTC (permalink / raw)
  To: The development of GRUB 2

On Thursday 20 April 2006 02:50, Jeff Chua wrote:
> > On Wed, 19 Apr 2006, Yoshinori K. Okuji wrote:
> >> Can you debug it yourself a bit? I cannot afford buying so much memory.
> >> ;)
> >
> > error: tog big kernel (0x187a58 > 0xa7825100)
>
> Wait a second, it's obviously wrong, huh?
>
> Thanks for pointing this out. 0xa7825100 has a leading "1", so needs to
> cast as unsigned.

Thanks for your test. Yes, you are right. I've fixed this in the CVS right 
now.

Okuji



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

end of thread, other threads:[~2006-04-20  2:34 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-04-19 11:16 1) too big kernel on 1.92. 2) unrecognized: %lex-param Jeff Chua
2006-04-19 11:58 ` Yoshinori K. Okuji
2006-04-20  0:15   ` Jeff Chua
2006-04-20  0:50     ` Jeff Chua
2006-04-20  2:34       ` Yoshinori K. Okuji
2006-04-19 13:06 ` Marco Gerards
2006-04-19 15:28   ` Jeff Chua

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.