Coder Social home page Coder Social logo

dracut-pcscd-cryptsetup's Introduction

This dracut module installs the services that allow systemd-cryptsetup to unlock disks encrypted with PKCS11 token.

Installation

This module has been tested on Gentoo, but should in work on other Linux flavors.

Gentoo

Install from nitratesky overlay:

eselect repository enable nitratesky && emerge -a sys-kernel/dracut-pcscd-cryptsetup

Other

  1. Install dependencies:

    • ccid
    • p11-kit
    • opensc
    • pcsc-lite
  2. Create a dracut module directory (/usr/lib/dracut/modules.d/99pcscd-cryptsetup)

  3. Place module-setup.sh file in that directory

Configuration

In order to use this module, add the following to your dracut configuration (located in /etc/dracut.conf or in /etc/dracut.conf.d/:

add_dracutmodules+=" pcscd-cryptsetup "

Make sure that the dracut configuration also contains

add_dracutmodules+=" crypt "

And /etc/crypttab is installed into initramfs:

install_items+=" /etc/crypttab "

Troubleshooting

This module contains _debug function that adds systemd-cryptenroll and opensc-tool to initramfs.

If [email protected] does not prompt for token password during boot, you can add call to _debug function into install function in module-setup.sh. On Gentoo, enable debug useflag and emerge --changed-use dracut-pcscd-module.

Then, once booted into dracut emergency shell, check if pcscd.service is running (run systemctl status).

Check if the reader is generally visible (run opensc-tool -l).

Check if systemd can see the token (run systemd-cryptenroll --pkcs11-token=list).

if no obvious error is returned โ€“ feel free to open an issue on Github.

dracut-pcscd-cryptsetup's People

Contributors

vtimofeenko avatar

Stargazers

 avatar

Watchers

 avatar

dracut-pcscd-cryptsetup's Issues

Boot ignores PKCS11 enrolled root drive

Hey Vladimir!

My boot drive is enrolled with PKCS11 Yubiko card. You can check the details here, especially my last 2 comments:ย systemd/systemd#22866

My smart card is basically ignored and I use a backup password to decrypt.

I understand I need to include PCKS11 support to initramfs. But I am on Fedora 35 and your plugin is around an year old. Is your plugin still required and can it work on Dracut for Fedora?

Any help very much appreciated!

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.