During boot the system hangs, and the last message while it hangs is: Starting system logger: Can't open or create /var/run/syslogd.pid. Can't write pid.
After a while I discovered that /etc/init/rc.sysinit was corrupted - the first line was:
#!/bin/bsh instead of:
#!/bin/bash Why that mistake resulted this result? Why specifically this error?
rc.sysinitperforms a variety of system initialization tasks. With a typo in the#!line, it wouldn't execute. Take a look at the script, and you'll probably find that something in it is responsible for setting up/var/run. For a better answer you would have to provide more information: for example, what distribution (and version) are you running?