Skip to main content
In this guide, you’ll learn how to install, reinstall, and configure the GRUB Legacy bootloader on your Linux system. We cover both methods—installing from a running system and from the GRUB shell on a rescue disk—plus how to edit your menu.lst and chainload Windows.

Table of Contents

  1. Overview
  2. Installing from a Running System
  3. Reinstalling via the GRUB Shell
  4. Editing /boot/grub/menu.lst
  5. Chainloading Windows
  6. Command Reference
  7. Links and References

Overview

GRUB Legacy (version 0.9x) remains a popular choice for legacy hardware or minimal setups. You’ll install its core files to /boot/grub and write stage1 into the Master Boot Record (MBR).
Always double-check your target device (e.g., /dev/sda) before running grub-install or setup. Installing to the wrong disk can overwrite critical data.

Installing from a Running System

Use the grub-install utility to deploy GRUB Legacy without rebooting:
Example: install to the first disk (/dev/sda):
By default, GRUB places its core files under /boot/grub. To change this directory, pass:
The --boot-directory option is helpful if you’re using a custom EFI or boot partition layout.

Reinstalling via the GRUB Shell

When your system fails to boot, use a GRUB Legacy rescue disk:
  1. Boot from the rescue media and press c to open the grub> prompt.
  2. Identify and mount your boot partition (where /boot/grub resides):
  3. If unsure, locate stage1 with find:
  4. Write GRUB’s stage1 into the MBR of the first disk:
  5. Reboot—the GRUB menu should appear.

Editing /boot/grub/menu.lst

The GRUB Legacy configuration file is a simple plain-text list of menu entries. Open it with your favorite editor:
Lines starting with # and blank lines are ignored.

Basic Linux Entry

Omitting the root Directive

You can embed the device specifier within the kernel path:

Chainloading Windows

To boot Windows or another OS via chainloading:
  • root (hd0,1): Second partition of the first disk.
  • makeactive: Marks this partition as active (necessary for DOS/Windows).
  • chainload +1: Loads its first sector.
  • boot: Handoffs control to the loaded bootloader.

Command Reference


Watch Video