void-linux / void-linux/void-runit

03-filesystems.sh can't access a keyfile on a separate, encrypted /boot partition

Open
#80 1 comment 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Dominant language
C
Stars
245
Forks
67
Avg merge
2d
Merged PRs (30d)
2

Description

In a setup where /boot is encrypted and placed onto completely separate encrypted disk, and keyfiles are used in crypttab, runit (03-filesystems.sh) tries to check the /boot partition for a keyfile but fails due to it not being mounted by dracut(initramfs) or anything else.

The cryptdevice of /boot partition is already opened in previous booting steps (I assume by grub), it's just isn't mounted yet, at the very end of 03-filesystems it reads fstab and mounts everything properly.

The end result is that I can see warnings during boot about "Failed to open key file.", but otherwise boot ends and mounts everything just fine.

I've added a couple of lsblk checks before "Activating encrypted devices" and after it, to show the point, and also show my configuration in this video:
https://fastupload.co/1097693

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in 03-filesystems.sh around “Activating encrypted devices” and the later fstab mounting step. Reproduce the separate encrypted /boot setup with a keyfile and compare device visibility before and after activation. Done means the keyfile is found without the “Failed to open key file” warning and normal filesystem mounting still succeeds.

Written by the indexing model from the issue text.

Assessment

Tech stack
linux, shell
Domain
operating-systems
Issue type
Bug
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.