Skip to content

Instantly share code, notes, and snippets.

View linux4life798's full-sized avatar

Craig Hesling linux4life798

View GitHub Profile
@linux4life798
linux4life798 / nginx_proxy_default.conf
Last active April 19, 2025 05:50
Change Home Assistant NGINX SSL Proxy Listening Port
# /share/nginx_proxy_default.conf
# Blank.
# apk add cadaver
sudo apt install cadaver

cadaver http://100.100.100.100:8080/<tailnet_name>/<host>/<share>
> ls
@linux4life798
linux4life798 / unraid_installer.md
Last active December 2, 2024 03:06
Setup an Unraid inestaller on USB driver on Linux
@linux4life798
linux4life798 / portainer.md
Last active July 29, 2024 09:30
Setup Portainer on Debian with Tailscale
@linux4life798
linux4life798 / qemu-guest-debian.md
Last active July 15, 2024 03:18
Setup Debian as QEMU/KVM/libvirt guest

Channel: unix + org.qemu.guest_agent.0

It doesn't need to be the QEMU agent type. Both the unix and QEMU vdagent channels have "clipboard" support, but neither seem to work. Clipboard support of the spicevmc does seem to work.

You need the following package to enable this channel, but it is usually automatically installed during debian installer:

sudo apt install qemu-guest-agent

Setup

Very unfortunatley, there is not a reasonable way to get Debian's default initramfs-tools to unlock LUKS volumes using tokens, like FIDO2 or TPM2. The best attempt to make this work using initramfs-tools is https://github.com/bertogg/fido2luks.

The most common way to handle unlocking these LUKS volumes is to use dracut to generate an initram filesystems. I'm not saying that dracut is great, but it will allow you to easily use systemd-cryptenroll tokenized luks unlock methods.

Setup dracut on Debian

@linux4life798
linux4life798 / pstore.md
Last active May 28, 2024 06:53
Info about enabling kernel log dump to pstore

On Debian the /usr/lib/tmpfiles.d/systemd-pstore.conf file can modified to enable pstore log saving on panic and shutdown.

w- /sys/module/printk/parameters/always_kmsg_dump - - - - Y
w- /sys/module/kernel/parameters/crash_kexec_post_notifiers - - - - Y

The systemd-pstore service is already configured to read from /sys/fs/pstore on the next boot and add these log fragment to the journal log and directly copy to /var/lib/systemd/pstore/.

@linux4life798
linux4life798 / btrfs.md
Last active April 2, 2025 20:48
Resources for BTRFS Setup and Management
@linux4life798
linux4life798 / date-format-for-file-name.bash
Last active May 27, 2024 00:01
Print a file path worthy timestamp
# Date formatting for file name purposes.
# You can lock in one timezone by setting the TZ environment variable.
# 2024-05-26_04:55:50PM_PDT
TZ='America/Los_Angeles' date "+%Y-%m-%d_%I:%M:%S%p_%Z"
# 2024-05-26_07:59:06PM_EDT
TZ='America/New_York' date "+%Y-%m-%d_%I:%M:%S%p_%Z"
@linux4life798
linux4life798 / 0-io-block-size-tuning-and-benchmarking.md
Last active October 28, 2024 04:14
I/O Benchmarking and NVME/Encryption/FS Tuning

Here is the cheatsheet for block size tuning of NVME drives, LUKS encryption, filesystem, and partitions.