Slackware lvm + encryption

There are plenty of docs on the net to get one started with lvm and encryption on Slackware, this is more of a quick bullet list to get you there in 0 time.

Boot up from the cd and start the following once at the prompt:

1. fdisk /dev/sda ( create one boot partition 100mb and another partition to fill the drive )
2. mkfs.ext4 /dev/sda1
3. cryptsetup -y -s 512 -c aes-xts-plain luksFormat /dev/sda2
4. cryptsetup luksOpen /dev/sda2 slackcrypt
5. pvcreate /dev/mapper/slackcrypt
6. vgcreate slackvg /dev/mapper/slackware
7. lvcreate -n swap -L +5G slackvg (if you are using an ssd , put swap on something else)
8. lvcreate -n root -l %FREE slackvg
9. mkfs.ext4 /dev/mapper/slackvg-root && mkswap /dev/mapper/slackvg-swap
10. run setup and install to your lvm partition and also use the boot partition as well
11. after installation chroot to your mounted root partition run mkinitrd, use /usr/share/mkinitrd/ or run your own
12. update grub or lilo ( I use grub2 )


Slackware chroot from cd

Simply do the following when you need to do some repairs:

1. Boot from the cd
2. mount your root partition to /mnt , if you have lvm paritions use vgchange -ay first.
3. If you have additional partitions for boot,usr, var etc etc mount them as well
4. mount -o bind /proc /mnt/proc ; mount -o bind /sys /mnt/sys ; mount -o bind /dev /mnt/dev
5. chroot /mnt


Slackware + btrfs + encryption

Another bullet list of how to get btrfs with encryption on your system.

1. fdisk /dev/sda ( create one boot partition 100mb, create one root partition and one swap [ I dont use swap, so you dont have to create a swap partition ]
2. mkfs.ext4 /dev/sda1
3. cryptsetup -y -s 512 -c aes-xts-plain luksFormat /dev/sda2
4. cryptsetup luksOpen /dev/sda2 slackcrypt
5. mkfs.btrfs /dev/mapper/slackcrypt
6. mount /dev/mapper/slackcrypt /mnt ; cd /mnt
7. btrfs subvolume create system ; btrfs subvolume create home ; btrfs subvolume create var ; btrfs subvolume create usr
8. confirm you’ve created the subvolumes : btfs subvolume list /mnt
9. cd / ; umount /mnt
10. mount -t btrfs -o subvol=system /mnt (mounting the main subvolume)
11. mkdir -p /mnt/{home,usr,var,boot}
12. mount -t btrfs -o subvol=home /mnt/home ; mount -t btrfs -o subvol=usr /mnt/usr; mount -t btrfs -o subvol=var /mnt/var
13. mount /dev/sda1 /mnt/boot
12. run setup & DO NOT FORMAT and do not exit once finish installing
13. chroot /mnt
14. use /usr/share/mkinitrd/ or run your own mkinitrd command.
15. update grub or lilo and point to the initrd file

—I forgot the rest of the steps I took, I’ll redo the process on a virtual box or something but this should 99.9999 % to being finished.

Slackware urxvt 256 colors

For Slackware users wanting to have 256 colors in urxvt , add the following configuration options to your slackbuild.


–enable-256-color \
–enable-xterm-colors=256 \
–with-term=rxvt-256color \