Installing Slackware64 14.0 on UEFI-based Machine

Home / Installing Slackware64 14.0 on UEFI-based Machine

Slackware Linux, one of oldest linux distribution available, can’t be denied as on of popular distro over many other distros. Slackware power lies on it’s simplicity which gives its user the freedom to customize their machine. Slackware bring genuine kernel and all software without modification which gives you the software as is.

In this article we will discuss a way to install Slackware into UEFI-base machine (as title suggests). What I use for this article:

  1. Lenovo Z480 laptop (UEFI-based laptop)
  2. Slackware installer DVD (see http://slackware.com/getslack/ to obtain it)
  3. USB flash disk (or USB stick)

Preparing the Machine

Things to be prepared: the UEFI itself! Make sure your machine is booted with UEFI mode enabled. This article will explain how to install using UEFI system, not using GRUB legacy mode. Another thing you must pay attention to is your hard disk partition scheme. We will use GPT (GUID Partition Table) instead of the old MBR (Master Boot Record) scheme.

Create USB Stick

A slackware DVD by default is not UEFI boot capable, therefore we must create an USB Stick with UEFI capable. The one I use can be downloaded from here (or here).

Make a partition for your USB stick with FAT32 partition with boot flag enabled. You can use either gparted or gdisk to accomplish it.

Just extract what inside the archive to your USB flash disk. Make sure you have 2 folders: EFI and slackware64. If you have done, stick your USB flash disk and boot your machine from it.

Create Partition to the Disk

I warn you for the last time, we will use GPT. If your disk is still in MBR scheme, you can use gdisk (should be available at USB stick) to change the partition to GPT. Of course if you have some data, the data would be erased / inaccessible. Well, I have warn you.

For comparison of GPT and MBR will be discussed on another article.

You can create as many partition as you like, but you need at least 2 partition:

  1. boot partition, located on partition 1 with FAT32 file system, takes about 100MB for it. Let say /dev/sda1
  2. a root partition for linux file system, with EXT4 file system. Let say /dev/sda2.

For other partition, you can use any file system you like, such as: XFS, JFS, ReiserFS, etc (aside from those 2, i use XFS for my partitions).

Install

Ok, here is our main issue.

Mount the USB stick. You can accomplish it by invoking following command:

mkdir /src
mount /dev/sdb1 /src

Invoke setup and adjust the setting like normal installation until you reach installation media stage.

Press ALT+F2 to switch to another screen.

Install temporary system using USB stick. Invoke these commands:

cd /src/slackware64
installpkg -root /mnt [az]*/*
cd

Press ALT+F1 to go back to our main setup and choose install from CD/DVD. Thing to note before you finish your installation: We won’t use LILO, instead we will use ELILO. So don’t install LILO.

After we finish the installation, don’t restart your machine now. We will configure the boot using ELILO. Please follow every character written here, even ‘.’ matters. Now, invoke these commands:

mkdir /mnt/root
mount /dev/sda1 /mnt/boot/efi
mount /dev/sda2 /mnt/root
cd /mnt/boot/efi
cp -rvf /src/EFI /mnt/boot/efi
cd /mnt/boot/efi/EFI
mv BOOT Slackware
cd Slackware
mv bootx64.efi elilo.efi
cp /mnt/root/boot/vmlinuz-huge-3.2.29 .
vi elilo.conf

You have come to configure the elilo.conf file. Here is my configuration:

prompt
image = vmlinuz-huge-3.2.29
label = Slackware
root = /dev/sda2

Last, we will register our boot so that the machine can boot our machine. To do so, invoke this command:

modprobe efivars
cd /mnt
usr/sbin/efibootmgr -c -L "XathryaBootCode" -l "\\EFI\\Slackware\\elilo.efi"

restart your machine (press CTRL+ALT+DELETE) and you machine should be boot to your Slackware now. Happy hacking 🙂

About Author

about author

xathrya

A man who is obsessed to low level technology.

Leave a Reply

Your email address will not be published. Required fields are marked *

Social media & sharing icons powered by UltimatelySocial