Loading…

Partition errors during a lightweight Linux install (Lubuntu, Xubuntu, Linux Lite, Debian with Xfce) often come from a mismatch between how the PC booted and how the disk is laid out. This guide shows how to find the mismatch and fix it.

Common Symptoms

  • "No EFI System Partition was found" or "No EFI partition was found"
  • "Executing 'grub-install /dev/sda' failed. This is a fatal error."
  • "grub-install: error: cannot find EFI directory"
  • The installer will not leave the manual partitioning screen

The usual cause: the installer started in UEFI mode, but the disk has no EFI System Partition (ESP), or its partition table does not match the boot mode.

Warning: Partitioning can erase data. Back up your files first, and double-check the disk name before writing changes.

Step 1: Check the Boot Mode

Boot the live USB, choose the "Try" option, open a terminal and run:

[ -d /sys/firmware/efi ] && echo "UEFI mode" || echo "BIOS/Legacy mode"

Step 2: Inspect the Disk

lsblk -o NAME,SIZE,FSTYPE,PTTYPE,MOUNTPOINT
sudo fdisk -l

PTTYPE shows gpt (GPT) or dos (MBR). In UEFI mode, look for a small vfat partition of type "EFI System". If none exists, go to Step 3.

Step 3: Apply the Fix for Your Case

UEFI mode, installing alongside Windows: Do not create a new ESP. Select the existing EFI System partition in the installer, set its mount point to /boot/efi, and do not format it.

UEFI mode, using the whole disk: The simplest fix is the guided option ("Erase disk and install"), which creates the required partitions automatically. This deletes everything on the disk.

UEFI mode, manual partitioning: Create these partitions:

  1. An ESP of 512 MiB to 1 GiB (the minimum is about 100 MiB), formatted as FAT32, type "EFI System", mounted at /boot/efi. Some installers label this "Use as: EFI System Partition".
  2. A root partition (/) formatted as ext4 on the remaining space.

To prepare an empty disk from the terminal, replace sdX with your disk (for NVMe disks, use names such as nvme0n1p1).

This erases the disk.

sudo parted /dev/sdX --script mklabel gpt \
  mkpart ESP fat32 1MiB 513MiB set 1 esp on \
  mkpart root ext4 513MiB 100%
sudo mkfs.fat -F 32 /dev/sdX1

Then start the installer, choose manual partitioning ("Something else"), assign /boot/efi to the first partition and / to the second, and tick "Format" for the root partition only.

BIOS/Legacy mode: No ESP is needed. Use an MBR (dos) partition table with a root partition, or on a GPT disk add a 1 MiB bios_grub partition for GRUB. If the firmware allows it, you can also reboot the USB in UEFI mode and follow the UEFI steps instead.

Do not switch the firmware to Legacy mode on a PC with a UEFI Windows install. Windows on a GPT disk boots only in UEFI mode.

Step 4: Choose the Bootloader Location

If the installer asks where to install the bootloader, select the whole disk (for example /dev/sda), not a partition such as /dev/sda1, when running in BIOS mode. In UEFI mode, the bootloader goes to the ESP mounted at /boot/efi.

Verify the Fix

After the installation finishes and the system reboots,

run:
findmnt /boot/efi
ls /boot/efi/EFI

The first command should show a vfat partition mounted at /boot/efi. The second should list a folder for your distribution (for example ubuntu or debian).

If the installer still fails at the GRUB step, reboot into the live USB, confirm the boot mode again (Step 1), and recreate the ESP as FAT32 with the EFI System type. If the install finished but the PC does not boot, reinstall GRUB from the live session.

Need a Linux environment without installing it on local hardware? ICSDC Linux VPS hosting offers Ubuntu, Debian and CentOS.