Debian Misc Info & Tips
Full Disk encryption
The current version of GRUB in Debian Bullseye only supports LUKS1 and by default the Debian uses LUKS2.
The most simple way around this is to install with a seperate /boot
partition and then convert that to LUKS1 so grub can access it.
Then from there, everything but /boot/efi
is encrypted.
Not perfect but it works pretty well.
My Refs
Full Disk Encryption in DebianParaphrased Steps
See the link above for more in detail steps! This isn't a step by step guide.
- Install Debian with:
- normal
/boot/efi
partition - normal
/boot
partition - LVM on top of LUKS:
/
/home
swap
- anything else you want
- normal
- Boot up install and test out the system
- umount
/boot/efi
- Tar up
/boot
- umount the /boot partition
- Set up LUKS1 on the
/boot
partition then install an FS on it, like ext4 - Update
/etc/crypttab
- Update
/etc/fstab
- mount
/boot
- untar
/boot
backup - mount
/boot/efi
- regenerate the grub cfg and make sure the cryptoisk module is enabled
- regenerate the initramfs
- test boot (will have to input both luks passwords)
- follow the one password steps in the link above for both the LVM and
/boot
partition
Compiling a Custom Vanilla Kernel
This is really easy in Debian nowadays.
- Make sure you have all the packages installed to BUILD a kernel
- git clone linux-stable
- DL Debian kernel with a version close to yours
- Extract deb package with ar then data.tar.xz with tar
- Copy over config from deb package to linux-stable
$ make olddefconfig
$ make -j `nproc` bindeb-pkg
$ sudo dpkg -i ../linux-header... ../linux-image # not the debug stuff unless you want though
- Maybe get yourself a cup of coffee as a reward
Various Small $STUFF
xtrlock with XFCE4 Util
Easiest way is to just create a wrapper in /usr/local/bin/xlock
for xtrlock -b
.
Also for the /usr/bin/xflock4
command, sneak in a sleep 1
above the xset dpms force off
so the monitor power saving mode is turned on when you lock your screen.
surfshark Always Running
Call me crazy but I'm not a fan of SW always running, especially when I'm not using it.
# systemctl --user --global disable surfsharkd.service
# systemctl disable surfsharkd2.service
Then you can run a wrapper:
#!/bin/bash
systemctl --user start surfsharkd.service
sleep 1
/usr/bin/surfshark
sleep 1
systemctl --user stop surfsharkd.service