List

If you have a full hd encryption with luks under slackware, you need to take some additional steps when upgrading to a custom kernel.

First, download the kernel tarball from https://www.kernel.org with the following command (as root). In this example we are building version 5.5.8.

# wget https://cdn.kernel.org/pub/linux/kernel/v5.x/linux-5.5.8.tar.xz

Then, extract the downloaded file and navigate to the directory

# tar -xvf linux-5.5.8.tar.xz -C /usr/src
# cd /usr/src/linux-5.5.8

Copy the config file of the current kernel as a starting point for the kernel configuration. Keep in mind that there are literally thousands of configuration options to choose from, so make sure you have some free time 🙂

# zcat /proc/config.gz > .config

Now you can configure the kernel options with the following command

# make menuconfig

After you are done with the configuration don’t forget to save your new configuration file. Now it’s time to compile the source.

# make -j

After the compilation is done, we need to install the modules and copy the kernel binary to the appropriate directory with the following command

# make modules_install
# cp arch/x86/boot/bzImage /boot/efi/EFI/Slackware/vmlinuz

We also need to copy the System.map file to the /boot folder

# cp System.map /boot/System.map-5.5.8
# cd /boot
# rm System.map
# ln -s System.map-5.5.8 System.map

Now we need to update the elilo.conf file located in /boot/efi/EFI/Slackware/ with the following

chooser=simple
delay=1
timeout=1

        image = vmlinuz
        initrd = initrd.gz
        append ="vt.default_utf8=1 resume=/dev/slackcrypt/swap"
        label=Slackware
        read-only
        append="root=/dev/slackcrypt/root vga=normal ro"

The next step is to generate the initrd.gz file that is needed to load the system. If you require some special module that needs to be loaded before (such as nvme or ext4) you can specify in the command below with -m tag

# mkinitrd -c -k 5.5.8 -r /dev/slackcrypt/root -h /dev/cryptvg/swap -C /dev/nvme0n1p2 -L -u -o /boot/efi/EFI/Slackware/initrd.gz

Now the system should be ready to reboot into the new kernel. Enjoy!

Leave a Reply

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

This site uses Akismet to reduce spam. Learn how your comment data is processed.