cgroup : option or name mismatch, new: 0x0 “”, old: 0x4 “systemd”


遇到一个奇怪的问题,Arch可以重新启动,但是执行halt的时候报错“cgroup : option or name mismatch, new: 0x0 "", old: 0x4 "systemd"”,貌似官方暂时没有好的解决方法:

Okay, here's a rather long explanation of some of the things that happen during shutdown (simplified at some places, because some details don't help the understanding at all).SourceByrd's Weblog-

systemd activates, which conflicts with all services and mount points, essentially stopping everything that was started.SourceByrd's Weblog-

Activating starts a service that creates the executable /run/initramfs/shutdown, if it doesn't exist yet (more on that further down).SourceByrd's Weblog-

Upon reaching, systemd replaces itself with /usr/lib/systemd/systemd-shutdown.SourceByrd's Weblog-

systemd-shutdown tries kill all remaining processes, unmount all remaining file systems, detach all loop and device-mapper devices. It gives up at some point, since most of the time it will fail for a few mount points.SourceByrd's Weblog-

If /run/systemd/shutdown does not exist, systemd-shutdown proceeds to power off or reboot the machine.SourceByrd's Weblog-

systemd-shutdown changes the root to /run/initramfs, puts the old root to /oldroot and replaces itself with /shutdown.SourceByrd's Weblog-

In our case, /shutdown is a copy of /usr/lib/systemd/systemd-shutdown, which again tries to unmount everything and so on. Most of the time, it succeeds now (this means that the root file system is not only remounted read-only as it was classically done, but unmounted entirely. Any encryption mapping is also closed, which causes the kernel to wipe the encryption key from memory, to prevent a cold boot attack).SourceByrd's Weblog-

/shutdown then proceeds to power off or reboot.SourceByrd's Weblog-

So, how does the hardware watchdog come into play here? By default, systemd sets the watchdog timer to 10 minutes before it replaces itself with systemd-shutdown. Then it closes it, but does not stop it. When systemd-shutdown takes over, it opens the watchdog again. The same happens again when systemd-shutdown switches to /run/initramfs. This has a very useful result: If somehow the execution of the new binary fails, the hardware watchdog will time out after 10 minutes and reboot the computer - so your machine reboots instead of hanging indefinitely. The downside: You get a "watchdog did not stop" warning twice during shutdown.SourceByrd's Weblog-

As for the other error:SourceByrd's Weblog-

cgroup : option or name mismatch, new: 0x0 "", old: 0x4 "systemd"SourceByrd's Weblog-

This is a message from the kernel that is generated when a cgroup file system is remounted and options are changed that should not be changed. I cannot explain this entirely, but somehow this seems to happen while /oldroot/sys/fs/cgroup/systemd is being unmounted. In any case, it is of no special interest. SourceByrd's Weblog-

官方论坛地址:'s Weblog- SourceByrd's Weblog-

申明:除非注明Byrd's Blog内容均为原创,未经许可禁止转载!详情请阅读版权申明!
  • by Published on June 26, 2015
  • 原文链接:



:?: :razz: :sad: :evil: :!: :smile: :oops: :grin: :eek: :shock: :???: :cool: :lol: :mad: :twisted: :roll: :wink: :idea: :arrow: :neutral: :cry: :mrgreen: