I used the following on a silverblue 32 beta (20200424): (twice)
[ mike@localhost ~]$ rpm-ostree kargs --append=systemd.unified_cgroup_hierachy=0
Checking out tree 0750349... done
Resolving dependencies... done
Checking out packages... done
Running pre scripts... done
Running post scripts... done
Running posttrans scripts... done
Writing rpmdb... done
Writing OSTree commit... done
Staging deployment... done
Freed: 44.4 MB (pkgcache branches: 0)
Kernel arguments updated.
Run "systemctl reboot" to start a reboot
[mike@localhost ~]$ rpm-ostree kargs
resume=/dev/mapper/fedora-swap rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb quiet root=/dev/mapper/fedora-root ostree=/ostree/boot.1/fedora/ab7bfac27a7cb9333c9fb1b234887f359ff0b5fb8fe357178a73e3bcf25e0ed3/0 systemd.unified_cgroup_hierachy=0
[mike@localhost ~]$ systemctl reboot
..... reboot here
mike@localhost ~]$ rpm-ostree kargs
resume=/dev/mapper/fedora-swap rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb quiet root=/dev/mapper/fedora-root ostree=/ostree/boot.1/fedora/ab7bfac27a7cb9333c9fb1b234887f359ff0b5fb8fe357178a73e3bcf25e0ed3/0
[mike@localhost ~]$
to turn off cgroups-v2 so I could run moby. However, after I reboot, the kernel argument is not there and the system is still running cgroups-v2. I have added exactly the same kernel argument to a fedora32 server installation, and it works fine. Journalctl shows no sign of a failed boot for a bad kernel argument.
So why has the kernel argument disappeared?
BTW, manually adding the kernel argument by editing the kernel boot line works. It still doesn’t show up in the rpm-ostree kargs output, though.
After the reboot, does rpm-ostree status show a message about failing to finalize the previous deployment? You can also check with journalctl -b -1 -u ostree-finalize-staged.service.
Does that explain why the reboot sat there for a long time after the shutdown before actually rebooting? So how would I go about determining exactly why it failed? Where is grub2-mkconfig going for it’s source since that doesn’t seem to be in /etc/default/grub?
I realized that /etc/default/grub is there after all. Strangely, after trying the last kernel args for nested vms, and rebooting, I decided to check grub2-mkconfig:
[mike@localhost ~]$ sudo grub2-mkconfig
[sudo] password for mike:
/etc/default/grub: line 6: systemd.unified_cgroup_hierarchy=0: command not found
[mike@localhost ~]$ sudo cat /etc/default/grub
GRUB_TIMEOUT=5
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="resume=/dev/mapper/fedora-swap rd.lvm.lv=fedora/root rd.lvm.lv=fedora/swap rhgb quiet" systemd.unified_cgroup_hierarchy=0
GRUB_DISABLE_RECOVERY="true"
GRUB_ENABLE_BLSCFG=true
Clearly, this seems to be a bug. Somewhere I read that in Silverblue, we shouldn’t use the /etc/default/grub method to add kernel arguments, that rpm-ostree kargs was the only right way to do it. I suppose that’s because rpm-ostree does a commit. Could this be done manually?