Slackware UEFI boot fix

Posted by in Linux, Slackware

If boot device has been replaced (M.2 disk) or CMOS is cleared (battery drained) on a Slackware installation that uses UEFI and elilo, here is a quick fix:

  1. Edit BIOS settings: Enable UEFI boot and turn off CSM
  2. Boot an (USB) installation image (Slackware 15)
  3. Mount the EFI System Partition (mount /dev/nvme0n1p1 /boot/efi)
  4. Backup the content in /boot/efi/EFI/Slackware/ (elilo.conf, vmlinuz, initrd.gz)
  5. Run the eliloconfig script
  6. Restore elilo.conf and kernel files from backup (or edit/adapt new elilo.conf)
  7. Reboot