Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Configure LUKS auto-unlocking with TPM2 in Arch Linux/CachyOS

To configure LUKS auto-unlocking with TPM2 in Arch Linux/CachyOS, do the following steps:

  • Make a copy of your /etc/crypttab for initramfs

    sudo cp /etc/crypttab /etc/crypttab.initramfs
    
  • Make a backup of your /etc/mkinitcpio.conf

    sudo cp /etc/mkinitcpio.conf /etc/mkinitcpio.conf.bak
    
  • Include the necessary systemd stuff in your initramfs by replacing the following in your /etc/mkinitcpio.conf file:

    • udev > systemd
    • keymap and consolefont > sd-vconsole
    • encrypt > sd-encrypt
    • Example:
      • Original:

        HOOKS=(base udev plymouth autodetect microcode modconf kms block keyboard keymap consolefont  encrypt filesystems fsck)
        
      • Modified:

        HOOKS=(base systemd plymouth autodetect microcode modconf kms block keyboard sd-vconsole sd-encrypt filesystems fsck)
        
  • Regenerate your initramfs

    sudo mkinitcpio -P
    
  • Continue onwards with linux/others/Configure LUKS Auto-unlocking with TPM2