birds like wires

Search

GRUB2 for Joggler

Released: 31st January 2012

Download GRUB2 v1.98 – (2.5MB)


I have a few Joggler plans afoot at the moment and one thing that has been bugging me a little is GRUB2. Almost two years ago the grub-gop-video-v1.patch was written, which enabled proper video output by GRUB2 on the Joggler at startup. This is brilliant. Now we can have splash screens and, more importantly, we’re able to see what’s going on at boot time. That’s pretty fundamental. However, it doesn’t look terribly pretty.

So, I set about recompiling GRUB2 v1.98 into two versions; one with the patch applied and one without. This way it is easy to switch to a quiet output, where the EFI boot logo remains on screen all the way through boot until the graphics driver is initialised. In case of problems, the USB device can be plugged into another machine and a quick change to boot.nsh will choose GRUB2 with graphics enabled.

Compiling GRUB2

If you feel like doing this yourself, either to add more modules or just for a sense of satisfaction, this is how I went about it. These instructions are a very brief version of those on the Joggler Wiki.

First, grab the GRUB2 v1.98 source code. It’s included, along with Andrew De Quincey’s patch, in the archive if you have any trouble finding them. Then apply the patch to grub-1.98/loader/i386/efi/linux.c (if that’s what you want to do) and compile the whole thing:

cd grub-1.98
patch -p1 loader/i386/efi/linux.c < grub-gop-video-v1.patch
./configure --with-platform=efi
make
./grub-mkimage -d . -o ../grub.efi part_msdos part_gpt fat ext2 hfsplus normal sh chain boot configfile linux help reboot acpi pci search

That last command creates the grub.efi file that you can use to boot the Joggler. You can see the modules I’ve added – they’re the same for both precompiled versions in the archive, although you can certainly exclude at least the help module if you’re building a non-graphical version. You can probably lose part_gpt and hfsplus on both of them as well.

It is true that GRUB2 v1.99 exists these days, but v1.98 works perfectly well and I know how to get the graphics working, which is why I didn’t try the newer version. But if you get it working, please leave a comment!

Hey I know this is off topic but I was wondering if you knew of any widgets I could add to my
blog that automatically tweet my newest twitter updates.
I’ve been looking for a plug-in like this for quite some time and was hoping maybe you would have some experience with something like this. Please let me know if you run into anything. I truly enjoy reading your blog and I look forward to your new updates.