What is GRUB in Linux? (2024)

Computer ScienceMCAUnix

The GRUB (Grand Unified Bootloader) is a bootloader available from the GNU project. A bootloader is very important as it is impossible to start an operating system without it. It is the first program which starts when the program is switched on. The bootloader transfers the control to the operating system kernel.

GRUB Features

GRUB is the default bootloader for many of the Linux distributions. This is because it is better than many of the previous versions of the bootloaders. Some of its features are:

  • GRUB supports LBA (Logical Block Addressing Mode) which puts the addressing conversion used to find files into the firmware of the hard drive
  • GRUB provides maximum flexibility in loading the operating systems with required options using a command based, pre-operating system environment.
  • The booting options such as kernel parameters can be modified using the GRUB command line.
  • There is no need to specify the physical location of the Linux kernel for GRUB. It only required the hard disk number, the partition number and file name of the kernel.
  • GRUB can boot almost any operating system using the direct and chain loading boot methods.

GRUB Installation Process

GRUB automatically becomes the default loader after it is installed. The following steps are followed to install GRUB:

  • It is important to use the latest GRUB package available to install GRUB. Or the GRUB package from the installation CD-ROM is used.
  • The root shell prompt is opened and the command /sbin/grub-install is run after the GRUB package is installed. The in the command is the location where the GRUB stage 1 boot loader should be installed.
  • After all this is done, the GRUB graphical boot loader menu appears before the kernel loads into memory when the system boots.

GRUB Boot Process

The boot process using GRUB requires the GRUB to load itself into memory. This is done in the following steps:

  • The stage 1 boot loader is loaded into the memory by the BIOS. This boot loader is also known as the primary boot loader. It exists on 512 bytes or less of disk space within the master boot record. The primary boot loader can load the stage 1.5 or stage 2 boot loader if required.
  • The stage 1.5 boot loader is loaded into the memory by the stage 1 boot loader if required. This may be necessary in some cases as some hardware require a middle step before moving on to the stage 2 loader.
  • The secondary boot loader is also known as the stage 2 boot loader and it can be loaded into the memory by the primary boot loader. Display of the GRUB menu and command environment are functions performed by the secondary boot loader. This allows the user to look at system parameters and select the operating system to boot.
  • The operating system or kernel is loaded into the memory by the secondary boot loader. After that, the control of the machine is transferred to the operating system.

GRUB Interfaces

There are three interfaces in GRUB which all provide different levels of functionality. The Linux kernel can be booted by the users with the help of these interfaces. Details about the interfaces are:

Menu Interface

The GRUB is configured by the installation program in the menu interface. It is the default interface available. It contains a list of the operating systems or kernels which is ordered by name. A specific operating system or kernel can be selected using the arrow keys and it can be booted using the enter key.

Menu Entry Editor Interface

The e key in the boot loader menu is used to access the menu entry editor. All the GRUB commands for the particular menu entry are displayed there and these commands may be altered before loading the operating system.

Command Line Interface

This interface is the most basic GRUB interface but it grants the most control to the user. Using the command line interface, any command can be executed by typing it and then pressing enter. This interface also features some advanced shell features.

Ricky Barnes

Updated on: 30-Jul-2019

8K+ Views

Related Articles

  • What is Zombie Process in Linux?
  • What is PID manager in Linux?
  • What is fopen() and open() in Linux?
  • What is a .pid File in Linux?
  • What Is Double Dot (..) And Single Dot (.) In Linux?
  • What is the LD_PRELOAD Trick on Linux?
  • What is the Linux Equivalent to DOS Pause?
  • What is the maximum number of threads per process in Linux?
  • A Career in Linux is What You Should Be Pursuing In 2023
  • What does opt mean in Linux
  • What is the best IDE for C# on Linux?
  • What is the top IDE for c++ on Linux?
  • What is the best IDE of C++ on Linux?
  • What are the shells available in LINUX OS?
  • What is the sed in-place flag that works both on Mac and Linux?
Kickstart Your Career

Get certified by completing the course

Get Started

What is GRUB in Linux? (2)

Advertisem*nts

What is GRUB in Linux? (2024)
Top Articles
High paying jobs in hospitality: what to expect and how to prepare yourself
Batch Processing vs. Continuous Processing | Learning Center | MaintainX
The 15 Best Places for Cinema in Amsterdam
Kaiser Ncti
Mainlane Round Rock
Naviance Hpisd
Mienviro
Cvs Stage And Covington Pike
Nascar National Anthem Today 2022
Societal Spirit Crossword Clue
6465319333
Second Chance Apartments In Alexandria Va
Word Hippo Thesaurus
Longhorn Steakhouse Hiring Age
Atrenosh Journal
Oracle Ttec Direct Deposit
Acts 16 Nkjv
Diversidad de aves y caracterización de la vegetación en Sierra los Difuntos, Buenos Aires, Argentina: implicancia de la estacionalidad y la topografía
683 Job Calls
Musc Children's Health After Hours Care - North Charleston
Top 10 Things To Do in Meridian, Mississippi - Trips To Discover
Cranes Lane, Ormskirk L40 3 bed end of terrace house to rent - £1,495 pcm (£345 pw)
Dallas Cowboys On Sirius Xm Radio
Saxies, Lantana
Craigslist Mendocino Coast
Jobs Hiring 18 Year Olds Near Me
Costco Gas Price City Of Industry
Stellaris Wargoal
Collier County Registry Of Deeds
Sanctuary 2022 Showtimes Near Santikos Entertainment Palladium
Crime Graphics Tcsd
Stellaris Ultima Vigilis
Death On 14 Freeway Today
Q Management Inc
Chicagoland Bodyrub
Warfare Personified Crossword Clue
Evansville Craigslist Com
Cocaine Bear Showtimes Near Richland Cinemas
Match The Following Overhead Costs With Their Source Documents.
855-539-4712
kg to lbs Converter (Kilograms to Pounds) - Inch Calculator
No Hard Feelings Showtimes Near Amc Classic Ardmore 8
Pensacola Tattoo Studio 2 Reviews
Cliffview Pilot Cliffside
Webkinz® - Top Issues
Gayforfans Jakipz
SHE (FEAT. TYLER THE CREATOR): Nederlandse vertaling van Frank Ocean
Craigslist Horse For Sale By Owner
Fort Mohave Craigslist
How Moneybagg Yo Achieved a Net Worth of $4 Million
Contact us
Yagurlbubbz
Latest Posts
Article information

Author: Saturnina Altenwerth DVM

Last Updated:

Views: 5935

Rating: 4.3 / 5 (64 voted)

Reviews: 87% of readers found this page helpful

Author information

Name: Saturnina Altenwerth DVM

Birthday: 1992-08-21

Address: Apt. 237 662 Haag Mills, East Verenaport, MO 57071-5493

Phone: +331850833384

Job: District Real-Estate Architect

Hobby: Skateboarding, Taxidermy, Air sports, Painting, Knife making, Letterboxing, Inline skating

Introduction: My name is Saturnina Altenwerth DVM, I am a witty, perfect, combative, beautiful, determined, fancy, determined person who loves writing and wants to share my knowledge and understanding with you.