Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[RFC] kdump LUKS support #10

Open
wants to merge 4 commits into
base: main
Choose a base branch
from
Open

[RFC] kdump LUKS support #10

wants to merge 4 commits into from

Commits on Jun 4, 2024

  1. Get uuid by MAJ:MIN

    Signed-off-by: Coiby Xu <[email protected]>
    coiby committed Jun 4, 2024
    Configuration menu
    Copy the full SHA
    00e78be View commit details
    Browse the repository at this point in the history

Commits on Jun 7, 2024

  1. Support dumping to a LUKS-encrypted target

    Based on the new kernel feature that dm-crypt keys can persist for the
    kdump kernel [1], this patch which is adapted from [2]
    1) ask the 1st kernel to save a copy of the LUKS volume keys
    2) ask the kdump kernel to add the copy of the LUKS volume keys to
       specified keyring and then use --volume-key-keyring the unlock the
       LUKS device.
    
    [1] https://github.com/coiby/linux/blob/dm_crypt_v15/Documentation/ABI/testing/crash_dm_crypt_keys
    [2] https://lists.fedorahosted.org/archives/list/[email protected]/message/Y3KUSJQPN3JHUUC2FPIK7H4HTSX2TUCX/
    
    Signed-off-by: Coiby Xu <[email protected]>
    coiby committed Jun 7, 2024
    Configuration menu
    Copy the full SHA
    757aed9 View commit details
    Browse the repository at this point in the history

Commits on Jun 8, 2024

  1. LUKS: make /usr writable

    Since commit ffc1ec73b3 ("pid1: add ProtectSystem= as system-wide
    configuration, and default it to true in the initrd"), systemd makes
    /usr read-only by default and it will cause dracut to not wait for the
    LUKS-encrypted devices to be unlocked,
    
        dracut-cmdline[296]: mv: inter-device move failed: '/tmp/294-daemon-reload.sh' to '/lib/dracut/hooks/initqueue/daemon-reload.sh'; unable to remove target: Read-only file syste
    
        dracut-cmdline[294]: /sbin/initqueue: line 71: /lib/dracut/hooks/initqueue/work: Read-only file system
        dracut-cmdline[221]: /lib/dracut-dev-lib.sh: line 118: /lib/dracut/hooks/initqueue/finished/devexists-\x2fdev\x2fmyvg\x2fluks_lv.sh: Read-only file system
        dracut-cmdline[221]: /lib/dracut-dev-lib.sh: line 103: /lib/dracut/hooks/emergency/80-\x2fdev\x2fmyvg\x2fluks_lv.sh: Read-only file system
    
    Fix the above issue by making /usr writable.
    
    Signed-off-by: Coiby Xu <[email protected]>
    coiby committed Jun 8, 2024
    Configuration menu
    Copy the full SHA
    be458d8 View commit details
    Browse the repository at this point in the history
  2. LUKS: hotplug support

    Send reuse command to /sys/kernel/crash_dm_crypt_keys [1] to reuse saved dm
    crypt keys.
    
    [1] https://github.com/coiby/linux/blob/dm_crypt_v15/Documentation/ABI/testing/crash_dm_crypt_keys
    
    Signed-off-by: Coiby Xu <[email protected]>
    coiby committed Jun 8, 2024
    Configuration menu
    Copy the full SHA
    9b48a73 View commit details
    Browse the repository at this point in the history