3

This is a very general question. Let's say that some unwanted process randomly sends the shutdown signal and thus turns my server down. I don't manage to find the offending program, but I badly need to keep my server alive. Therefore my question:

How can I completely disable the ability of shutting down the system except manually and being superuser?. I want that eventually the only way to shut down my computer is by manually opening a console and typing some specific thing as superuser (eg. sudo shutdown 0). I just want my system to ignore all shutdown signals other than that.

There seems to be a problem with Kubuntu 12.04 in both my two (very different) laptops, which is very strange, taking into account that everything went fine with the 10.04 version. My both laptops, that have nothing to do with each other (a 32 bits Centrino Duo running the 32 bits version, and a 64 bits CORE i3 running the amd64 version of Kubuntu) simply FREEZE, after a random number of hours (ranging from a couple of hours to one or two days), even when I have the power management module not loaded in the default session and even when I don't run anything but the desktop. When I hit Ctrl+Alt+F1, sometimes I can see the computer has tried to shutdown (but incompletely) but other times it is completely unresponsive.

Now I desperately need one of them running 24h a day, and I want to try to DISABLE the ability of Kubuntu to shut down my computer, even if the goddamn motherboard is in flames. I don't mind. Whatever is giving the shutdown signal, I want the system to ignore that signal unless I explicitly give it by console and only as superuser, even at the cost of data loss or hardware damage, by disabling the ability of "understanding" a shutdown signal from any program.


I am not the only one with this problem: I have found this user here who says (s)he has to "reboot ubuntu 5x a week" (with the version 12.04 too)

5
  • 1
    Are your laptops heating up? You really should find out why the system is shutting down. Your question attempts to treat the symptoms and not the illness. Never a good idea.
    – terdon
    Jul 15, 2013 at 13:19
  • I'm certain that this is either hardware malfunctioning (freezes are most likely bad RAM) and/or the BIOS telling the system to shutdown because it's overheating (via an ACPI event). That last can be easily disabled...but you rather should ask why it is overheating and if you can prevent that. "...but I badly need to keep my server alive. ... ...even if the goddamn motherboard is in flames. I don't mind." You have an interesting mix of priorities there. Not shutting down because of overheating can result in the death of internal components, including the harddisk and all your data.
    – Bobby
    Jul 15, 2013 at 14:16
  • Well, I say that of the "damn motherboard in flames" and so on, because I am certain that it is not a hardware malfunction: it happens in two very different laptops (see text in the question), one of them pretty new. Additionally, I have monitored the CPU temperature and it never rises much. This is probably not a hardware malfunction, how could it happen simultaneously in two such different laptops?
    – Mephisto
    Jul 15, 2013 at 18:51
  • Do you have this same issue with ubuntu-server installed? Jul 22, 2013 at 18:16

1 Answer 1

1

Just a thought. Rename your reboot/halt commands.

cd /sbin
mv halt halt.manual
mv poweroff poweroff.manual
mv shutdown shutdown.manual
mv reboot reboot.manual

This will not prevent sleep or hibernate signals, but it might take you a long way of disabling shutdowns.

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .