Mentor for Restoring Grub from Ubuntu installation CD

Yazen Ghannam yghannam7388 at
Sun Mar 22 17:43:33 GMT 2009

Hello everyone,

My name is Yazen Ghannam and I'm an Electrical Engineering student at 
the University of Central Florida, USA. While trying to find a mentor 
for a couple of other projects, someone mentioned this project. So for 
the past two days I've been working on it a bit and I think it would 
also be a good one for GSoC. Here's what I posted on the Wiki.




      *Student*: Yazen Ghannam <>



There should be a way to restore Grub from the Ubuntu installation CD 
instead of having to boot into a LiveCD and doing everything from the 

Here's the work done so far:

   1. I've tried using Super Grub Disk by adding it to the Live CD and
      booting it with Isolinux. Since Grub itself is a bootloader this
      didn't work well.
   2. Since memtest86+ can be loaded by Isolinux, I thought about
      getting a binary version of Grub.
   3. I found Grub4DOS which is almost exactly like Grub but they
      package it in a convenient executable.
   4. I added Grub4DOS to the Live CD and created an entry for it in the
      menu.cfg for Isolinux.

      I can boot into grub from the live cd now and Grub4Dos
      <> can automatically find
      /boot/grub/menu.lst on my Ubuntu partion.

   6. I can enter the grub commandline and follow the step to reinstall
      grub mentioned on the Ubuntu Wiki.

Things that don't work yet but should (and background info):


      Grub4Dos <> cannot find the
      menu.lst located on the Live CD but it can find the one located on
      the Ubuntu partition. Grub4Dos <>
      looks for a menu.lst and starts in its local directory, but I
      cannot make it find the one that comes with it. When I make a CD
      with Grub4Dos <> on it only using
      the grldr bootloader, everything works fine. So I believe the
      issue to be with Isolinux.


      Once I can get Grub4Dos <> to find
      the right menu.lst, all that is left is writing a menu with the
      the options and commands we want. For example, a five option menu:
      1. Automatic reinstall (used if only one linux partition is
      found), 2. Manual reinstall (used if two or more linux partitions
      are found, user selects which to use), 3. Boot Partition, 4. Back
      to Main Menu, 5. Reboot/Shutdown.


      One solution to Grub4Dos <> not
      finding the menu.lst is to add the commands we need to the the
      /boot/grub/menu.lst. We can also restructure it with submenus. For
      example, memtest86+ and Reinstall Grub both under an "Ubuntu
      Utilities" menu.

More information about the ubuntu-soc mailing list