Skip to content

AI: ramp up cgroup v1 deprecation #30852

Closed

Description

@poettering

We should make it hard to boot in cgroupv1 mode, i.e. refuse booting unless some magic option is specified to get it anyway.

Activity

  1. added
    bug 🐛
    on Jan 9, 2024
  2. added this to the v256 milestone on Jan 9, 2024
  3. removed
    bug 🐛
    on Feb 22, 2024
  4. self-assigned this
    on Feb 22, 2024
  5. added 5 commits that reference this issue on Feb 22, 2024
    2a56e2b
    66b6e84
    58a02eb
    9feb7ca
    f2512de
  6. meengu commented on Jun 30, 2024

    @meengu

    Breaking boot completely when the warning delay alone would have been more than enough to raise the issue is an asshole move. There are many classes of devices where recovery is not easy, because you can't easilly edit boot arguments after system fails to boot, or because they are remote.

  7. 10 remaining items

  8. ayunami2000 commented on Jul 16, 2024

    @ayunami2000

    I JUST installed ArchLinuxARM on my Acer Chromebook R13. It worked until I ran pacman -Syu and rebooted. Now it does not boot due to this. How the hell do I add this kernel parameter on a Chromebook?!

    EDIT: figured it out. for others with this issue, you have to use vbutil_kernel --repack with the new kernel parameters, and then flash it to the kernel partition.

  9. meengu commented on Jul 17, 2024

    @meengu

    @ohnoov It's unfortunate that you hit this. That's not how the warning meant to be (i.e. old PID1 setting up v1 and new one breaking).

    Edge case of not updating initramfs often enough, I guess.

    It seems that pacman doesn't automate that. I'd suggest adding a hook there to keep systemd binaries in sync. (Also, what was the version within the initrd? This suggests it must have been <=v247.)

    It was quite old. Probably ~3 years old. I don't think I regenerated it ever since I set up full disk encryption on my notebook. I use kernel build without modules, so I don't normally need to update initramfs pretty much ever. (except this time :)) and prefer it that way due to stability/reliability. Normally on this platform (pinebook pro + levinboot all running from eMMC) it's only possible to update kernel arguments from a running system without extra tools and notebook disassembly.

  10. meengu commented on Jul 17, 2024

    @meengu

    I JUST installed ArchLinuxARM on my Acer Chromebook R13. It worked until I ran pacman -Syu and rebooted. Now it does not boot due to this. How the hell do I add this kernel parameter on a Chromebook?!

    ArchLinuxARM-oak-latest.tar.gz is from 01-Mar-2023 so that suggests just a year old systemd in initramfs will result in this behavior.

  11. YHNdnzj commented on Jul 17, 2024

    @YHNdnzj
    Member

    I JUST installed ArchLinuxARM on my Acer Chromebook R13. It worked until I ran pacman -Syu and rebooted. Now it does not boot due to this. How the hell do I add this kernel parameter on a Chromebook?!

    ArchLinuxARM-oak-latest.tar.gz is from 01-Mar-2023 so that suggests just a year old systemd in initramfs will result in this behavior.

    Arch Linux switched the default to v2 long before that. With mkinitcpio I seriously doubt that systemd actually runs in the initramfs. Arch defaults to busybox-based init after all.

    Please provide your /etc/mkinitcpio.conf and /proc/cmdline.

  12. catalinsanda commented on Jul 21, 2024

    @catalinsanda

    @YHNdnzj - Have same issue with Arch Linux ARM on an Odroid XU4 installed some time ago, but kept up to date.
    The boot messages just mentioned "systemd[1]: Freezing execution.", which is very generic and didn't provide any clue to the underlying issue. Running out of options I've hooked the serial console and there I saw this: "[!!!!!!] Refusing to run under cgroup v1, SY… specified on kernel command line." which lead me to this page.

  13. catalinsanda commented on Jul 21, 2024

    @catalinsanda

    Okey, leaving this here for those interested on how to fix this on an Arch Linux, probably not the best place, but it ranks pretty up on Google, so here it goes:

    I had systemd.unified_cgroup_hierarchy=0 added to the kernel params in boot.txt. This was done 3 or so years ago, and if I remember correctly, I've done it to make docker run.

    Anyway, the fix is to edit boot.txt, remove the systemd.unified_cgroup_hierarchy=0, run a ./mkscr to make boot.scr and then reinstall the kernel with a pacman -S linux which will rebuild the initial ramdisk.

    Interestingly enough, now docker runs without the cgroup option.

  14. archisman-panigrahi commented on Sep 22, 2024

    @archisman-panigrahi

    ArchLinuxARM-oak-latest.tar.gz is from 01-Mar-2023 so that suggests just a year old systemd in initramfs will result in this behavior.

    @ohnoov I ran into the same issue with the same chromebook image (I installed the image, updated, and rebooted, and ran into the issue). Is there a way to fix it now?

  15. martin-ueding commented on Oct 31, 2024

    @martin-ueding

    I've just upgraded to Fedora 41 and hit this issue. Since it was released this Monday, more people might be coming in with the same issue.

    The option systemd.unified_cgroup_hierarchy=0 must have been set via NVIDIA Docker. Solving it is quite straightforward:

    1. Press e in GRUB to edit the command line, remove the systemd.unified_cgroup_hierarchy=0 option and boot the system.
    2. Edit /etc/default/grub and remove systemd.unified_cgroup_hierarchy=0 from the line with GRUB_CMDLINE_LINUX.
    3. Run sudo grub2-mkconfig -o /boot/grub2/grub.cfg to generate a new config.
  16. archisman-panigrahi commented on Nov 9, 2024

    @archisman-panigrahi

    vbutil_kernel --repack

    @ayunami2000 Can you please share more details? Since the system refuses to open at all, how do you run this command? And how/what file do you flash to the boot partition?

  17. ayunami2000 commented on Nov 9, 2024

    @ayunami2000

    vbutil_kernel --repack

    @ayunami2000 Can you please share more details? Since the system refuses to open at all, how do you run this command? And how/what file do you flash to the boot partition?

    It was a while ago, but as far as I can remember, I could still boot to chrome os and used the terminal there to run that command and flash. I was booting off of an external flash drive. I do not remember the other details except that chrome os requires fancy shenanigans to boot stuff like this, and so that's why this was even possible to patch.

  18. archisman-panigrahi commented on Nov 9, 2024

    @archisman-panigrahi

    @ayunami2000 What are the arguments of vbutil_kernel --repack?

  19. ayunami2000 commented on Nov 9, 2024

    @ayunami2000

    @ayunami2000 What are the arguments of vbutil_kernel --repack?

    I don't remember but I think you should be able to Google it, hopefully.

  20. nroach44 commented on Dec 13, 2024

    @nroach44

    Can this be amended to either kill/exit systemd and trigger a panic (allowing CONFIG_PANIC_TIMEOUT= to take us back to the bootloader), or reboot the system after a timeout?

    I'm doing "dumb shit" on a device with an old (4.2) vendor kernel, and while I've worked around this, I had to manually remove power to the system physically to recover.

  21. Werkov commented on Dec 13, 2024

    @Werkov
    Contributor

    What version are you one?
    Doesn't d0ab0e5 fix that?

  22. nroach44 commented on Dec 13, 2024

    @nroach44

    Ah, yes it does. I've got 256.4 currently because my buildroot tree is 2024.08.2, but it's been bumped to .7 recently and I haven't updated it, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions