All of lore.kernel.org
 help / color / mirror / Atom feed
* GRUB 1.96 - unknown commands
@ 2009-07-10  6:40 Chris Smart
  2009-07-10  6:59 ` Marco Gerards
  2009-07-10  7:13 ` Bean
  0 siblings, 2 replies; 6+ messages in thread
From: Chris Smart @ 2009-07-10  6:40 UTC (permalink / raw)
  To: grub-devel

Hi all,

I'm trying to get GRUB2 to boot on an EFI system (Apple Mac) using
grub.efi and rEFIt as the boot manager.

I have checked GRUB out of svn and built it with the following
commands (on a 32bit Linux operating system):

./configure --with-platform=efi
make
./grub-mkimage -d . -o grub.efi gpt hfsplus fat ext2 normal chain boot
configfile
sudo cp grub.efi *.mod fs.lst command.lst /efi/grub/

Upon a reboot, rEFIt detects the grub.efi and presents the option to boot it.

Without a grub.cfg configuration file, it boots straight to a GRUB
1.96 shell which looks good. There I have the help command and I can
see all the modules I copied across.

I can also boot the kernel and initrd that I want by manually typing
in the "linux", "initrd", and "boot" commands. Nice.

When I boot it with a config file however, it cannot parse the
grub.cfg file and spits out errors about unknown commands.
I am assuming that I have left out a module or something, but for the
life of me I can't work out what I've done wrong!

Here is the simple grub.cfg that I am using:

set timeout=10
set default=0
menuentry "Linux" {
  linux /efi/grub/vmlinuz
  initrd /efi/grub/initrd
}


Here is what happens:

Boot PC to rEFIt
Select grub.efi boot option
Computer says "Starting grub.efi"
Computer goes to GRUB 1.96 shell

GRUB spits out errors:
Unknown command 'menuentry'
Unknown command '}'
Unknown command 'linux'
Unknown command 'initrd'
..and so on.

Once that happens, none of the commands work, even though I'm at the
prompt. It's like the config has broken everything.

Any ideas?

I have seen this post on the mailing list, but it doesn't seem to
match my issue.
"http://lists.gnu.org/archive/html/grub-devel/2009-03/msg00389.html"

Thanks!
Chris



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

* Re: GRUB 1.96 - unknown commands
  2009-07-10  6:40 GRUB 1.96 - unknown commands Chris Smart
@ 2009-07-10  6:59 ` Marco Gerards
  2009-07-10  7:13 ` Bean
  1 sibling, 0 replies; 6+ messages in thread
From: Marco Gerards @ 2009-07-10  6:59 UTC (permalink / raw)
  To: The development of GRUB 2

Hi,

Chris Smart <mail@christophersmart.com> writes:

> Here is the simple grub.cfg that I am using:
>
> set timeout=10
> set default=0
> menuentry "Linux" {
>   linux /efi/grub/vmlinuz
>   initrd /efi/grub/initrd
> }
>
>
> Here is what happens:
>
> Boot PC to rEFIt
> Select grub.efi boot option
> Computer says "Starting grub.efi"
> Computer goes to GRUB 1.96 shell
>
> GRUB spits out errors:
> Unknown command 'menuentry'
> Unknown command '}'

This *should* be impossible.  These symbols are parsed by normal.mod
and for a good purpose as you can see.  Is it possible that lua
integration has broken this?  Support for the core scripting language
is more important to me than any additional scripting language.

--
Marco




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

* Re: GRUB 1.96 - unknown commands
  2009-07-10  6:40 GRUB 1.96 - unknown commands Chris Smart
  2009-07-10  6:59 ` Marco Gerards
@ 2009-07-10  7:13 ` Bean
  2009-07-10  7:31   ` Chris Smart
  2009-07-10  7:39   ` Marco Gerards
  1 sibling, 2 replies; 6+ messages in thread
From: Bean @ 2009-07-10  7:13 UTC (permalink / raw)
  To: The development of GRUB 2

Hi,

You need to add module sh, minicmd and linux.

On Fri, Jul 10, 2009 at 2:40 PM, Chris Smart<mail@christophersmart.com> wrote:
> Hi all,
>
> I'm trying to get GRUB2 to boot on an EFI system (Apple Mac) using
> grub.efi and rEFIt as the boot manager.
>
> I have checked GRUB out of svn and built it with the following
> commands (on a 32bit Linux operating system):
>
> ./configure --with-platform=efi
> make
> ./grub-mkimage -d . -o grub.efi gpt hfsplus fat ext2 normal chain boot
> configfile
> sudo cp grub.efi *.mod fs.lst command.lst /efi/grub/
>
> Upon a reboot, rEFIt detects the grub.efi and presents the option to boot it.
>
> Without a grub.cfg configuration file, it boots straight to a GRUB
> 1.96 shell which looks good. There I have the help command and I can
> see all the modules I copied across.
>
> I can also boot the kernel and initrd that I want by manually typing
> in the "linux", "initrd", and "boot" commands. Nice.
>
> When I boot it with a config file however, it cannot parse the
> grub.cfg file and spits out errors about unknown commands.
> I am assuming that I have left out a module or something, but for the
> life of me I can't work out what I've done wrong!
>
> Here is the simple grub.cfg that I am using:
>
> set timeout=10
> set default=0
> menuentry "Linux" {
>  linux /efi/grub/vmlinuz
>  initrd /efi/grub/initrd
> }
>
>
> Here is what happens:
>
> Boot PC to rEFIt
> Select grub.efi boot option
> Computer says "Starting grub.efi"
> Computer goes to GRUB 1.96 shell
>
> GRUB spits out errors:
> Unknown command 'menuentry'
> Unknown command '}'
> Unknown command 'linux'
> Unknown command 'initrd'
> ..and so on.
>
> Once that happens, none of the commands work, even though I'm at the
> prompt. It's like the config has broken everything.
>
> Any ideas?
>
> I have seen this post on the mailing list, but it doesn't seem to
> match my issue.
> "http://lists.gnu.org/archive/html/grub-devel/2009-03/msg00389.html"
>
> Thanks!
> Chris
>
>
> _______________________________________________
> Grub-devel mailing list
> Grub-devel@gnu.org
> http://lists.gnu.org/mailman/listinfo/grub-devel
>



-- 
Bean



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

* Re: GRUB 1.96 - unknown commands
  2009-07-10  7:13 ` Bean
@ 2009-07-10  7:31   ` Chris Smart
  2009-07-10  7:39   ` Marco Gerards
  1 sibling, 0 replies; 6+ messages in thread
From: Chris Smart @ 2009-07-10  7:31 UTC (permalink / raw)
  To: The development of GRUB 2

2009/7/10 Bean <bean123ch@gmail.com>:
> Hi,
>
> You need to add module sh, minicmd and linux.

Thank you, thank you!!

I don't mean to presume I know what I'm talking about, but should the
Wiki entry on testing EFI be updated to reflect the fact that it needs
these extra modules?
"http://grub.enbug.org/TestingOnEFI"
"http://grub.enbug.org/TestingOnMacbook"

That's where I got the initial list from which I used to build
grub.efi.. I did try to add all modules at one point, but when I did
that it killed the machine.

So I figured it was a module issue, but I had no idea which one.
Finally, after a week of pulling my hair out (and trying to learn
about this EFI stuff from scratch) I emailed the list out of
desperation.

Thank you again.. you have restored my sanity, for now! ;-)

Cheers,
-c



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

* Re: GRUB 1.96 - unknown commands
  2009-07-10  7:13 ` Bean
  2009-07-10  7:31   ` Chris Smart
@ 2009-07-10  7:39   ` Marco Gerards
  2009-07-10  8:58     ` Bean
  1 sibling, 1 reply; 6+ messages in thread
From: Marco Gerards @ 2009-07-10  7:39 UTC (permalink / raw)
  To: The development of GRUB 2

Hello,

Bean <bean123ch@gmail.com> writes:

> You need to add module sh, minicmd and linux.

What was the reason it was split up?  Sorry, I must have missed a
discussion.

I prefer scripting and normal.mod to be integrated, to prevent
problems like these.

--
Marco




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

* Re: GRUB 1.96 - unknown commands
  2009-07-10  7:39   ` Marco Gerards
@ 2009-07-10  8:58     ` Bean
  0 siblings, 0 replies; 6+ messages in thread
From: Bean @ 2009-07-10  8:58 UTC (permalink / raw)
  To: The development of GRUB 2

On Fri, Jul 10, 2009 at 3:39 PM, Marco Gerards<mgerards@xs4all.nl> wrote:
> Hello,
>
> Bean <bean123ch@gmail.com> writes:
>
>> You need to add module sh, minicmd and linux.
>
> What was the reason it was split up?  Sorry, I must have missed a
> discussion.
>
> I prefer scripting and normal.mod to be integrated, to prevent
> problems like these.

Hi,

Some time ago, I split reader and parser, now normal.mod only contains
the normal reader, parser is moved to module sh.mod. But normal.mod
would tries to load sh.mod from disk. But for EFI, prefix is set to
the same directory as grub.efi, not /efi/grub.

There are some advantage for splitting the parser. First, we can
implement multiple parser, there are currently three of them, rescue,
sh and lua. Reader is responsible for user input, now there are two,
rescue and normal. Splitting the module also make it possible to fine
tune the modules embedded in kernel.

-- 
Bean



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

end of thread, other threads:[~2009-07-10  8:58 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2009-07-10  6:40 GRUB 1.96 - unknown commands Chris Smart
2009-07-10  6:59 ` Marco Gerards
2009-07-10  7:13 ` Bean
2009-07-10  7:31   ` Chris Smart
2009-07-10  7:39   ` Marco Gerards
2009-07-10  8:58     ` Bean

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.