slackware installation

| | | topics: Technology > notes | keywords: configuration, installation, linux
id: 083ea0ff-53d6-4d05-943c-036c351d995f

Slackware

Following are the manual installation instructions for encrypted LVM for Slackware 14.2 with nvme disk.

load necessary module

modprobe efivars

partition the disk

livecd ~ # parted -a optimal /dev/sda
GNU Parted 3.2
Using /dev/sda
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) unit mib
(parted) mklabel gpt
Warning: The existing disk label on /dev/sda will be destroyed and all data on this disk will be lost. Do you want to continue?
Yes/No? yes
(parted) mkpart primary fat32 1 513
(parted) name 1 "EFI System Partition"
(parted) set 1 BOOT on
(parted) mkpart primary 513 2561
(parted) name 2 "boot partition"
(parted) mkpart primary 2561 -1
(parted) name 3 "encrypted lvm"
(parted) quit

lvm setup

cryptsetup luksFormat /dev/nvme0n1p3
cryptsetup luksOpen /dev/nvme0n1p3 crypt_system

In case we're mounting for recovery

vgscan --mknodes
vgchange -ay
lvscan
lvm pvcreate /dev/mapper/crypt_system
vgcreate slackware_vg /dev/mapper/crypt_system
lvcreate -C y -L 2G -n swap slackware_vg
lvcreate -l 100%FREE -n root slackware_vg

mkfs.fat -F32 /dev/nvme0n1p1
mkfs.ext4 /dev/nvme0n1p2
mkfs.ext4 /dev/mapper/slackware_vg-root
mkswap /dev/mapper/slackware_vg-swap
swapon /dev/mapper/slackware-swap

run setup

setup

chroot into newly installed system:

mkdir /mnt/boot/efi
mount /dev/nvmen1p1 /mnt/boot/efi
mount -o bind /dev/ /mnt/dev
mount -o bind /sys /mnt/sys
mount -o bind /proc /mnt/proc

chroot /mnt to generate new intird
/usr/share/mkinitrd/mkinitrd_command_generator.sh -r
mkinitrd -c -k 4.4.14 -f ext4 -r /dev/slackware_vg/root -m usb-storage:xhci-hcd:nvme:jbd2:mbcache:ext4 -C /dev/nvme0n1p3 -L -u -o /boot/initrd.gz
mkdir -p /boot/efi/EFI/Slackware
cp /boot/initrd.gz /boot/efi/EFI/Slackware
cp /boot/vmlinuz-generic-4.4.14 /boot/efi/EFI/Slackware
exit

fix eliloconfig and run eliloconfig

umount /mnt/boot/efi
chroot /mnt
mount /dev/nvme0n1p1 /boot/efi


vim /usr/sbin/eliloconfig

hardcode EFI_DEVICE=/dev/nvme0n1 hardcode EFI_PARTITION=1 and run eliloconfig

eliloconfig

rm /boot/efi/EFI/Slackware/vmlinuz

cat /boot/efi/EFI/Slackware/elilo.conf
chooser=simple
delay=1
timeout=1
#
image=vmlinuz
    label="Slackware huge"
    initrd=initrd.gz
    read-only
    append="root=/dev/slackware_vg/root vga=normal vt.default_utf8 resume=/dev/slackware_vg/swap ro"

image=vmlinuz-generic-4.4.14
    label="Slackware Generic"
    initrd=initrd.gz
    read-only
    append="root=/dev/slackware_vg/root vga=normal vt.default_utf8 resume=/dev/slackware_vg/swap ro"

edit /etc/fstab:

/dev/nvme0n1p1    /boot/efi    vfat    umask=0700    0 1

downloaded most recent kernel packages from -CURRENT (at the time):

a/
kernel-firmware-20200122_1eb2408-noarch-1.txt
kernel-firmware-20200122_1eb2408-noarch-1.txz
kernel-firmware-20200122_1eb2408-noarch-1.txz.asc
kernel-generic-5.4.14-x86_64-1.txt
kernel-generic-5.4.14-x86_64-1.txz
kernel-generic-5.4.14-x86_64-1.txz.asc
kernel-huge-5.4.14-x86_64-1.txt
kernel-huge-5.4.14-x86_64-1.txz
kernel-huge-5.4.14-x86_64-1.txz.asc
kernel-modules-5.4.14-x86_64-1.txt
kernel-modules-5.4.14-x86_64-1.txz
kernel-modules-5.4.14-x86_64-1.txz.asc
kmod-26-x86_64-3.txt
kmod-26-x86_64-3.txz
kmod-26-x86_64-3.txz.asc

d/
http://kernel-headers-5.4.14-x86-1.txz
k/
kernel-sources-5.4.14-noarch-1.txt
kernel-sources-5.4.14-noarch-1.txz
kernel-sources-5.4.14-noarch-1.txz.asc

installpkg *.txz

mkinitrd -c -k 5.4.14 -f ext4 -r /dev/slackware_vg/root -m usb-storage:xhci-hcd:nvme:jbd2:mbcache:ext4 -C /dev/nvme0n1p3 -L -u -o /boot/efi/EFI/Slackware/initrd-5.4.14.gz
cp /boot/vmlinuz*5* /boot/efi/EFI/Slackware

edit elilo.conf:

chooser=simple
delay=1
timeout=1
#
image=vmlinuz-huge-5.4.14
    label="Slackware-5.4.14-huge"
    initrd=initrd-5.4.14.gz
    read-only
    append="root=/dev/slackware_vg/root vga=normal vt.default_utf8 resume=/dev/slackware_vg/swap ro"

image=vmlinuz-generic-5.4.14
    label="Slackware-5.4.14-generic"b
    initrd=initrd-5.4.14.gz
    read-only
    append="root=/dev/slackware_vg/root vga=normal vt.default_utf8 resume=/dev/slackware_vg/swap ro"

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

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

boot into new system

fresh boot

resources: