6

Instructions for enabling the memory cgroup on Ubuntu 18 and 19 involve adding cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1 to /boot/firmware/nobtcmd.txt and restarting. After rebooting, grep mem /proc/cgroups should show it as enabled.

I find that on Ubuntu 20.04 the above instructions are not working for me, and Kubernetes continues to error [ERROR SystemVerification]: missing cgroups: memory. Any suggestions?

Com
  • 141

2 Answers2

8

I was able to get this working by appending cgroup_enable=cpuset cgroup_enable=memory cgroup_memory=1 to the file /boot/firmware/cmdline.txt. Changes made to /boot/firmware/nobtcmd.txt in Ubuntu 20.04 appear to be ignored (there's a note in config.txt about cmdline=nobtcmd.txt being deprecated in favour of include commands).

Com
  • 141
6

On 22.04 (kernel 5.15.0) booting via Grub:

  • add cgroup_enable=memory cgroup_memory=1 to GRUB_CMDLINE_LINUX_DEFAULT in /etc/default/grub;
  • followed by sudo update-grub and kernel reboot.

Verify with cat /proc/cmdline.

ulidtko
  • 5,988