The Boot Process

Key Goals

  • Understanding the Linux boot process

Content

  • firmware:
    • BIOS
      • MBR
    • UEFI
      • GPT (GUID)
      • EFI system partitions (ESP)
      • UEFI native boot
      • Secure boot
  • Bootloader:
    • grub & grub2
  • initramfs
    • cpio
  • kernel (vmlinuz)

Exercises

cpio

  1. Scenario:
    1. Find the type of your /boot/initramfs-<version> file.
    2. Extract this file to /tmp/tempdir/
    3. Run tree to examin it’s content
  2. Scenario:
    1. Archive all the pdfs files inside your /usr/share/doc/ directory using cpio.
    2. Extract them to your local home directory.

dd

  1. Scenario:
    1. Run: lsblk, which partion is your /boot partition?
    2. Create a complete copy of your boot partition (name it boot.img)
  2. Using dd, how would you wipe the /dev/sda disk?
  3. Scenario:
    1. Run: fdisk -l which prints the Master Boot Recored (MBR).
    2. Backup the MBR
    3. Delete the MBR using dd
    4. Run the fdisk -l again, what is the result?
    5. Restore the MBR

Firmware - BIOS & UEFI

  • Where is the BIOS stored?
  • Can someone make changes to the BIOS firmware?
  • Is there some standart (like RFC) for the BIOS firmware?
  • What the BIOS knows about our system?
  • Note the main difference between the BIOS and UEFI role in the boot process?
  • Can a UEFI firmware boot from an MBR formmatted disk?
  • Explain what is a “Secure boot”