This page is all based on the work of Dag Sverre Seljebotn, at (Linux on Compaq EVO T20 HOWTO)

These notes assume that you will create a directory called t20 in your home directory and do everything in there.

A basic primer on diff and patch can be found at

Note: at the least you need GCC installed in order to build grub. If you are running Debian or Ubuntu, installing the build-essential package will probably get you enough. Look at if you need to find out what is in build-essential.

Download and unpack sourcecode

Make the working directory, and change into that directory:

$ mkdir t20
$ cd t20

Get grub-0.97.tar.gz from the ftp site listed at the top of and save it into your t20 directory.

Unpack it with:

$ tar -xzvvf grub-0.97.tar.gz
(big list of files appears here)

This will create a directory called grub-0.97 with all the sourcecode in it.

Get the patch

Create a file called devosl-grub.patch in the t20 directory containing this:


Apply the patch

In the grub-0.97 directory, run the patch command as follows and it will display the list of files it modifies:

$ patch -p1 <../devosl-grub.patch
patching file
patching file presetmenu-DEvoSL
patching file stage1/stage1.S
patching file stage2/asm.S
patching file stage2/builtins.c
patching file stage2/common.c
patching file stage2/start.S

Configure and compile

In the grub-0.97 directory, do this:

$ chmod +x
$ ./
(list of various checks appears here, hopefully without error messages)

$ make clean
(list of things being tidied)

$ make all
(list of compiler messages, hopefully with only warnings and no errors)

All done! (hopefully)

Note that nothing interesting will be obvious - the two files we want are:

  • t20/grub-0.97/stage1/stage1
  • t20/grub-0.97/stage2/stage2