## Slackware Installer

I followed basically the article [1] but documented my steps here on this page.

First open the luks container if not already happen

```
cryptsetup luksOpen /dev/nvme0n1p3 luks
```

Mkswap

```
mkswap /dev/slackware/swap
```

Start the installer with `setup`

## Follow the wizard

- Assign swap, selecting `/dev/slackware/swap`.
- Select `/dev/slackware/root` as the root `/` partition, formatting it as `ext4`
- Select `/dev/slackware/home` as the home `/home` partition, formatting it as `ext4`
- Select `/dev/slackware/opt` as the opt `/opt` partition, formatting it as `ext4`
- Select `/dev/slackware/usr` as the usr `/usr` partition, formatting it as `ext4`
- Select `/dev/slackware/var` as the var `/var` partition, formatting it as `ext4`
- Select `/dev/slackware/tmp` as the tmp `/tmp` partition, formatting it as `ext4`
- Select `/dev/nvme0n1p2`, format it `ext4` and assign it the `/boot` mount point
- Select `<continue>`

Directly after `<continue>`, a popup message appears `EFI SYSTEM PARTITION RECOGNIZED`. Hit `OK`, but...
It explains that `/dev/sda2` (this is our usb stick) has been mounted on `/boot/efi`.
Which means the USB stick will be updated during installation. And that’s not what we want.

The trick is to suspend the wizard with `CTRL+z` and umount the stick efi partition and mount our `/dev/nvme0n1p1` partition

execute

```
lsblk
```

to see that `sda2` is really mounted to `/mnt/bot/efi`

```
umount /mnt/boot/efi
mount -t vfat /dev/nvmen0p1 /mnt/boot/efi
mkdir /tmp/usbefi
mount -t vfat /dev/sda2 /tmp/usbefi
cd /tmp/usbefi
tar cpf - . | tar xpf - -C /mnt/boot/efi/
cd /
umount /tmp/usbefi
fg
```

Installation can continue. Here are my options.

- Select the source media using '2 ... USB stick'
- Select the packages to install. I kept the default selection except deselecting KDE with 'terse' prompting mode.
- Skip making a USB boot stick.
- Skip installing LILO and proceed to ELILO
- Install ELILO on the EFI System Partition.
- Install a boot menu entry.
- Select 'YES' when asked if you want to remove the old slackware entry from the EFI boot.
- Select the imps2 Microsoft PS/2 Intellimouse configuratio, don’t run gpm at boot time.
- Configure the network. Entering a hostname, a domain, no VLAN ID.
- Select NetworkManager to autoconfigure network with wired & wireless interfaces.
- Select the services to run, added rc.ntpd to the default selection.
- No custom screen font
- Set the clock to local time.
- Select the timezone, I used Europe/Berlin
- Select the defaut editor vim.
- Select XFCE as the defaut Window Manager
- Set up a root password.

After that hit `exit` but do not `reboot` hit `shell` instead.

Open `/mnt/etc/fstab` and comment out `/dev/sda2` entry
and replace with
```
/dev/nvme0n1p1        /boot/efi        vfat        defaults         1   0
```

```
chroot /mnt
/usr/share/mkinitrd/mkinitrd_generator.sh -r -a "-h /dev/slackware/swap"
eval $(/usr/share/mkinitrd/mkinitrd_command_generator.sh -r -a "-h /dev/slackware/swap")
```

copy newly generated vmlinuz and initrd
```
cp /boot/initrd.gz /boot/efi/EFI/Slackware/
cp /boot/vmlinuz-generic-4.4.14 /boot/efi/EFI/Slackware/
cd /boot/efi/EFI/Slackware
rm vmlinuz
mv vmlinuz-generic-5.5.19 vmlinuz
```

Reboot
```
exit
reboot
```

---
[1] https://www.tumfatig.net/2022/slackware-linux-15-with-fde-on-uefi-laptop/