Linux System Administration

0 of 85 lessons complete (0%)

Managing Unix File Systems

Boot Disks

You don’t have access to this lesson

Please register or sign in to access the course content.

A boot disk is a storage device that contains the necessary files and programs for a computer to start (or “boot”) its operating system. Boot disks are critical for starting an operating system or recovering a system in case of failure. In the context of Linux system administration, boot disks can refer to devices like USB drives, CD/DVDs, or even a specific partition on a hard drive that has the bootloader and essential system files.

Key Concepts of Boot Disks:

  • Bootloader:
    • The bootloader is a small program stored in the first sector of the boot disk (Master Boot Record, MBR, or GUID Partition Table, GPT) that is responsible for loading the operating system into memory.
    • Common bootloaders used in Linux include GRUB (Grand Unified Bootloader) and LILO (Linux Loader).
    • GRUB is widely used and supports multi-booting, allowing multiple operating systems to be installed and selected at boot time.
  • MBR (Master Boot Record):
    • The MBR is the first 512 bytes of a storage device and contains:
      • Bootloader code (first stage).
      • Partition table: Information about the partitions on the disk.
    • MBR only supports up to four primary partitions (or three primary partitions and one extended partition).
    • For disks larger than 2 TB, GPT (GUID Partition Table) is used instead of MBR.
  • GPT (GUID Partition Table):
    • GPT is a modern replacement for MBR and is part of the UEFI (Unified Extensible Firmware Interface) standard.
    • GPT supports larger disks and up to 128 partitions (depending on the system).
    • It includes redundancy with a backup partition table at the end of the disk.
  • UEFI vs. BIOS:
    • BIOS (Basic Input/Output System) is the traditional firmware interface that initializes hardware and loads the bootloader from the MBR.
    • UEFI (Unified Extensible Firmware Interface) is a newer standard that replaces BIOS, supporting faster boot times, larger disk sizes, and secure boot.
  • Bootable Disk Creation: To create a bootable disk in Linux, you usually prepare a USB stick or DVD with an operating system image, such as an ISO file.

Creating a Boot Disk (USB) in Linux:

1. Using dd Command:

The dd command is a powerful utility that can be used to create bootable disks by writing ISO files directly to a USB drive.

  • Download the Linux distribution ISO (e.g., Ubuntu, CentOS).
  • Insert your USB drive and identify it using the lsblk command to find the correct device path (e.g., /dev/sdb).
  • Write the ISO to the USB drive using dd:
  • Sync to ensure all data is written:

2. Using unetbootin:

Alternatively, you can use a tool like Unetbootin to create bootable USB drives with a graphical interface:

3. Using Rufus (Windows):

For users on Windows, Rufus is a popular tool to create Linux bootable USB drives.

Boot Process Overview:

  1. Power On: The system is powered on, and the CPU initializes the BIOS or UEFI firmware.
  2. BIOS/UEFI Initialization:
    • The BIOS/UEFI checks the hardware components (POST – Power On Self Test).
    • It looks for a bootable device in the configured boot order (e.g., hard disk, USB, CD/DVD).
    • If UEFI is used, Secure Boot may check for signed bootloaders to ensure integrity.
  3. Bootloader Execution:
    • The bootloader (e.g., GRUB) is loaded from the boot disk.
    • GRUB presents a boot menu, allowing the user to select which operating system or kernel to boot.
  4. Kernel Loading:
    • Once an OS is selected, the bootloader loads the OS kernel into memory and hands off control to it.
    • The kernel initializes the rest of the system, mounts the root filesystem, and starts the system processes.
  5. System Initialization:
    • The operating system starts necessary services (e.g., systemd in modern Linux distributions) and presents a login prompt or graphical interface.