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

LVM boot failure with systemd-253 #2211

Closed
Toolybird opened this issue Feb 20, 2023 · 9 comments · Fixed by #2270
Closed

LVM boot failure with systemd-253 #2211

Toolybird opened this issue Feb 20, 2023 · 9 comments · Fixed by #2270
Labels
arch Issue tracker for the Arch distribution bug Our bugs gentoo Issue tracker for the Gentoo distribution lvm Issues related to the lvm module regression
Milestone

Comments

@Toolybird
Copy link

Toolybird commented Feb 20, 2023

Describe the bug
Updating to systemd-253 causes boot failure when dracut is used to generate the initrd and the root volume is LVM.

Distribution used
Arch Linux

Dracut version
Arch is on dracut 056-1 but another user has tested the current dracut git with same result.

Init system
systemd

To Reproduce

  • have LVM root volume
  • install systemd-253
  • regenerate initrd with dracut
  • reboot

Expected behavior
Boot success.

Additional context
The offending systemd commit has been bisected. Please see:

systemd/systemd#26488

Additional context in this Arch bug report:

https://bugs.archlinux.org/task/77569

At this stage it seems like dracut is not coping with latest systemd changes. Thanks for any help.

@Toolybird Toolybird added the bug Our bugs label Feb 20, 2023
@Toolybird
Copy link
Author

It appears this issue will be fixed at the systemd level as a patch was produced over there. Sorry for the noise.

@Toolybird
Copy link
Author

Reopening as the systemd devs seem to think dracut needs fixing anyway.

@Toolybird Toolybird reopened this Feb 20, 2023
@LaszloGombos
Copy link
Collaborator

CC @aafeijoo-suse @teigland

@pvalena
Copy link
Contributor

pvalena commented Feb 21, 2023

There's a good explanation here: systemd/systemd#26488 (comment)

Ideally the file would not be truncated & rewritten (by systemd and dracut as well), but then we'd need two files - is my understanding.

EDIT: the file cannot be simply created in the first place, due to sandboxing.

@lnykryn
Copy link
Member

lnykryn commented Feb 21, 2023

I think we should move generator_wait_for_dev to a cmdline hook. It is not the nicest solution, but logically it belongs there.

@johannbg
Copy link
Collaborator

@lnykryn it's more of an workaround not a solution and afaikt would only solve half the problem.

@aafeijoo-suse
Copy link
Member

@lnykryn it's more of an workaround not a solution and afaikt would only solve half the problem.

Why is not a solution to only move the part of generator_wait_for_dev that creates the hooks to a cmdline script, as @lnykryn proposes? the crypt module does the same thing:

printf -- '[ -e /dev/disk/by-id/dm-uuid-CRYPT-LUKS?-*%s*-* ] || exit 1\n' "$uuid" \
>> "$hookdir/initqueue/finished/90-crypt.sh"
{
printf -- '[ -e /dev/disk/by-uuid/*%s* ] || ' "$luksid"
printf -- 'warn "crypto LUKS UUID "%s" not found"\n' "$luksid"
} >> "$hookdir/emergency/90-crypt.sh"

The only missing part would be how to know from the cmdline hook the directory that systemd passes to generators (i.e. usually /run/systemd/generator), but we can hardcode it for now.

aafeijoo-suse added a commit to aafeijoo-suse/dracut that referenced this issue Mar 3, 2023
…or dir

Altough it was already documented in systemd.generator(7) that generators must
not write to locations other than those passed as arguments, since
systemd/systemd@ca6ce62d systemd executes generators
in a mount namespace "sandbox", so now the hooks created by the rootfs-generator
are lost.

These hooks are created using the root= cmdline argument, so this patch moves
the creation of these hooks to a cmdline hook.

Fixes issue dracutdevs#2211
Fixes issue dracutdevs#2225
@LaszloGombos LaszloGombos added arch Issue tracker for the Arch distribution gentoo Issue tracker for the Gentoo distribution labels Mar 5, 2023
@aafeijoo-suse
Copy link
Member

This issue will affect openSUSE Tumbleweed soon, systemd will be updated from v252.6 to v253.1 and it will not carry the Fedora workaround, so I'd like to have the dracut upstream fix agreed. @lnykryn I tried your proposal and it seems to work fine (#2225 is fixed). Do you plan to submit a PR? If not, I can send it.

@LaszloGombos LaszloGombos added this to the dracut-060 milestone Mar 7, 2023
@lnykryn
Copy link
Member

lnykryn commented Mar 7, 2023

@aafeijoo-suse Please file the PR.

aafeijoo-suse added a commit to aafeijoo-suse/dracut that referenced this issue Mar 7, 2023
…or dir

Although it was already documented in systemd.generator(7) that generators must
not write to locations other than those passed as arguments, since
systemd/systemd@ca6ce62d systemd executes generators
in a mount namespace "sandbox", so now the hooks created by the rootfs-generator
are lost.

These hooks are created using the root= cmdline argument, so this patch moves
the creation of these hooks to a cmdline hook.

Fixes issue dracutdevs#2211
Fixes issue dracutdevs#2225
aafeijoo-suse added a commit to aafeijoo-suse/dracut that referenced this issue Mar 7, 2023
…or dir

Although it was already documented in systemd.generator(7) that generators must
not write to locations other than those passed as arguments, since
systemd/systemd@ca6ce62d systemd executes generators
in a mount namespace "sandbox", so now the hooks created by the rootfs-generator
are lost.

These hooks are created using the root= cmdline argument, so this patch moves
the creation of these hooks to a cmdline hook.

Fixes issue dracutdevs#2211
Fixes issue dracutdevs#2225
aafeijoo-suse added a commit to aafeijoo-suse/dracut that referenced this issue Mar 8, 2023
…or dir

Although it was already documented in systemd.generator(7) that generators must
not write to locations other than those passed as arguments, since
systemd/systemd@ca6ce62d systemd executes generators
in a mount namespace "sandbox", so now the hooks created by the rootfs-generator
are lost.

These hooks are created using the root= cmdline argument, so this patch moves
the creation of these hooks to a cmdline hook.

Fixes issue dracutdevs#2211
Fixes issue dracutdevs#2225
aafeijoo-suse added a commit to aafeijoo-suse/dracut that referenced this issue Mar 8, 2023
…or dir

Although it was already documented in systemd.generator(7) that generators must
not write to locations other than those passed as arguments, since
systemd/systemd@ca6ce62d systemd executes generators
in a mount namespace "sandbox", so now the hooks created by the rootfs-generator
are lost.

These hooks are created using the root= cmdline argument, so this patch moves
the creation of these hooks to a cmdline hook.

Fixes issue dracutdevs#2211
Fixes issue dracutdevs#2225
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Mar 14, 2023
https://build.opensuse.org/request/show/1070393
by user fbui + dimstar_suse
- Add 5000-core-manager-run-generators-directly-when-we-are-in-.patch, a
  temporary workaround until dracutdevs/dracut#2211 is
  fixed in dracut.

- Upgrade to v253.1 (commit 6c327d74aa0d350482e82a247d7018559699798d)
  See https://github.com/openSUSE/systemd/blob/SUSE/v253/NEWS for details.
  * Rebased 0001-conf-parser-introduce-early-drop-ins.patch
  * Ship systemd-journald-audit.socket again: it can now be disabled via the
    usual "systemctl disable" mechanism to stop collection of audit
    messages. Note that it's handled by the preset logic, which turns it off by
    default.
  * TEST_06_SELINUX needs selinux-policy-devel.
bmwiedemann pushed a commit to bmwiedemann/openSUSE that referenced this issue Mar 17, 2023
https://build.opensuse.org/request/show/1072270
by user fbui + dimstar_suse
- Add 5002-systemctl-explicitly-cast-the-constants-to-uint64_t.patch (bsc#1209305)
  Added temporarily until it's merged in either the stable v253 branch or in the
  SUSE git repo.

- Add 5001-Revert-core-propagate-stop-too-if-restart-is-issued.patch until
  systemd/systemd#26839 is fixed properly.

- testsuite: mtools is required by TEST-58-REPART

- testsuite: swtpm and tpm2.0-tools are needed by TEST-70-TPM2

- Add 5000-core-manager-run-generators-directly-when-we-are-in-.patch, a
  temporary workaround until dracutdevs/dracut#2211 is
  fixed in dracut.

- Upgrade to v253.1 (commit 6c327d74aa0d350482e82a247d7018559699798d)
  See https://github.com/openSUSE/systemd/blob/SUSE/v253/NEWS for details.
  * Rebased 0001-conf-parser-introduce-e
gerrit-photon pushed a commit to vmware/photon that referenced this issue Mar 29, 2023
lvm with latest systemd and dracut doesn't boot up.
Upstream issues for reference:
  - dracut: dracutdevs/dracut#2211
  - systemd: systemd/systemd#26488

Temporary patch applied until this issue is resolved
systemd/systemd#26494

See systemd/systemd#26488 (comment)

Change-Id: I1964ff2a82b7c2d6c53e02b4368a8d5d6f9a03a1
Signed-off-by: Tapas Kundu <[email protected]>
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/20134
gerrit-photon pushed a commit to vmware/photon that referenced this issue Mar 31, 2023
lvm with latest systemd and dracut doesn't boot up.
Upstream issues for reference:
  - dracut: dracutdevs/dracut#2211
  - systemd: systemd/systemd#26488

Temporary patch applied until this issue is resolved
systemd/systemd#26494

See systemd/systemd#26488 (comment)

Change-Id: I1964ff2a82b7c2d6c53e02b4368a8d5d6f9a03a1
Reviewed-on: http://photon-jenkins.eng.vmware.com:8082/20132
Tested-by: gerrit-photon <[email protected]>
Reviewed-by: Susant Sahani <[email protected]>
LaszloGombos pushed a commit that referenced this issue May 10, 2023
…or dir

Although it was already documented in systemd.generator(7) that generators must
not write to locations other than those passed as arguments, since
systemd/systemd@ca6ce62d systemd executes generators
in a mount namespace "sandbox", so now the hooks created by the rootfs-generator
are lost.

These hooks are created using the root= cmdline argument, so this patch moves
the creation of these hooks to a cmdline hook.

Fixes issue #2211
Fixes issue #2225
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Oct 29, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Oct 29, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Oct 29, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Oct 29, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Oct 29, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Oct 29, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Oct 29, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Oct 29, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Oct 29, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Oct 29, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Oct 29, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Oct 29, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Oct 29, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Nov 13, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Nov 16, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
RedL0tus pushed a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Nov 18, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Nov 21, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Nov 22, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Nov 22, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Nov 22, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Nov 22, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Nov 22, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Nov 22, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Nov 23, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Nov 23, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Nov 23, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Nov 23, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
MingcongBai added a commit to AOSC-Dev/aosc-os-abbs that referenced this issue Nov 23, 2023
This fixes LVM2 volume group initialisation with systemd 254.4.

Ref: dracutdevs/dracut#2211
bluca pushed a commit to bluca/systemd-suse that referenced this issue Jan 5, 2025
https://build.opensuse.org/request/show/1070393
by user fbui + dimstar_suse
- Add 5000-core-manager-run-generators-directly-when-we-are-in-.patch, a
  temporary workaround until dracutdevs/dracut#2211 is
  fixed in dracut.

- Upgrade to v253.1 (commit 6c327d74aa0d350482e82a247d7018559699798d)
  See https://github.com/openSUSE/systemd/blob/SUSE/v253/NEWS for details.
  * Rebased 0001-conf-parser-introduce-early-drop-ins.patch
  * Ship systemd-journald-audit.socket again: it can now be disabled via the
    usual "systemctl disable" mechanism to stop collection of audit
    messages. Note that it's handled by the preset logic, which turns it off by
    default.
  * TEST_06_SELINUX needs selinux-policy-devel.
bluca pushed a commit to bluca/systemd-suse that referenced this issue Jan 5, 2025
https://build.opensuse.org/request/show/1072270
by user fbui + dimstar_suse
- Add 5002-systemctl-explicitly-cast-the-constants-to-uint64_t.patch (bsc#1209305)
  Added temporarily until it's merged in either the stable v253 branch or in the
  SUSE git repo.

- Add 5001-Revert-core-propagate-stop-too-if-restart-is-issued.patch until
  systemd/systemd#26839 is fixed properly.

- testsuite: mtools is required by TEST-58-REPART

- testsuite: swtpm and tpm2.0-tools are needed by TEST-70-TPM2

- Add 5000-core-manager-run-generators-directly-when-we-are-in-.patch, a
  temporary workaround until dracutdevs/dracut#2211 is
  fixed in dracut.

- Upgrade to v253.1 (commit 6c327d74aa0d350482e82a247d7018559699798d)
  See https://github.com/openSUSE/systemd/blob/SUSE/v253/NEWS for details.
  * Rebased 0001-conf-parser-introduce-e
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
arch Issue tracker for the Arch distribution bug Our bugs gentoo Issue tracker for the Gentoo distribution lvm Issues related to the lvm module regression
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants