Skip to content

Instantly share code, notes, and snippets.

@NetworkJack2
Last active March 4, 2026 21:55
Show Gist options
  • Select an option

  • Save NetworkJack2/9404bab897cce041045f3f6062712fa5 to your computer and use it in GitHub Desktop.

Select an option

Save NetworkJack2/9404bab897cce041045f3f6062712fa5 to your computer and use it in GitHub Desktop.
kernel command line for encrypted root on arch with usb sticks
#This goes in bootloader config on kernel or options line
# For RAID
cryptdevice=/dev/md1:cryptroot cryptkey=/dev/disk/by-label/usb_key:ext4:/crypto_keyfile.bin root=/dev/mapper/cryptroot rw
# No RAID, but SATA
cryptdevice=/dev/sda2:cryptroot cryptkey=/dev/disk/by-label/usb_key:ext4:/crypto_keyfile.bin root=/dev/mapper/cryptroot rw
# No RAID, but NVME
cryptdevice=/dev/nvme0n1p2:cryptroot cryptkey=/dev/disk/by-label/usb_key:ext4:/crypto_keyfile.bin root=/dev/mapper/cryptroot rw
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment