Installing Syslinux + UEFI
ACCEPT_KEYWORDS="~amd64" emerge -av =sys-boot/syslinux-6.02_pre16
Prepare BIOS
Depending on the machine and it's BIOS configuration options may need to be made.
Enable the UEFI, disable the Legacy (CSM) style things.
Prepare Partition
We are using GPT style partition tables.
We have created a NULL MBR (all-zeros in the Master Boot Record
dd if=/dev/zero of=/dev/sda bs=440 count=1 conv=notrunc
The first partition will be the EFI storage, make sure it's at least 512M (this is a FAT32 restriction). In the example below we've made the first one 1G.
cfdisk /dev/sda mkfs.msdos -F 32 -n 'Boot' /dev/sda1
sfdisk -l -u M /dev/sda Disk /dev/sda: 121601 cylinders, 255 heads, 63 sectors/track Units: 1MiB = 1024*1024 bytes, blocks of 1024 bytes, counting from 0 Device Boot Start End MiB #blocks Id System /dev/sda1 * 0+ 972- 973- 995998+ ef EFI (FAT-12/16/32) /dev/sda2 972+ 2925- 1954- 2000092+ 82 Linux swap / Solaris /dev/sda3 2925+ 34177- 31252- 32001480 83 Linux /dev/sda4 34177+ 953869- 919693- 941764981+ 83 Linux
Install Bootloader
mount /dev/sda1 /boot mkdir -p /boot/efi/syslinux cp /usr/share/syslinux/efi64/{syslinux.efi,ldlinux.e64,libutil.c32,menu.c32} /boot/efi/syslinux/
Configure Bootloader
Edit the syslinux.cfg file, see documentation on the SYSLINUX Wiki.
PROMPT 1 # Measured in .10 of a second, 10 = 1s TIMEOUT 50 UI menu.c32 MENU TITLE Edoceo Gentoo/Praxis MENU CLEAR # Only with VESAMENU # MENU BACKGROUND edoceo-640x480.png # MENU BACKGROUND fluorine.png LABEL 6.6.35 MENU LABEL Gentoo GNU/Linux 6.6.35 KERNEL /vmlinuz-6.6.35-gentoo-dist INITRD /initramfs-6.6.35-gentoo-dist.img APPEND root=/dev/sda3 mitigations=off
Registering with EFI
Use the following command to register syslinux bootloader with the UEFI
efibootmgr -c -d /dev/sda -p 1 -l \\efi\\syslinux\\syslinux.efi -L Gentoo
See Also
- Managing EFI Boot Loaders for Linux
- Syslinux on Slackware
- Syslinux on Arch
- Boot QEMU via EFI
- mkosi - Make Operating System Images, Including EFI Bootable Images