How To Install Linux Ubuntu

How To Install Linux Ubuntu

Reading time1 min
#Linux#Ubuntu#OpenSource#UEFI#SecureBoot#UbuntuInstallation

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

Forget the old BIOS installation tricks—this guide dives into the realities of installing Ubuntu on today’s machines, demystifying UEFI and Secure Boot hurdles so you can harness Linux power seamlessly.


Installing Ubuntu Linux used to be as simple as booting from a USB drive and hitting "Install." However, modern PCs seldom use the old BIOS firmware. Instead, UEFI and Secure Boot systems bring added security but also complexity. If you’ve tried to get Ubuntu running on newer hardware only to be stopped by boot errors or Secure Boot warnings, you’re not alone.

In this detailed walkthrough, I’ll guide you through installing Ubuntu on modern UEFI hardware with Secure Boot enabled—without disabling Secure Boot. Let’s get your Linux system up and running smoothly and securely.


Why UEFI and Secure Boot Matter

UEFI (Unified Extensible Firmware Interface) replaces legacy BIOS to initialize hardware before an OS loads. It supports faster boot times and richer interfaces. Secure Boot is a UEFI security feature that only allows digitally signed bootloaders to run, protecting your system from malware at startup.

Ubuntu 20.04+ supports Secure Boot with signed bootloaders. By following the right steps, you can use Secure Boot and Linux together effortlessly.


What You’ll Need

  • A modern PC with UEFI firmware and Secure Boot enabled (most laptops/desktops since 2015+)
  • A USB drive (minimum 4GB)
  • A downloaded Ubuntu ISO (I recommend the latest LTS version, e.g., Ubuntu 22.04)
  • A tool to create bootable USB media (Rufus on Windows, Etcher or dd on Linux/macOS)
  • Backup of important data (always a good idea)

Step 1: Prepare Your Bootable USB Drive

  1. Download Ubuntu ISO:
    Get the official ISO from ubuntu.com/download.

  2. Create Bootable USB:

    • On Windows, use Rufus:

      • Select your USB device.
      • Choose the Ubuntu ISO.
      • Under “Partition scheme,” pick GPT for UEFI systems.
      • Select FAT32 as the filesystem (required for UEFI boot).
      • Click Start and wait.
    • On Linux/macOS, use Etcher or the dd command:

      sudo dd if=ubuntu-22.04-desktop-amd64.iso of=/dev/sdX bs=4M status=progress
      sync
      

      (Replace /dev/sdX with your USB drive device path.)

    Note: Using FAT32-formatted USB ensures compatibility with UEFI.


Step 2: Disable Fast Boot (Optional but Recommended)

Some systems’ “Fast Boot” settings can prevent recognized USB devices during startup.

  • Enter your firmware setup (often DEL, F2, or ESC at boot).
  • Locate Fast Boot and disable it.
  • Save and reboot.

Step 3: Access UEFI Boot Menu and Boot Ubuntu Live USB

  • Insert your USB drive.
  • Restart and enter the boot menu (usually F12, ESC, or F10).
  • Select your USB device labeled with “UEFI.”

If you don’t see a UEFI option or the USB drive, check your firmware settings:

  • Ensure Secure Boot is enabled (or at least test with it enabled).
  • Select boot mode as UEFI (not Legacy/CSM).

Step 4: Start Ubuntu Installer

Once booted into the Ubuntu Live environment:

  • Choose Try Ubuntu to verify your hardware works.
  • Connect to Wi-Fi if needed (for updates).
  • When ready, double-click Install Ubuntu.

Step 5: Installation Type

  • When prompted for installation type, it’s best to choose Erase disk and install Ubuntu on a fresh device or Something else to manually partition.

Important: Modern systems use GPT partitioning with EFI System Partitions (ESP):

  • An existing EFI partition (~100-500MB, FAT32) should be mounted at /boot/efi.
  • The Ubuntu installer will configure this automatically if it detects UEFI boot.

Step 6: Completing Installation

  • Proceed with selecting your timezone, username, and password.
  • Let the installer copy files and configure the system.
  • After installation, reboot when prompted.

Step 7: Boot Ubuntu with Secure Boot Enabled

When rebooting, the shim bootloader signed by Microsoft allows Ubuntu to boot under Secure Boot.

If you encounter the “Secure Boot Violation” message or the system fails to boot:

  • Reboot and enter firmware settings.
  • Verify Secure Boot is enabled.
  • Check if Ubuntu bootloader (shimx64.efi) is recognized in boot options.
  • Some firmware requires manually adding Ubuntu’s EFI bootloader under Secure Boot keys or to allow “trust” of the shim.

Most modern laptops, like Dell, Lenovo, and HP, support Ubuntu Secure Boot out of the box without issues.


Optional: Use MOK (Machine Owner Key) Enrollment

If you use third-party kernel modules (like NVIDIA proprietary drivers), you might need to enroll a Machine Owner Key (MOK):

  • When prompted during driver installation, create a password.
  • On reboot, a blue screen will ask you to enroll the key—enter your password to allow unsigned modules.

This preserves Secure Boot and lets you run needed drivers.


Troubleshooting Tips

  • No USB boot option: Verify USB drive is UEFI bootable and firmware options allow external boot.
  • Installation stuck or freezes: Try disabling Fast Boot or Secure Boot temporarily.
  • Black screen on boot after install: Try booting into recovery (Shift at boot), reinstall/update NVIDIA drivers, or adjust kernel parameters (e.g., nomodeset).
  • Boot repair: Use the boot-repair tool in Ubuntu Live if bootloader installation fails.

Wrapping Up

Installing Ubuntu Linux on modern hardware has become easier thanks to UEFI and Secure Boot support in recent Ubuntu releases. While Secure Boot adds security and may seem intimidating at first, it need not be disabled. By preparing a proper UEFI bootable USB, understanding your firmware settings, and following this step-by-step guide, you can successfully install Ubuntu and enjoy a secure, optimized Linux experience on the latest machines.

Ready to Linux like a pro? Dive in and install Ubuntu today—your hardware is ready, and so is Linux.


If you found this guide helpful or have questions, leave a comment below—I’d love to help you along your Linux journey!