How To Install Linux

How To Install Linux

Reading time1 min
#Linux#Tech#OpenSource#UEFI#SecureBoot#LinuxInstallation

Step-by-Step Guide to Installing Linux on Modern Hardware with UEFI and Secure Boot

Forget everything you thought about Linux installation being complicated or outdated—this guide cuts through legacy myths and exposes the straightforward process of installing Linux on new hardware with modern firmware standards.


Over the years, as computers have evolved, so have their firmware standards. The days of simple BIOS setups are behind us, replaced by UEFI (Unified Extensible Firmware Interface) and Secure Boot, designed to improve security and boot speed. While these advancements are great, they’ve introduced new layers of complexity for anyone trying to install Linux on modern machines.

But don’t worry! Installing Linux on UEFI-enabled systems with Secure Boot isn’t a nightmare. This step-by-step guide is here to simplify the process and get you up and running.


What You Need Before We Start

  • A USB flash drive with at least 8GB capacity.
  • A Linux distribution ISO of your choice (Ubuntu, Fedora, Debian, etc.).
  • A computer with UEFI firmware and Secure Boot enabled or configurable.
  • A tool to create a bootable USB, like Rufus (Windows), Etcher (cross-platform), or dd (Linux/macOS).

Step 1: Prepare Your Bootable USB with UEFI Support

When creating the bootable USB, it’s crucial to ensure the USB supports UEFI boot mode.

  • Using Rufus on Windows:

    1. Download your preferred Linux ISO.
    2. Insert the USB drive.
    3. Open Rufus.
    4. Under “Boot selection,” choose your Linux ISO.
    5. For “Partition scheme,” select GPT (for UEFI).
    6. Under “Target system,” it should display UEFI (non-CSM).
    7. Start the process.
  • Using Etcher (cross-platform):

    1. Select your Linux ISO.
    2. Select the USB drive.
    3. Start flashing.

Etcher generally configures UEFI boot by default, but for advanced partition scheme control Rufus is preferred on Windows.


Step 2: Back Up Important Data and Access UEFI Settings

Before proceeding:

  • Backup important files. Installing Linux may involve partitioning drives.

  • Access your computer’s UEFI settings (often by pressing keys like F2, Delete, or ESC during boot).

  • Navigate to the Secure Boot settings.

  • You have two choices here:

    • Leave Secure Boot enabled: Many modern Linux distros support Secure Boot out of the box using signed bootloaders.
    • Disable Secure Boot: Simplifies installation but removes a layer of boot security.

Step 3: Boot From the USB Drive

  1. Plug in your prepared USB.
  2. Reboot your computer.
  3. Enter your UEFI boot menu (often F12, F10, or ESC) during startup.
  4. Select the USB drive under a UEFI boot option.

Tip: Ensure you pick the UEFI option for your USB, not legacy BIOS, to avoid compatibility issues.


Step 4: Start the Linux Installer

Once booted:

  • You’ll see the Linux distribution’s installer welcome screen.
  • Choose "Try" if you want to test the OS first or "Install" to proceed directly.

During installation, the installer will detect UEFI firmware and automatically set up the bootloader (usually GRUB) for UEFI.


Step 5: Partition Your Disk Correctly (Especially Important for UEFI)

For dual-boot or custom setups, you need to follow guest guidelines for partitioning:

  • EFI System Partition (ESP):

    • Existing Windows systems should already have a 100-500 MB EFI partition. Use this for Linux.
    • If none exists, create a partition:
      • Size: ~300MB
      • Format: FAT32
      • Mount point: /boot/efi
  • Root Partition /:

    • Ext4 is the most common filesystem.
    • Size depends on your need; 20GB+ is generally sufficient.
  • Swap Partition (or swap file):

    • Optional if enough RAM (>8GB).
    • Size: Usually 2-4GB or equal to RAM size if hibernation is required.

Example:
If dual booting, be sure to install the bootloader to the EFI partition — installers handle this automatically if booted in UEFI mode.


Step 6: Handling Secure Boot

  • If Secure Boot is enabled:
    Most popular distros like Ubuntu, Fedora, and openSUSE sign bootloaders with a Microsoft key recognized by Secure Boot, so the system should boot without issues.

  • If you encounter Secure Boot errors:

    • Consider temporarily disabling Secure Boot during installation.
    • Post-install, you can manually enroll keys or sign your own kernel/modules, but that’s advanced and usually unnecessary.

Step 7: Complete Installation and Reboot

  • Follow the on-screen prompts to finish installation.
  • Remove the USB drive after successful installation.
  • Reboot your system.
  • Your Linux bootloader should now appear, allowing you to boot into Linux (and Windows if dual booted).

Bonus Tips

Check if You’re Booted in UEFI Mode

After installation and first boot, you can check via terminal:

[ -d /sys/firmware/efi ] && echo "UEFI boot detected" || echo "Legacy boot detected"

Troubleshooting Boot Issues

  • If your system boots directly into Windows after installing Linux (no GRUB):

    • Check your UEFI boot order in firmware settings.
    • Use efibootmgr in Linux to adjust boot entries.
  • For stubborn Secure Boot errors, try toggling Secure Boot off.


Summary

StepKey Notes
Prepare USBUse GPT partition scheme & ensure UEFI support
Backup and Configure UEFIBackup data, toggle Secure Boot if necessary
Boot USB in UEFI ModeSelect UEFI boot option from boot menu
Run InstallerInstaller auto-detects UEFI & sets up bootloader
Partition for EFIUse or create EFI System Partition (FAT32, ~300MB)
Handle Secure BootMost distros support it; disable if needed
Reboot & TestRemove USB, reboot to system

With this guide, installing Linux on modern UEFI and Secure Boot-enabled hardware doesn’t have to be intimidating. Embrace the power and flexibility of Linux on your new hardware and enjoy a secure, modern computing experience!


Have questions or ran into a snag? Drop a comment below and I’ll help troubleshoot!