0

I would like to put a Linux computer in my car, but one challenge is that normally when the ignition is turned off, power is cut. This is bad for Linux which wants to go through a shutdown process before turning off. Is there any way to configure Linux to tolerate power being cut abruptly?

One relevant technology I know of is Android's special "Power Manager" extension that is used on a lot of PDAs. I think the basic way this works is that the Android has two power feeds: a main feed, and a lower power "sleep" feed. If the "off" button is pressed, then the system gets forced into sleep mode and the main power is turned off and the computer gets a small trickle of power, just enough to maintain it in sleep mode. This sort of thing is kind of what I would need for the car. Is there any way to achieve it with normal Linux?

  • 1
    What do you want to use the computer for? If it doesn’t need to persist anything, you could run it with read-only storage, writing anything it needs to write to RAM instead; then it wouldn’t care about sudden power-offs. If it’s a small single-board computer, you can usually add a battery to provide power during shutdown. – Stephen Kitt Aug 30 '18 at 14:52
  • Most of the distributions are powercut tolerant ready now. – Ipor Sircer Aug 30 '18 at 15:12
  • @StephenKitt All I know is that if I cut power to a Linux system, I get all kinds of scary messages in my logs. Also, I have heard people say that their Linux system got bricked by power outages. – Tyler Durden Aug 30 '18 at 15:16
  • @Tyler I’m not asking what you know ;-) but what you intend to use the computer for. – Stephen Kitt Aug 30 '18 at 15:28
  • Have a battery attached with enough charge to run the computer through shutdown/suspend-to-disk and have it automagically trigger that when the power from the vehicle is cut off. – Mioriin Aug 30 '18 at 17:19

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.