Closed Ventusfahrer closed 1 year ago
maybe it is worth to have also a look at:
https://github.com/pyavitz/debian-image-builder/issues/47
If the cgroup v1 needs to be fixed in /boot/config.ini, the .deb package is not fixing it.
I ran into this issue as well with the ubuntu image for the odroid M1. I resolved it by following the steps on hardkernel for updating kernel params.
So I just added the following to the /etc/default/flash-kernel
:
LINUX_KERNEL_CMDLINE_DEFAULTS="apparmor=1 security=apparmor systemd.unified_cgroup_hierarchy=false"
Then following the docs again, I ran sudo /usr/sbin/update-bootscript
which wrote a new boot.scr
and rebooted.
To verify, you can check /proc/cmdline
and check for your new settings:
cat /proc/cmdline
apparmor=1 security=apparmor systemd.unified_cgroup_hierarchy=false root=/dev/nvme0n1p2 rootwait ro quiet earlycon=uart8250,mmio32,0xfe660000 pci=nomsi fsck.mode=force fsck.repair=yes mtdparts=sfc_nor:0x20000@0xe0000(env),0x200000@0x100000(uboot),0x100000@0x300000(splash),0xc00000@0x400000(firmware) console=tty1
I don't have an N2, but it looks like something similar should be possible.
...
I did some more testing and I'm not sure with the hardkernel images if we even need to worry about disabling v2 cgroups. If I run a mount -l | grep cgroup
I see the following:
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
The multple entries under /sys/fs/
indicate to me that this isn't just using v2. If I run the same on a x86_64 machine on a newer kernel version, I will only see the /sys/fs/cgroup
with type cgroup2
.
I'm getting the same on a fresh install on RaspberryPi4-64:
[warn] Could not find /etc/default/grub or /boot/firmware/cmdline.txt failed to switch to cgroup v1
I ran into this issue as well with the ubuntu image for the odroid M1. I resolved it by following the steps on hardkernel for updating kernel params.
So I just added the following to the
/etc/default/flash-kernel
:LINUX_KERNEL_CMDLINE_DEFAULTS="apparmor=1 security=apparmor systemd.unified_cgroup_hierarchy=false"
Then following the docs again, I ran
sudo /usr/sbin/update-bootscript
which wrote a newboot.scr
and rebooted.To verify, you can check
/proc/cmdline
and check for your new settings:cat /proc/cmdline apparmor=1 security=apparmor systemd.unified_cgroup_hierarchy=false root=/dev/nvme0n1p2 rootwait ro quiet earlycon=uart8250,mmio32,0xfe660000 pci=nomsi fsck.mode=force fsck.repair=yes mtdparts=sfc_nor:0x20000@0xe0000(env),0x200000@0x100000(uboot),0x100000@0x300000(splash),0xc00000@0x400000(firmware) console=tty1
I don't have an N2, but it looks like something similar should be possible.
...
I did some more testing and I'm not sure with the hardkernel images if we even need to worry about disabling v2 cgroups. If I run a
mount -l | grep cgroup
I see the following:tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755) cgroup2 on /sys/fs/cgroup/unified type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate) cgroup on /sys/fs/cgroup/systemd type cgroup (rw,nosuid,nodev,noexec,relatime,xattr,name=systemd) cgroup on /sys/fs/cgroup/blkio type cgroup (rw,nosuid,nodev,noexec,relatime,blkio) cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup (rw,nosuid,nodev,noexec,relatime,cpu,cpuacct) cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup (rw,nosuid,nodev,noexec,relatime,net_cls,net_prio) cgroup on /sys/fs/cgroup/freezer type cgroup (rw,nosuid,nodev,noexec,relatime,freezer) cgroup on /sys/fs/cgroup/memory type cgroup (rw,nosuid,nodev,noexec,relatime,memory) cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma) cgroup on /sys/fs/cgroup/devices type cgroup (rw,nosuid,nodev,noexec,relatime,devices) cgroup on /sys/fs/cgroup/cpuset type cgroup (rw,nosuid,nodev,noexec,relatime,cpuset) cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
The multple entries under
/sys/fs/
indicate to me that this isn't just using v2. If I run the same on a x86_64 machine on a newer kernel version, I will only see the/sys/fs/cgroup
with typecgroup2
.
this is not working. The operating system was installed using petitboot and the USB-OTG option.
When installed with petitboot /boot/cmdline.ini is the right place to put the parameters to.
This file will only exist, when installing HA-Supervised using the 3rd-Party Software Installers in the menu-config script of https://github.com/pyavitz/debian-image-builder installed image.
When just performing the OS-Image installation and installing the Supervised-HA manually th config.ini is missing.
For more information see above referenced issue of the debian-image-builder
I'm getting the same on a fresh install on RaspberryPi4-64:
[warn] Could not find /etc/default/grub or /boot/firmware/cmdline.txt failed to switch to cgroup v1
i have got this warning now (10minutes ago, last version ~3hours ago). tomorrow will try it again with a new clean system, will use both os debian11 and rapiOS. @mokkin where you getting your os image?
Debian 11 arm 64bits -> /boot/firmware/cmdline.txt RaspberryPi OS (debian11) arm 64bits lite -> /boot/cmdline.txt
depend on 32bits/arm64 will be a different location to store systemd.unified_cgroup_hierarchy=0
in end of line cmdline.txt file
thats what i noticed , hope help
lazy lines
sed -i 's/.*/& systemd.unified_cgroup_hierarchy=0/' /boot/firmware/cmdline.txt
I just added the following to the
/etc/default/flash-kernel
:LINUX_KERNEL_CMDLINE_DEFAULTS="apparmor=1 security=apparmor systemd.unified_cgroup_hierarchy=false"
Then following the docs again, I ran
sudo /usr/sbin/update-bootscript
which wrote a newboot.scr
and rebooted.
Thanks, I had the same issue on an N2+, and your hints got me back into cgroup v1.
There hasn't been any activity on this issue recently. Due to the high number of incoming GitHub notifications, we have to clean some of the old issues, as many of them have already been resolved with the latest updates. Please make sure to update to the latest version and check if that solves the issue. Let us know if that works for you by adding a comment 👍 This issue has now been marked as stale and will be closed if no further activity occurs. Thank you for your contributions.
I've had the similar issues with orange pi zero 3 Debian arch image. GRUB wasn't on the provided system, so i've installed it with
sudo apt-get install grub2-common
sudo nano /etc/default/grub
sudo touch /etc/default/grub
echo GRUB_CMDLINE_LINUX_DEFAULT="quiet splash apparmor=1 security=apparmor systemd.unified_cgroup_hierarchy=false" >> /etc/default/grub
cd /boot
mkdir grub
sudo update-grub
reboot
And then reinstall
dpkg -i homeassistant-supervised.deb
That seemed to have resolved the issue for me
Hope that would help to someone coming from SEO.
btw, home assistant container was refusing connections without active firewall on host
i've setup ufw with ufw allow 8123
this will happen everytime you run 'sudo apt upgrade' , /boot/firmware/cmdline.txt will change.. after change. make a backup. this was my workaround or just create a basic script add aliases to replace backedup file after sun upgrade cmd.
on next upgrade i wil try your method @vst-name
OS Version
Debian GNU/Linux 11 (bullseye)
System Information
Linux 7vhas 6.0.8 #1 SMP PREEMPT Mon Nov 14 16:12:47 CET 2022 aarch64 GNU/Linux
What happened?
The operating system image was prepared and successfully installed using a Debian Bullseye kernel which I build with: https://github.com/pyavitz/debian-image-builder
After the successfull installation - without error message the system started and I got the:
Unsupported system - CGroup version
message.
Rerunning as advised:
dpkg -i homeassistant-supervised.deb
Machine Type
odroid-n2
Installer output
Relevant log output
ADR
Code of Conduct