Skip to content

Instantly share code, notes, and snippets.

@jtbrough
jtbrough / enable-initrd-numlock.sh
Last active April 20, 2026 16:35
Enable Num Lock at the LUKS passphrase prompt on CachyOS with Limine
#!/usr/bin/env bash
set -euo pipefail
# Enable Num Lock before the LUKS passphrase prompt on CachyOS systems that use
# mkinitcpio's systemd initramfs and Limine's mkinitcpio integration.
readonly MKINITCPIO_CONF="/etc/mkinitcpio.conf"
readonly INITCPIO_HOOK="/etc/initcpio/install/numlock"
readonly INITRD_SERVICE="/etc/systemd/system/initrd-numlock.service"
readonly BACKUP_SUFFIX="numlock-before"