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:
- Lenovo Z480 laptop (UEFI-based laptop)
- Slackware installer DVD (see http://slackware.com/getslack/ to obtain it)
- 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
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:
- boot partition, located on partition 1 with FAT32 file system, takes about 100MB for it. Let say /dev/sda1
- 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).
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 🙂slackware