I'm running a debian-wheezy based distro on an a set of armv5 boards. If I run the "reboot" command (either via ssh or serial console), it works fine most of the time. Occasionally (approximately every 50 or so reboots, but not consistently), the system hangs on the shutdown part of the reboot. When it hangs, the network is still enabled and the firewall is still running (because it still forwards packets). But sshd is not running, nor my own software.
During a normal reboot, I see this printed to the console:
... [ ok ] Unmounting temporary filessytems...done. [ ok ] Deactivating swap...done. [info] Will now restart. >> TS-BOOTROM - built Jul 8 2013 15:44:26 >> Copyright (c) 2012, Technologic Systems . . Uncompressing Linux... done, booting the kernel. ...
When it fails, I see:
... [ ok ] Unmounting temporary filessytems...done. [ ok ] Deactivating swap...done. kexec: No such file or directory reboot: No such file or directory /etc/init.d/rc: 279: /etc/init.d/rc: /bin/echo: not found /etc/init.d/rc: 364: /etc/init.d/rc: /bin/echo: not found INIT: cannot execute "/sbin/sulogin" ... (repeats ten times) INIT: Id "z6" respawning too fast: disabled for 5 minutes
I tried lookingin /etc/init.d/rc for the lines shown above (279, 364), but the file only has 256 lines. So that's weird...
It seems to me that a script is trying to run after the file system has been unmounted, but only occasionally. Most of the time it's fine. Now, when I look in /etc/rc6.d, I see K07umountfs, K08umountroot, K09kexec, and K10reboot. So it seems kexec and reboot are supposed to run after file system unmounting (and it works ~99% of the time).
I'm kind of stuck now. I would appreciate any help, even if it just points me in the right direction.