GRUB as a Boot Manager
You're thinking of GRUB as a boot manager, which is not wrong but is only part of its function. Boot managers are most useful when selecting between different operating systems. But in its capacity as a boot manager, GRUB also lets you:
- choose between different kernels
- manually specify kernel options (like
nomodeset
)
- run memtest (the RAM test utility) -- technically this is booting into another OS
- implement password-protected boot
- perform basic diagnostic and recovery operations -- though we usually just boot from a live CD/DVD or live USB for this as it's more powerful, and often easier and less technical
As others have said, when Ubuntu is the only installed OS, most of this functionality is accessible by holding down Shift while booting.
But GRUB is, most importantly, a boot loader.
But the most important function of GRUB is as a boot loader. The functions of a boot loader and a boot manager overlap somewhat, and the terms are sometimes used interchangeably. But the difference is:
- A boot manager provides handy functionality to enhance the user's control over the boot process.
- A boot loader performs the necessary actions to boot the operating system. Without a boot loader, the operating system cannot even begin to boot.
Essentially all boot managers are boot loaders, but not all boot loaders are boot managers. Some boot loaders offer boot management features less extensive than GRUB. For example, the Windows boot loader lets you choose between operating systems, though in practice it's usually only used to select between different Windows operating systems.
Why a Boot Loader is Needed
Your computer's BIOS or EFI firmware is responsible for accessing storage devices and loading the boot loader from the master boot record of the device being booted from.
The kernel image (typically) resides within an actual partition on the disk. The boot loader accesses the filesystem containing the kernel, loads the kernel into memory, performs any steps required to run the kernel1, and runs it2.
Some boot loaders provide additional facilities, like allowing you to choose what OS or what kernel to boot or setting boot options for kernels (like the Linux kernel and most other modern kernels) that accept them. But that is all, in a sense, secondary: the main function of the boot loader is to load the kernel and start it running. Without a boot loader, your PC wouldn't boot an OS at all.
(1) For example, for historical reasons a traditional 32- or 64-bit BIOS-based PC starts out emulating a 16-bit processor. It has to "become" a 32-bit (or 64-bit) machine before loading a modern kernel, which modern boot loaders facilitate.
(2) Just after the kernel is first loaded, it behaves like a program and it make sense to talk about it "running." Once the system is started up, there's no specific process in a modern OS that is "the kernel." Instead, there are several separate kernel services, and what we usually think of as "the running kernel" is really more like a library (providing system calls to applications).
Further reading: