Friday, August 30, 2013

Implementation Details of Enterprise, my Custom UEFI Booting Solution for Linux on Intel Macs

My repository on GitHub holding the source code for my program Enterprise is currently sparse on commits - no updates in over a month. But before you accost me for being lazy, listen up, for I have not been lazy, nor has the project been abandoned. I simply have been using this time to figure out exactly how I'm going to implement the program instead of simply throwing code together like before.

So, what do I have in mind? Well, listen up.

My booting solution for booting Linux distributions via EFI is a three-stage loading process, involving (at least) three files instead of the present two (two EFI executables and one ISO file of your preferred Linux distribution). These programs will be executed in sequential order. This works out as follows:
  1. The user boots into the USB drive made by Mac Linux USB Loader. Enterprise will then perform some hardware checks to ensure that you actually booted on a Mac. It will then display a menu similar to those found in gummiboot or GRUB. I'm looking at rather basic options at this point - the options will be to boot normally, boot with certain options (like no graphical X desktop and/or disabling kernel mode setting), or reloading and/or dropping into an EFI shell.
  2. If the user chooses to boot the operating system, we then write out a configuring file detailing exactly what is needed to boot Linux on the current hardware. Then we pass control off to GRUB, which is another EFI executable in the same directory. GRUB reads this configuration file and boots the Linux distribution included in the installed ISO file.
  3. GRUB loads the kernel and RamDisk from the ISO using loopback. Together the kernel starts up the remainder of the operating system.
This approach will ultimately yield itself to be a more viable alternative to the current solution, which works with hard coded kernel locations inside of the ISO (however, loopback support will still be required, as this is required for GRUB to boot from the ISO file - there isn't really any way around this). Additionally, it will allow me to add support for more distributions with relative simplicity.

For those of you who want to see the directory structure, here's what it will look like:


I know many of you have been waiting very patiently for a solution. Tails, Knoppix, Backtrack, and Arch Linux are all distributions that I've been requested to support. I assure you that I am working as fast as I can to get these distributions working with Mac Linux USB Loader. I have no idea when this solution will be ready for beta testing, but everything should be on track now.

What do you think of this setup? Comment below. If you prefer to communicate via email, I can be reached here.

5 comments:

Wizard Infoways said...

WIPL is a IT company which is known for its enterprise solutions in ncr.


For more info : Enterprise solutions in Ncr

Craig Hendricks said...

I'm really happy I found this solution. I always thought that you could not boot to a USB drive if you had FileVault turned on on your Mac. I got as far as the grub loading. I'm just not certain of the the command that I need to input into the grub in order for to load the operating system. If you could just comment back and let me know the command, I would be extremely grateful. Thanks so much.

SevenBits said...

Craig - it depends on what Linux distribution that you are trying to load. FYI, you will get a faster response if you email me.

Unknown said...

Hi SevenBits,

Interesting solution, but seems it requires OSX 1.7....

I just upgraded one mac from 1.6 and now it doesn't work any longer, so looking to try Linux on it (fairly sure it is OS level issue). The only other mac I have also runs 1.6, and I'm NOT going to risk that one in order to make the first one run Linux ...

..so'eh, any way to get your tool to run on 1.6, or is there a Windows equivalent?

sebus said...

While it works perfectly on any PC with EFI (or Vmware Workstation 11) it does NOT work on late 2014 Mac Mini

Just hangs on the:

Welcome to Enterprise 0.2.1