GRUB version 1
The computer’s boot process begins with a program called boot loader. The purpose of this program is to load an operating system or some other software for the computer after completion of the self-tests. In Linux, the most-used boot loader is the Grand Unified Boot Loader (GRUB), available in two versions: GRUB version 1 (also known as GRUB Legacy) and GRUB version 2. GRUB Legacy is older of the two boot loaders. It used to be the dominant boot loader for Linux, but it’s been largely replaced by GRUB 2.
GRUB Legacy configuration
The configuration file is located at /boot/grub/menu.lst (some distributions such as Fedora, Red Hat, and Gentoo use the filename grub.conf). Here is an example menu.lst file:
GRUB numbers the disk drives different than Linux does. Instead of /dev/hda or /dev/sda , GRUB uses hd0. Similarly, /dev/hdb or /dev/sdb is likely to be hd1. GRUB doesn’t distinguish between PATA, SATA, SCSI, and USB drives, so on a SCSI-only system, the first SCSI drive is hd0. GRUB Legacy’s drive mappings are stored in the /boot/grub/device.map file:
Additionally, GRUB Legacy numbers partitions on a drive starting at 0, instead of 1 that is used by Linux. GRUB Legacy separates partition numbers from drive numbers with a comma, as in (hd0,0) for the first partition on the first disk (normally Linux’s /dev/sda1).
GRUB Legacy also defines its own root partition, which can be different from the Linux root partition. GRUB’s root partition is the partition in which GRUB’s configuration file (menu.lst or grub.conf) resides. Because this file is normally in Linux’s /boot/grub/ directory, the GRUB root partition will be the same as Linux’s root partition if you do not use a separate /boot or /boot/grub partition.
Here is a brief description of the configuration options found in the GRUB Legacy’s configuration file:
default – tells GRUB which OS to boot. GRUB indexes from 0, so the 0 option means that the first OS will be booted.
timeout – defines how long, in seconds, to wait for user input before booting the default operating system.
splashimage – defines the picture that’s displayed as the background for the boot process.
The options listed above are the global GRUB options. The following options are per-image options:
title – the name that appears on the boot screen to represent the OS.
root – specifies the location of GRUB Legacy’s root partition. This is the /boot partition if a separate one exists; otherwise, it’s usually the Linux root (/) partition.
kernel – specifies the location of the Linux kernel and kernel options that are to be passed to it. Paths are relative to GRUB Legacy’s root partition. The root option specifies the Linux root filesystem.
initrd – specifies an initial RAM disk, which holds a minimal set of drivers, utilities, and configuration files that the kernel uses to mount its root filesystem before the kernel can fully access the hard disk.
rootnoverify – is similar to the root option except that GRUB Legacy won’t try to access files on this partition. It’s used to specify a boot partition for OSs for which GRUB Legacy can’t directly load a kernel, such as DOS and Windows.
chainloader – tells GRUB Legacy to pass control to another boot loader.
- Editing text
- Managing processes
- Install applications
- Manage users
- Manage groups
- Manage hardware
- Boot Linux
- Network protocols
- Basic networking
- Network tools
- Overview of file systems
- Disk partitioning
- Configure hard disks
- Configure disk quotas
- Schedule jobs
- Date and time
- Shell scripting