34

Can anyone explain to me in fairly simple words and not too technical concepts what exactly GRUB is, what its primary usage is, and how to use it efficiently for a dual boot Windows/Ubuntu installation?

I have already read a couple of resources but I am still confused.

0

3 Answers 3

33

Basically, GRUB bootloader is the software that loads the Linux kernel. (It has other uses as well). It is the first software that starts at a system boot.

When the computer starts, BIOS first run a Power-on self-test (POST) to check hardware like memory, disk drives and that it works properly.

Then BIOS checks the Master Boot Record (MBR), which is a 512 byte section located first on the Hard Drive. It looks for a bootloader (like GRUB). The hard drive's partition tables are also located here.

GRUB main menu with a selection of Ubuntu kernels with recovery mode options and memtest

Then you'll be prompted by the GRUB menu which can contain a list of the operating systems installed (in the case of dual boot), or the different kernels installed in a Linux system.

When you choose which operating system or kernel you want to use, GRUB loads the selected kernel. The kernel starts init (systemd), which is the first process to start in Linux. The init program then starts other processes like network services and other applications that you might have configured to start at boot time.

schematic diagram of boot process with BIOS to MBR to GRUB to kernel to userspace/init

The boot process contains a lot of defined expressions and terms, way too much to add in a simple answer like this very basic explanation of the boot process and GRUB's role in it.

This YouTube video provides a pretty nice introduction to the linux boot process, including basic information on the GRUB Bootloader:

Understanding the Linux Boot Process - CompTIA Linux+, LPIC-1

1
  • The youtube video is quite old and long and I found this itsfoss.com/what-is-grub very helpful and easy to read.
    – Rick
    Nov 29, 2021 at 15:06
5

Grub is the Grand Unified Boot Loader.

If you come from Windows the easiest explanation for GRUB is "This is the program that linux writes to your MBR (Master Boot Record)"

This program is responsible for detecting and loading any OS on your personal computer.

In common cases you have simply to install Ubuntu after you put Windows on your machine. The Ubuntu installer will automatically detect your Windows installation and write the configuration file for you.

So when you turn on your PC, GRUB comes up and shows you a menu to select if you would like to boot either Windows or Ubuntu.

0

GRUB is a multi boot boot-loader. It is a program that runs at the system start and allows you to select what operating system you want to start. If you want the have Ubuntu and Windows on the same computer, GRUB allows you to select between them at system start.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .