Gentoo Websites Logo
Go to: Gentoo Home Documentation Forums Lists Bugs Planet Store Wiki Get Gentoo!
Bug 935261 - >=sys-apps/systemd-256: refuses to boot from initramfs created with sys-apps/systemd[cgroup-hybrid]
Summary: >=sys-apps/systemd-256: refuses to boot from initramfs created with sys-apps/...
Status: RESOLVED FIXED
Alias: None
Product: Gentoo Linux
Classification: Unclassified
Component: Current packages (show other bugs)
Hardware: All Linux
: Normal critical (vote)
Assignee: Gentoo systemd Team
URL:
Whiteboard:
Keywords: PMASKED, PullRequest
Depends on:
Blocks:
 
Reported: 2024-07-01 03:08 UTC by Michał Górny
Modified: 2024-07-01 19:34 UTC (History)
3 users (show)

See Also:
Package list:
Runtime testing required: ---


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-07-01 03:08:48 UTC
sys-apps/systemd-256 is now "refusing to run under cgroup v1".  This effectively means that if you upgrade sys-apps/systemd on your system, but have dracut initramfs built with sys-apps/systemd[cgroup-hybrid], your system no longer boots.  Which kinda sucks.

(You can workaround that by retyping a very long kernel command-line option, and then suffering 30 second delay, but I think hardly counts as a solution.)

We really need some kind of migration path for this.  Or at the very least a warning telling people how to proceed because it's completely non-obvious where "cgroup v1" comes from there.

We also need to check how prebuilt initramfs was built for dist-kernel, and if we need to build new kernels for this.
Comment 1 Larry the Git Cow gentoo-dev 2024-07-01 03:11:22 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=4790fe9ecb66783b00ce27b22d5e0f3c619a3236

commit 4790fe9ecb66783b00ce27b22d5e0f3c619a3236
Author:     Michał Górny <mgorny@gentoo.org>
AuthorDate: 2024-07-01 03:09:37 +0000
Commit:     Michał Górny <mgorny@gentoo.org>
CommitDate: 2024-07-01 03:09:37 +0000

    package.mask: Mask >=sys-apps/systemd-256
    
    Bug: https://bugs.gentoo.org/935261
    Signed-off-by: Michał Górny <mgorny@gentoo.org>

 profiles/package.mask | 5 +++++
 1 file changed, 5 insertions(+)
Comment 2 Andrew Nowa Ammerlaan gentoo-dev 2024-07-01 15:08:08 UTC
Maybe it makes sense for the systemd ebuild to call dist-kernel_reinstall_initramfs on (major) version upgrades? Even when there is no breaking change like in 256, there is a lot of systemd that goes into the initramfs.

Of course that does not resolve this issue for folks who are not using the distribution kernels.

> We also need to check how prebuilt initramfs was built for dist-kernel, and if we need to build new kernels for this.

We don't enable the cgroup-hybrid flag there, and the default is off. So we should be fine, I can test it later to be sure.
Comment 3 Michał Górny archtester Gentoo Infrastructure gentoo-dev Security 2024-07-01 15:10:33 UTC
(In reply to Andrew Nowa Ammerlaan from comment #2)
> We don't enable the cgroup-hybrid flag there, and the default is off. So we
> should be fine, I can test it later to be sure.

I've already tested it, thanks for confirming.
Comment 4 Larry the Git Cow gentoo-dev 2024-07-01 19:18:41 UTC
The bug has been referenced in the following commit(s):

https://gitweb.gentoo.org/repo/gentoo.git/commit/?id=2e0a4dbc6b7753f19a8a6243603bd2792082359e

commit 2e0a4dbc6b7753f19a8a6243603bd2792082359e
Author:     Mike Gilbert <floppym@gentoo.org>
AuthorDate: 2024-07-01 15:12:43 +0000
Commit:     Mike Gilbert <floppym@gentoo.org>
CommitDate: 2024-07-01 19:14:31 +0000

    sys-apps/systemd: add pkg_pretend check for cgroup-hybrid
    
    Bug: https://bugs.gentoo.org/935261
    Signed-off-by: Mike Gilbert <floppym@gentoo.org>

 ...emd-256.1-r1.ebuild => systemd-256.1-r2.ebuild} | 28 +++++++++++++++++++++-
 sys-apps/systemd/systemd-9999.ebuild               | 28 +++++++++++++++++++++-
 2 files changed, 54 insertions(+), 2 deletions(-)