This page details how to convert an Ubuntu installation using Grub Legacy (version 0.97) to Grub 2 (version 1.96 or later) and vice versa.

Grub Legacy (0.97) was the standard Ubuntu bootloader for many years, and was the default through Ubuntu 9.10 (Karmic Koala). While there are users still using the early versions of Ubuntu and Grub Legacy, it is also possible that a user who reverted to Grub Legacy from a newer version now wishes to return to Grub 2. These procedures will work for both first-time upgraders or those who have used Grub 2 in the past.

Upgrading to GRUB 2 From GRUB 0.97

The conversion to the much-improved GRUB 2 is relatively easy. Importantly, the upgrade offers a process to ensure GRUB 2 will work on your machine before the user commits to a full conversion. Note however that the developers made a decision to not use an automatic update to GRUB 2 as the default on upgrade installs.

info.pngWhen installing on a fresh drive, you may need to mark the selected partition as bootable. Although Linux does not use the boot flag, other OS's may require its presence.

Reverting to GRUB Legacy

If a user chooses to return to GRUB legacy (0.97), these steps will remove GRUB 2 and install GRUB.

via Boot-Repair graphical tool

  1. Run Boot-Repair from a liveCD or your installed session

  2. Click "Advanced options" --> GRUB options --> tick the "GRUB Legacy" option

  3. Click the "Apply" button

http://img15.hostingpics.net/pics/924248leg.png

via Command Lines

This works only when your boot is not broken.

  1. Open a terminal. The method varies depending on the Ubuntu release.
  2. Optional: Make backup copies of the main GRUB 2 directories and files.
    • sudo cp /etc/default/grub /etc/default/grub.old

    • sudo cp -R /etc/grub.d /etc/grub.d.old

    • sudo cp -R /boot/grub /boot/grub.old

  3. Remove GRUB 2
    • sudo apt-get purge grub-pc

    • important.png The system will be unbootable until another bootloader is installed.

    • Once the packages are removed, many files will still remain in '/boot/grub'
  4. Install GRUB 0.97
    • sudo apt-get install grub

  5. With grub installed, the user must still create the menu.lst and stage1/stage2 files by running the following two commands.

    1. sudo grub-install /dev/sdX

      • Choose the correct device (sda, sdb, etc), normally the one on which Ubuntu is installed.
      • Creates the stage1 and stage2 files in /boot/grub and writes to the MBR.

    2. sudo update-grub

      • Generates menu.lst

      • Tab to "Yes" when prompted.
  6. Reboot

important.pngIf the user receives an "Unrecognized device string Error 11" message on rebooting see the Resolving an "Unrecognized Device String" (Error 11) section for instructions on how to edit the menu and make the system bootable.


Related Links:

Grub2

Grub2/Installing

GNU GRUB Manual

Grub2/Upgrading (last edited 2012-09-24 12:09:59 by yannubuntu)