Slackware with GRUB

by netslack Slackware x86_64

So, I got my hands on a second-hand laptop! The operating system was Windows 11, so first thing to do was to replace Windows with Slackware. Since computers of today uses UEFI, I prefer GRUB over elilo as bootloader, so during the installation I installed GRUB instead of elilo. hp830g10 Here is how it's done:

  • At the end of the installation choose to skip installation of lilo and/or elilo.
  • Do not reboot when prompted, instead choose to drop back to a shell.

The newly installed system is mounted in /mnt. So first thing to do is to change root to /mnt and start bash:
chroot /mnt /bin/bash

Next, load the bash profile into the current shell:
source /etc/profile

Install GRUB: Here we specify the target platform, the path to the efi mount point and a bootloader id:
grub-install --target=x86_64-efi --efi-directory=/boot/efi --bootloader-id=grub

The target x86_64-efi is the default one, so that parameter can be omitted

Lastly, we create a GRUB configuration file:
grub-mkconfig -o /boot/grub/grub.cfg

Now remove the installation media and reboot!

To list all boot entrys installed:
efibootmgr

And if there is some old entry you'd like to get rid of, delete it with:
efibootmgr -b <NR> -B

The NR is the number of the entry listed when you ran efibootmgr

Thanks to OTB (OldTechBloke) and his video:
https://www.youtube.com/watch?app=desktop&v=OZeJd5JPQro

Previous Post