help-grub
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Sending Information to GRUB from a (U)EFI Program


From: SevenBits
Subject: Sending Information to GRUB from a (U)EFI Program
Date: Sun, 10 Nov 2013 16:10:50 -0500

Hello everyone,

It's my first time posting here, and I don't know if this should really be in grub-devel or here, so please correct me if I emailed this to the wrong list.

I'm a developer of Mac Linux USB Loader and Enterprise, a two-piece software program to help boot GNU/Linux on Apple Macintosh computers with (U)EFI. Macs have a slightly off (U)EFI firmware implementation that makes it largely futile to boot even the simplest of distributions on Mac. The program consists of two parts, both open source: the front end Mac Linux USB Loader, a Mac application, and Enterprise, a (U)EFI application.

The firmware I am currently using consists wholly of a compiled (U)EFI GRUB image I found on the Internet. I believe it is using a patched copy of GRUB, and, in violation of the GPL, the author never provided the source code. Since attempts to contact him or her were in vain, I decided to code my own solution. And here we are.

My (U)EFI boot manager program, Enterprise, which you can find on GitHub, allows the user to specify which Linux kernel options they wish to use to boot Linux. My goal is to pass these options to a pre-compiled GRUB image that I distribute with Enterprise, which will load the GNU/Linux distribution from a supplied ISO file using GRUB's loopback and iso9660 file system support (you can view some more info on this here on my blog). My struggle is how to modify GRUB to enable this to happen.

I can already create a pre-compiled GRUB image with an embedded configuration file. Trouble is, I must hard-code the locations to the Linux kernel image and the initial RAM disc in the ISO file, which in effect locks it in to one distribution. It also doesn't allow the user to specify their own kernel parameters. I'd like to change this.

If anyone has any ideas regarding how I could implement a solution like this, I would be grateful. I'm fluent in C and understand the (U)EFI system call framework and can modify GRUB's source code, so the actual implementation of your suggestions won't be an issue. I'd just like to know the most efficient way to transfer small amounts of data from Enterprise to GRUB.

Thanks for your help,

-- SevenBits

Attachment: signature.asc
Description: Message signed with OpenPGP using GPGMail


reply via email to

[Prev in Thread] Current Thread [Next in Thread]