On Thu, 2021-04-22 at 17:51 +0300, David Gherghita via blfs-support wrote: > Hello, > > When trying to start the UPower service, either automatically at boot, > or manually via systemctl, I get the errors: > upower.service: Failed to set up user namespacing: Invalid argument > upower.service: Failed at step USER spawning /usr/lib/upower/upowerd: > Invalid argument > > After googling the errors, I found that the errors are caused by not > activating CONFIG_USER_NS in the kernel. However, this is not the case > for me as I added both CONFIG_NAMESPACES and CONFIG_USER_NS in the > kernel before building UPower. > > I tried rebuilding UPower, rebuilding systemd and adding MEMCG to the > kernel, as suggested in the CONFIG_USER_NS help page, but none worked. > > A fix that I found is commenting the following lines from the > /lib/systemd/system/upower.service file. > # Namespaces > PrivateUsers=yes > RestrictNamespaces=yes > > Can you, please, help me fix the problem or is the fix that I found > alright, meaning I won't have problems later because of the > modification?
It's a workaround, but I don't think it's a proper fix. My guess is you did something wrong installing the kernel built with new configuration. For example, somehow copied an old vmlinuz, or forgot to update /boot/grub/grub.cfg to boot a new kernel image. Or maybe, just forgot to reboot after the copying the new kernel image into /boot (I've done this before!). Try `unshare -r` to make sure your user namespacing is working. It will open a shell "looks like you are root" (but the priviledged operations will still fail with EPERM). If `unshare -r` fails, it means your kernel still doesn't support user ns. Otherwise, report the issue as a bug to systemd maintainer. -- Xi Ruoyao <[email protected]> School of Aerospace Science and Technology, Xidian University -- http://lists.linuxfromscratch.org/listinfo/blfs-support FAQ: http://www.linuxfromscratch.org/blfs/faq.html Unsubscribe: See the above information page
