How to Install Debian 12 "Bookworm" on a UEFI System

Learn how to install Debian 12 “Bookworm” on a UEFI system.

Debian 12 “Bookworm” is a powerful and stable Linux distribution that supports UEFI (Unified Extensible Firmware Interface) boot mode. This guide provides a step-by-step approach to installing Debian 12 on a UEFI-enabled system.

Understanding UEFI

UEFI is the modern replacement for BIOS and provides faster boot times, better security, and support for larger storage devices. Unlike BIOS, UEFI uses the GUID Partition Table (GPT) instead of the older MBR partitioning system. Debian 12 fully supports UEFI, making it easier to install and maintain on modern hardware.

Prerequisites

Before proceeding with the installation, ensure you have:

  • A 64-bit computer with UEFI firmware enabled.
  • Debian 12 ISO file (download from Debian’s official website).
  • A USB flash drive (at least 8GB) to create a bootable installer.
  • Backup of important data, as installation may involve partitioning your disk.

Step 1: Creating a Bootable USB Drive

  1. Download the Debian 12 ISO: Ensure you download the correct version for your system architecture.
  2. Prepare the USB Drive: Use a tool like Rufus (Windows), Balena Etcher, or the dd command on Linux to create a bootable USB.
  3. Configure Rufus (for Windows users):
    • Select your USB drive.
    • Choose the Debian 12 ISO file.
    • Set Partition Scheme to GPT.
    • Set Target System to UEFI (non-CSM).
    • Click Start to begin writing the image.

Step 2: Configuring UEFI Firmware

  1. Enter UEFI/BIOS Setup: Restart your computer and press the appropriate key (F2, F10, Del, or Esc) to access the firmware settings.
  2. Disable Secure Boot (if necessary): Some systems require disabling Secure Boot for Debian to install properly.
  3. Enable Boot from USB: Ensure the USB drive is set as the first boot option.
  4. Save and Exit the UEFI settings.

Step 3: Booting from the USB Drive

  1. Insert the bootable USB drive and restart the computer.
  2. Select UEFI USB drive from the boot menu.
  3. Choose Graphical Install or Text-based Install, depending on your preference.

Step 4: Installing Debian 12

1. Select Language and Region

  • Choose your preferred language and keyboard layout.
  • Select your time zone for proper system localization.

2. Configure Network

  • If connected via Ethernet, networking is automatically configured.
  • For Wi-Fi, select your network and enter the password.

3. Set Up User and Passwords

  • Create a root password for system administration.
  • Set up a standard user account for daily use.

4. Partition the Disk

  • Guided Partitioning (Recommended):
    • Select “Guided – use entire disk” (if you want to erase everything and install Debian).
    • Ensure the installer creates an EFI System Partition (ESP) (~512MB) required for UEFI boot.
  • Manual Partitioning (Advanced Users):
    • Create an ESP partition (FAT32, mounted at /boot/efi).
    • Create a root partition (/) with the desired file system (ext4 recommended).
    • Optionally, create a separate /home partition.

5. Install the Base System

  • The installer will copy Debian files and install the system base packages.

6. Install and Configure GRUB Bootloader

  • Select Yes to install GRUB on the primary drive.
  • Choose the correct EFI partition to install the bootloader.

7. Finish Installation

  • Once installation completes, remove the USB drive and restart the system.

Step 5: Post-Installation Setup

1. Update the System

After logging in, open a terminal and run:

sudo apt update && sudo apt upgrade -y

This ensures you have the latest security patches and software updates.

2. Install Additional Drivers (If Needed)

  • For proprietary drivers (e.g., NVIDIA graphics), enable non-free repositories:
echo "deb http://deb.debian.org/debian bookworm main contrib non-free non-free-firmware" | sudo tee -a /etc/apt/sources.list
sudo apt update && sudo apt install firmware-linux firmware-linux-nonfree

3. Enable Firewall for Security

Debian provides ufw (Uncomplicated Firewall):

sudo apt install ufw
sudo ufw enable

4. Install Essential Software

sudo apt install firefox libreoffice vlc gnome-tweaks

Conclusion

You have successfully installed Debian 12 “Bookworm” on a UEFI-enabled system. With regular updates and proper configurations, Debian provides a stable and secure computing experience.