Embedded Linux won't reboot, how to force it and repair the file system
When a Raspberry Pi or Yocto based device will not reboot and prints "Failed to open /dev/initctl", systemctl cannot reach systemd anymore. You can still force the reboot with systemctl reboot --force, or --force twice as a last resort, but the second one skips unmounting and often leaves a damaged file system. This post shows how to force the reboot, how to make sure the file system gets checked on the next boot with fsck.mode=force, and how to cut SD card writes so it does not happen again. I have a lot of embedded systems running in my product testing lab or at home, all of them either as Raspberries or self-made PCB with Yocto. Sometimes I can't reboot some systems, I think its the journald which causes some issues with SD cards, the error message usually is: Failed to open /dev/initctl Anyhow, if you have this issue - a reboot can be force-forced: systemctl --force --force reboot Since a forced reboot does not sync the journal, the system typically comes up with ...