I am trying to add lua support to grub2 and having a devil of a time finding info on how to do that.

The links provided in the answer to (String manipulation in Grub2) no longer have any lua extensions for grub2 (in fact I think only theme code is there, and very old at that).

I found info for elua but the download link it provided here (http://www.eluaproject.net/doc/v0.9/en_tut_bootpc.html) has no ELF binary.

I have downloaded the latest lua 5.3.3 and built it on Linux, but can't find how to create a grub2 .mod file for lua.

I found a really old grub ISO file that included lua support, but if I try to use the .mod files from it in a newer grub I get "license errors", even if I don't reference those modules.

I would greatly appreciate any references or pointers you may have to help me get this accomplished.

1 Answer 1


I found the answer on how to do this:

1) Download the source for the latest version of grub2 from git:

  git clone git://git.sv.gnu.org/grub.git
  cd grub

2) Graft the "grub-extras" source code into the grub2 source tree:

  git clone git://git.sv.gnu.org/grub-extras.git

3) Edit autogen.sh to add grub-extras into the build by adding this:

  export GRUB_CONTRIB=/<absolute pathname to>/grub/grub-extras

4) Now build grub2 as you normally would:

  make install

-- Thats it!

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.