24 October 2022
Slackware 15 got released this year. It has been a very long time since I last messed around with it. Lets install it on our primary machine :)
LUKS - Linux Unified Key Setup is a disk encryption spec and LVM - Logical Volume Manager is a software abstraction layer on top of partitions/disks that make them easier to manage. I'm going to install slackware on my laptop and encrypting our disk makes sense as there's a good chance the machine could get stolen.
I'll be using an unencrypted
/boot partition, as the default bootloader in slackware - LILO does not
support booting a LUKS container. There are plenty of tutorials on setting up
grub2 for this purpose.
SlackerNET UK has an amazing video guide on this.
Booting the live media will bring us to this familiar screen where we are asked which kernel we want to boot. Hit Enter!
We are then asked to choose our keyboard layout. We may choose, but we'll hit Enter!
Now we login as the user
root. Type in
root and hit Enter!
After which we are greeted by the shell
My machine's disk is
/dev/sda. To find yours, try running
# fdisk -l # or # lsblk
Assuming my disk is
40 GB, our plan is to allocate the first
1 GB to the boot partition
and then use the rest for the main linux partition.
# cfdisk /dev/sda
1GB. Of type
Linuxand then mark it as
sda2with the rest. Its type is also
Confirm just once again to see if our disks are correct with
# fdisk -l
In our case,
/dev/sda2 is our main linux partition. Technically, we wont be
using it as a partition, rather like another disk/volume.
# cryptsetup -s 256 -y luksFormat /dev/sda2
YES, in all caps and give it a password. Do not forget this password!
Now, on to partioning our disk. Here, we're going to give
swap and the
rest to the
# cryptsetup luksOpen /dev/sda2 sda2crypt
Input the password that we previously set. This will make our encrypted disk
Now onto creating volumes.
# pvcreate /dev/mapper/sda2crypt # vgcreate lc230vg /dev/mapper/sda2crypt # lvcreate -L 2G -n swap lc230vg # lvcreate -l 100%FREE -n root lc230vg
pvcreatewill initialize a volume to be used by lvm
vgcreateis used to make volume groups
lvcreateis used to make a logical volume.
-Lis used with a particular size and
-l(lowercase L) is used to extent a percent of the volume.
lc230is the hostname that I'm planning to give to my machine. You dont have to name your volume groups with this convention, but its something that I picked up from debian's installer.
Now we let lvm know about our volumes
# vgscan --mknodes # vgchange -ay
Setup our swap volume with
# mkswap /dev/lc230vg/swap
setup from the shell and we'd see this
Please take a moment to read how to navigate the program.
ADDSWAP and then let the installer find our swap partition.
In our case,
/dev/lc230vg/swap. Ignore the screenshot stating
It'll then ask us if we want it to scan the partition for bad blocks. Feel
free to say
After thats done, we'll see our swap space configured.
/dev/lc230vg/root as the partition we want to use for root (/)
ext4 as the filesystem.
/dev/sda1 as the next partition we want to use
ext4 and set its mount point as
done adding partitions, continue with setup in the next step
And now all our partitions are ready!
Please take a moment to read the screen.
I usually skip
KDE. If you're a KDE fan, have it selected. Hit
Enter and you'd be
asked to choose a prompting mode. Choose either
full here and start the
package sets installation.
Skip making a USB boot stick
Now we are asked to install LILO, the linux loader. This is the boot-loader that slackware uses instead of GRUB by default.
We'd see the LILO installation screen.
You can enter nothing in the optional lilo append parameters screen
For the framebuffer console config, I usually leave it at
Set the lilo target to
Check if lilo found our disk.
/dev/sda in our case.
Choose lilo timeout.
Choose to show a boot screen logo. Highly recommended!
We'll be then brought back to the initial LILO installation screen.
Linux - Add a linux partition to the LILO config
and then choose
Set a name like
Linux for the entry
After that LILO setup should be done.
Now, it'll ask us if we want GPM. This would allow us to use a mouse cursor from the tty.
The next step is configuring our network
Set a hostname(
lc230) and then a domain name(
localdomain would do fine.)
Next we are asked to configure VLAN. Choose
NetworkManager to manage our network.
and voila we have our network configured. Choose
YES to have
NetworkManager manage our network by default in the next screen.
I usually unselect
sshd here as this is a desktop and not a server.
Set it to your local timezone
Now we are asked to select an editor. Go with the default
I choose fluxbox here. Feel free to choose whatever you like. If you have KDE installed, that should come up here.
Set one up in this screen
We'll be brought back to the first screen of
and then drop to a
Now we're going to go back into our installation.
# chroot /mnt
We need to generate a generic kernel. To do that run,
This will return us a command that we can run to generate the GENERIC kernel specific to our machine. For me it was something like,
# mkinitrd -c -k 5.15.19 -f ext4 -r /dev/lc23vg/root \ -m jbd2:mbcache:crc32c_intel:crc32c_generic:ext4 \ -C /dev/sda2 -L -u -o /boot/initrd.gz \ -h /dev/lc230vg/swap
-h /dev/lc230vg/swap notes the swap partition to enable hiberation.
The format is usually something like this
mkinitrd -c -k *insert kernel number* -m *insert ROOT file system type here* -f *insert root file system type here* -r /dev/cryptvg/root -C /dev/sdx2 -h /dev/cryptvg/swap -L
Edit lilo's config to make it use this new generic kernel
# vim /etc/lilo.conf
Edit the corresponding parts to look like this
image = /boot/vmlinuz-generic-5.15.19 initrd = /boot/initrd.gz root = /dev/lc230vg/root label = Linux read-only # Partitions should be mounted read-only for checking
Above that, there's an "append" line. Edit it to look something like this,
append = " resume=/dev/lc230vg/swap"
Now we update lilo with
Ctrl + D out of our chroot shell and then
We'd be greeted by lilo
After our boot process starts we are asked to unlock our disk. Enter the password that we chose for encrypting our disk.
And then we are put at the login prompt. Enter
root and the password
we chose for root.
startx and behold
In the next post we'll look into post installation steps for our brand new slackware install.
Happy Slacking & have a great day!