What is GRUB


The boot loader or boot manager is a program that aims to load the computer’s operating system memory when the system boots.

Most boot loaders are made up of several programs of relatively small size that are used in a particular sequence, with the purpose of loading the operating system.

Among the most widely used boot loaders on the Linux platform is Loadlin, primarily used to allow Linux systems to run in multi-boot with DOS or Windows systems. LILO (Linux Loader) and GRUB (Grand Unified Bootloader), which became the second most popular Linux boot loader and has been adopted on the main distributions (Ubuntu, Fedora, OpenSuse).

Like LILO, the GRUB boot loader can load other operating systems different from Linux. GRUB has become the default system loader for most Linux distributions.

It was written by Erich Boleyn to boot hardware-based PC operating systems and is now being developed and maintained by the GNU Project.

GRUB was designed to boot operating systems that are compliant with the Multiple Load Specification that was designed to create a boot method that would work on any compliant PC-based operating system.

In addition to GRAM-compliant systems, GRUB can boot directly into Linux, FreeBSD, OpenBSD, NetBSD. It can also boot other operating systems such as Microsoft Windows indirectly by using a chain loader. The chain loader loads an intermediate file, and that file loads the operating system. GRUB also offers a graphical menu interface.

It also provides a command interface that is accessible as long as the system boots and is able to access the command line after running Linux.

Installing GRUB involves two steps.

First, you need to install GRUB files on your system either by compiling and installing the source archive or from a package that puts GRUB files in the right places on your system.

The second step is to install the GRUB software as a boot manager.

If GRUB is installed along with the Linux distribution installer, it takes care of both the GRUB installation and you can see the GRUB menu when booting Linux.

If you did not install GRUB initially as part of the Linux installation, then you have two options.

The easiest way to install GRUB is with the “shell grub-install” script.

If grub-install does not work, or if you want to install manually, then you can run the grub command and use the installation commands. GRUB uses a configuration file that builds the menu interface. The file configuration is called menu.lst and is located together with other GRUB files in the /boot/grub file.

In some distributions (like Fedora and Red Hat), the file configuration is called grub.conf, which is a symbolic link for menu.lst.

The configuration file starts with a section that contains global commands that apply to all boot entries, followed by a Linux image input or other operating systems you want to be able to boot.

In addition to using the command line inside the GRUB menu interface (or direct command line boot), you can run the GRUB shell directly from the Linux command line with the grub command.

In most cases, the use of grub shell is the same as executing in the native command line environment.

Recent Posts