Skip to content

Instantly share code, notes, and snippets.

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

@sorend
sorend / Update firwmware WD Black SN770 firmware on Arch Linux.md
Last active March 27, 2025 17:12
Update firmware WD Black SN770 firmware on Arch Linux

Update firmware WD Black SN770 firmware on Arch Linux

Been having problems with my new SN770 drive, and decided to check if I can firmware update it on Linux. WD only provides a Windows tool, Western Digital Dashboard to download and install firmwares, but, it's possible to find the firmware and install it using Linux tooling as well.

1. Check that nvme-cli is installed:

❱ sudo pacman -S nvme-cli
@jimboy-701
jimboy-701 / archlinuxzbm.md
Last active December 7, 2024 10:31
Arch Linux with ZFS root, zfs-dkms, ZFSBootMenu, and Secure Boot enabled

Install Arch Linux with ZFS root filesystem, zfs-dkms, ZFSBootMenu, Pacman Auto-snapshots, Secure Boot enabled

Configure system BIOS

Disable Secure Boot. ZFS modules can not be loaded if Secure Boot is enabled.

ZFS automated install script

Before moving on I need to point out that there exists a script that can automate the configuration and install of a ZFS root system. However as convenient as it sounds the script is limited in flexibility and scope. These limitation cannot be overcome unless one has the time and compacity to edit the script to their liking. If you want to install a ZFS root system as quickly as possible and don't care about any particulars than take a good look at this github page.

@gangefors
gangefors / Install FreeNAS SCALE on a partition and create a mirror.md
Last active April 18, 2025 21:50
How to install TrueNAS SCALE on a partition instead of the full disk

Install TrueNAS SCALE on a partition instead of the full disk

The TrueNAS installer doesn't have a way to use anything less than the full device. This is usually a waste of resources when installing to a modern NVMe which is usually several hundred of GB. TrueNAS SCALE will use only a few GB for its system files so installing to a 16GB partition would be helpful.

The easiest way to solve this is to modify the installer script before starting the installation process.

@dzamlo
dzamlo / 99-lifx-keyboard.rules
Created September 11, 2016 16:41
Quick and dirty way to use a cheap bluetooth selfie remote on a linux server (like a raspberry pi) to control lifx lights
ACTION=="add", SUBSYSTEM=="input", ATTRS{name}=="AB Shutter3 ", TAG+="systemd", PROGRAM="/bin/systemd-escape -p [email protected] $env{DEVNAME}", ENV{SYSTEMD_WANTS}+="%c"
@austinmarton
austinmarton / recvRawEth.c
Created June 3, 2012 07:55
Receive raw Ethernet frames in Linux
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <linux/ip.h>
@austinmarton
austinmarton / sendRawEth.c
Created February 27, 2012 08:40
Send a raw Ethernet frame in Linux
/*
* This program is free software: you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation, either version 3 of the License, or
* (at your option) any later version.
*/
#include <arpa/inet.h>
#include <linux/if_packet.h>
#include <stdio.h>