Booting the system
LPIC-1LINUX
3/19/2026


1 Boot sequence
POST (Power On Self Test) from the BIOS or UEFI firmware.
Then, it finds the bootloader, usually GRUB.
Once GRUB is loaded, the bootloader finds initramfs (modern)/initrd (legacy), loading a kernel image with some basic drivers on memory. The initrd or initramfs file exists in /boot and is specified in your grub.cfg or menu.lst.
Once the image is loaded, the root FS is mounted. The system starts with PID 1 (systemd).
Depending on the configuration, a specific runlevel or target is started.
Legacy: The default runlevel is stored in /etc/inittab.
Modern: systemctl get-default, will show you the default target.
2 Installing GRUB Legacy
GRUB Legacy syntax for installation:
First hard drive in MBR: grub-install '(hd0)'
First hard drive, first partition: grub-install '(hd0,0)'
Other available syntax for installation:
First hard drive in MBR: grub-install /dev/sda
First hard drive, first partition: grub-install /dev/sda1
3 "Legacy" and "Modern" ways of storing boot information
Legacy (BIOS/MBR): The boot code is hidden in the first 512 bytes (MBR). It is hard to manage and easy to overwrite. It covers the stage 1 of the bootloader. Its only job is to point to the next stage.
Modern (UEFI/ESP): The boot code is stored as standard files within the ESP (EFI System Partition). This allows you to have multiple bootloaders (e.g., Windows and Linux) living side-by-side in their own folders (e.g., /EFI/ubuntu/ and /EFI/Microsoft/) without fighting for the same 512-byte space.
Quick Command: If you want to see if your system is using an ESP right now, you can run lsblk or fdisk -l. Look for a small partition (usually 100MB–500MB) that it usually appears as "/boot/efi".
4 Summary Table
Feature BIOS + MBR UEFI + GPT
GRUB Location Sector 0 (MBR) EFI System Partition (FAT32)
Storage Capacity Extremely limited (512 bytes) Large (can hold many .efi files)
Primary Command grub-install /dev/sda grub-install (auto-detects ESP)
grub-install '(hd0)'
Note: In the context of the EFI System Partition (ESP), GPT is the modern standard for organizing how a disk is carved into sections. While the old MBR (Master Boot Record) was limited and a bit fragile, GPT was designed specifically to work with UEFI firmware. If you run fdisk -l, look at the Disklabel type row:
dos = MBR (Legacy)
gpt = GPT (Modern/UEFI)
Contact
hello@unixtips.eu
© 2025. All rights reserved.