3

I can't shutdown my ubuntu 14.04 anymore.

# shutdown -h now

Nothing happens at all

# halt -h
# halt:Unable to execute shutdown: exec format error

Shutting down from gui just messes up the lightdm. After restarting the lightdm everything is normal again.

Important sidenotes:

I have issues other than that (hostnames cannot be resolved ), which imo are all trigged by my new Samsung SSD 850 Evo and waking up from suspend. It mounted everything read -only and after a manual shutdown those problems Started .

But firstly I wanna solve the shutdown issue

thx in advance


update: after running

dpkg-reconfigure resolveconf

for a felt 1 mio times, dns resolving works again.

The file ../run/resolvconf/resolv.conf was missing, which again makes me think, some file might be missing for the shutdown command as well.


update 2: as pointed to in the comments, the init 0 and init 6 command works.

prumand
  • 61
  • 1
  • 6
  • Try "shutdown -P now " – Sudheer Aug 22 '15 at 07:50
  • @user1136340 please refer [here](http://askubuntu.com/questions/187071/how-do-i-restart-shutdown-from-a-terminal) – Ravan Aug 22 '15 at 07:53
  • Thx. I tried that too. Just nothing happens. – prumand Aug 22 '15 at 07:53
  • @Ravan same as with the halt command `poweroff: Unable to execute shutdown: Exec format error` – prumand Aug 22 '15 at 07:54
  • @user1136340 have you tried those four answers....in my previous comment .Ok,then try [this](http://askubuntu.com/questions/578144/why-doesnt-running-sudo-shutdown-now-shutdown) – Ravan Aug 22 '15 at 07:57
  • 1
    Why not use sudo poweroff ? –  Aug 22 '15 at 07:57
  • Ah nice. The `init 6` (and most likely the `init 0` commands work too). But I guess the shutdown command still would be better, mainly because of notifications. http://askubuntu.com/questions/578144/why-doesnt-running-sudo-shutdown-now-shutdown (oh no, markup troubles ;) ) @thebluesquirel that doesn't work – prumand Aug 22 '15 at 08:15
  • Just curious I've always used poweroff... Is poweroff used for something different? –  Aug 22 '15 at 23:42
  • [see this answer](http://askubuntu.com/questions/578144/why-doesnt-running-sudo-shutdown-now-shutdown), so i guess so. – prumand Aug 23 '15 at 06:15

1 Answers1

1

I couldn't find anything, so I guess the shutdown script was corrupted. To fix it I did the following

# which shutdown
/sbin/shutdown
#  dpkg-query -S /sbin/shutdown
upstart: /sbin/shutdown
# apt-get install --reinstall upstart

and now it works again.

I guess the next thing is to find out, why those files get corrupted. Thx for the help

prumand
  • 61
  • 1
  • 6