Skip to content

GRUB 1 on Linux (legacy)

Boot managers are programs that load the Linux Kernel and even allow the choice of another operating system. The main Linux boot loader is GRUB and there are two versions. The first version is Grub 1 on Linux (legacy).

Shortly after the hardware tests carried out by BIOS, the computer searches the boot sector of the active partition or Master Boot Record - MBR a small software to start loading the operating system.

Grand Unified Boot Loader (GRUB - 1)

Most distributions are already adopts GRUB 1 as the default manager. It’s flexible, functional, and powerful, able to load operating systems such as Windows (9x, ME, NT, 2000 and XP), DOS, Linux, GNU Hurd, *BSD, OS/2, and others.

GRUB 1 also allows search for Kernel images over the network, via serial cable, supports IDE hard drives, SATA, PATA and SCSI and has interface aimed at the command line or menus. Supports systems without remote disks and terminals.

As it has numerous resources, it will be presented its basic use, enough for you to pass the exam, remaining as suggestion for the reader to seek to delve deeper into its possibilities of use and setup.

The disk device notation used by GRUB 1 differs slightly from the usual one, so the names of the discs will always be “hd”, followed by the disc number starting with zero, followed by the number of partition, also starting from scratch.

See the comparative table:

Disk notation in Grub 1

Rating on Linux Rating on Grub 1
/dev/hda (hd0)
/dev/hda1 (hd0.0)
Rating on Linux Rating on Grub 1
/dev/hda2 (hd0.1)
/dev/hdb (hd1)
/dev/hdb1 (hd1.0)
/dev/hdb2 (hd1.1)
/dev/sda (hd0)
/dev/sda1 (hd0.0)
/dev/sda2 (hd0.1)
/dev/sdb (hd1)
/dev/sdb1 (hd1.0)
/dev/sdb2 (hd1.1)
/dev/fd0 (fd0)
There is no distinction between IDE and SCSI disks. Both are referred to as (hd?) by GRUB.

Natively, GRUB does not support EFI in versions. prior to kernel 3.30.

GRUB has a configuration file called /boot/grub/menu.lt. Some distributions such as Fedora, RedHat, and Gentoo prefer to use grub.conf instead of menu.lst.

This file is divided into Global parameters, which affect GRUB and parameters that only have an effect on system images that will be charged.

grub.conf parameters

Let’s look at the global parameters:

  • timeout: Defines a waiting time (in seconds) for the prompt or menu. If no user intervention is made at boot, GRUB 1 loads the default image;
  • default: Defines the default image that will be loaded if none other is selected;
  • fallback: If an unexpected error occurs and the default option cannot be loaded, this parameter defines which other image should be used;
  • color: Allows you to choose the colors used in the boot menu;
  • password: Allows you to specify a password for any action other than loading the available images. For example, access the GRUB 1 command line;
  • hiddenmenu: This option causes the options menu to not be shown and the image load specified by the “default” line is loaded. The user can request the menu with the options by pressing the key before the time set in timeout expires.

Parameters that affect images only:

  • title: Defines a text that will be displayed on the boot menu to identify the system;
  • root: Determines the root partition of a given image;
  • rootnoverify: Identical to the root option, but does not attempt to mount the root partition. Used for some systems such as Microsoft Windows;
  • kernel: This option tells you which Kernel image will be loaded. Some Kernel parameters can be passed;
  • module: Causes any module necessary for booting to be loaded. Remember that these are not Kernel modules (sound modules, network modules, etc.) but rather modules required to boot some systems, such as GNU Hurd;
  • lock: Blocks the loading of the Kernel image by password. The password must be specified with the option password;
  • makeactive: Makes the partition active for boot. This command is limited to primary disk partitions; - chainloader: Specifies the location of the boot loader for other operating systems. Some systems, such as Microsoft Windows, store their own boot loader at the beginning of the partition where they are installed.

THE GRUB 1 there are many options available. Here is a suggestion for the reader to read more about this boot loader using the info grub command at the command line of Linux.

The Utility grub-install

Use:

# /sbin/grub-install partition options

This command installs GRUB 1 as a manager for boot into the MBR of the first disk and create the /boot/grub directory. This directory contains the files necessary for its operation.

The most common options are:

  • — root-directory=directory: This option installs GRUB 1 in a directory other than the root directory. It is useful for installing it on other partitions;
  • — recheck: This option double-checks the device map in /boot/grub/device.map. It is useful when a new disk is added to or removed from the system.

Discover the Menu.LST

Below is an example file from menu.lst:

Timeout 30

default 0

fallback 1

color light-cyan/black white/blue

password my secret

password title GNU/Hurd

root (hd0.0)

kernel /boot/gnumach.gz root=hd0s1

module /boot/serverboot.gz

title Linux 3.14.16

lock

root ( hd0.0)

kernel (hd0.0) /boot/vmlinuz-3.14.16 vga=6 mem=512m radisk=0

title FreeBSD 3.4

root (hd0.2, a)

kernel /boot/loader

title Windows 9x, ME, NT, 2000, XP

unhide (hd0.0)

rootnoverify (hd0.0)

chainloader +1

makeactive

root = (hd0.0)

setup = (hd0)

GRUB 1 also has a special shell that accepts all options from the menu.lst configuration file and many others. IS a powerful boot loader configuration tool.

Without a doubt, open source is being the greatest rival of companies that produce “proprietary” software.

Learn much more about Linux in our online course. You can register here. If you already have an account, or want to create one, just log in or create your user here.

Did you like it?

Share