The Pragmatic Addict

Convert GRUB to Syslinux-EFI

Background

Seemingly every Linux distibution uses GRUB as its bootloader. For an old guy like me, I liked the simple bootloaders of the past (LILO, SILO etc). Syslinux is a bootloader I’ve used for decades on old bios systems. Now it’s time to bring it into the modern era with UEFI support.

Use these instructions at your own risk

Remove GRUB

sudo apt-get remove --purge ^grub systemd-boot --allow-remove-essential
sudo apt-get autoremove --purge

Install Syslinux

sudo apt-get install syslinux-efi

cp /usr/lib/SYSLINUX.EFI/efi64/syslinux.efi /boot/efi/EFI/BOOT/BOOTX64.EFI
cp /usr/lib/syslinux/modules/efi64/ldlinux.e64 /boot/efi/EFI/BOOT/
cp /usr/lib/syslinux/modules/efi64/*.c32 /boot/efi/EFI/BOOT/

Modify initramfs to copy boot files to EFI partition

mkdir --parents /etc/initramfs/post-update.d

Create /etc/initramfs/post-update.d/syslinux-efi

#!/bin/bash
echo "Copying boot files to EFI"
cp -v /vmlinuz /vmlinuz.old /initrd.img /initrd.img.old /boot/efi
chmod a+x /etc/initramfs/post-update.d/syslinux-efi
update-initramfs -u

Retrieve GUIDs for partitions

blkid

/dev/sdb1: UUID="3A78-C0A0" BLOCK_SIZE="512" TYPE="vfat" PARTLABEL="boot" PARTUUID="3a822b98-5fa1-4ffe-b62d-c9484c29e9c9"
/dev/sdb2: UUID="11b483f0-6bbc-40bf-b612-68d101f719ee" TYPE="swap" PARTLABEL="swap" PARTUUID="24d16141-7232-4b8e-9d55-4141e82ae56e"
/dev/sdb3: UUID="bacc9064-a76d-42d7-a969-4995d1a024af" UUID_SUB="9b29c06f-b92c-4780-a95c-b29ffe1a9ae6" BLOCK_SIZE="4096" TYPE="btrfs" PARTLABEL="root" PARTUUID="bc10faff-7bfb-427d-accc-d41d745f6e65"

Create /boot/efi/EFI/BOOT/syslinux.cfg

UI vesamenu.c32
PROMPT 0
TIMEOUT 100
DEFAULT linux

LABEL linux
MENU LABEL My Linux
LINUX /vmlinuz
APPEND ro initrd=/initrd.img root=UUID=bacc9064-a76d-42d7-a969-4995d1a024af fsck.repair=yes noresume

Created: 2025-10-14 Modified: 2025-10-14