Getting prepared for daily power cuts.

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
eddie3000
Level 3
Level 3
Posts: 136
Joined: Mon Jun 24, 2013 2:11 pm

Getting prepared for daily power cuts.

Post by eddie3000 »

Ok! I'm here for a bit of other people's wisdom which I obviously lack.

Here's my story: I'm preparing a small pc we had lying around at work for an exhibition my company is going to have in a month's time. It's job is very simple: turn on when the janitor turns the power on every morning, boot up and start playing a very long slideshow of images and videos all day long for visitors to watch as they pass by. When the end of the day arrives, the janitor just shuts the power off until the following day. The exhibition is going to last two or three months. At the moment I have the computer working fine and it does exactly what I wanted it to.

One thing that worries me would be the computer not booting or working due to data corruption when the janitor shuts off the power. Even though the computer is supposed to only be reading files all the time, it does write stuff to disk like access times and other stuff I know nothing about. Maybe editing the fstab including noatime or nodiratime (or any other option) might help. But I still don't know if their is more that can be done to ensure the system's reliability under such circumstances.

I have deleted all icons and panels from the desktop, but I was wondering how to stop the automatically logged in user from being capable of doing anything else. The computer is not going to have a keyboard or mouse, and is also going to be out of sight, but just to avoid anyone's temptation to plugging in their own HIDs, it would be nice to disable everything except for the program used to play the videos (vlc).

Any suggestions and ideas for my scenario are very welcome. Thank you.

P.D. :Just an extra bit of info: I am using Debian 9 XFCE on this computer because the linux mint installers kept failing with the very popular error "The 'grub-efi-amd64-signed package' failed to install into /target/". I once got around this error a few months ago on a laptop of mine, but I didn't want to waste any time. If debian installs flawlessly without any fuss, why can't linux mint?
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
richyrich

Re: Getting prepared for daily power cuts.

Post by richyrich »

Just a thought . .

A small UPS power supply will allow the computer to shut down normally when the AC power has been cut. and the UPS will re-charge when the AC power is turned back on.
MissileCop
Level 2
Level 2
Posts: 63
Joined: Thu Jul 17, 2008 12:21 pm

Re: Getting prepared for daily power cuts.

Post by MissileCop »

Set up a cron job that issues a shutdown command at a certain time at the end of the day, before he shuts off the power to the exhibit for the day. This offers a clean shutdown, and all someone else has to do is power on the computer in the morning.
Last edited by MissileCop on Wed Aug 01, 2018 10:46 am, edited 1 time in total.
eddie3000
Level 3
Level 3
Posts: 136
Joined: Mon Jun 24, 2013 2:11 pm

Re: Getting prepared for daily power cuts.

Post by eddie3000 »

Thanks guys for the answers. A UPS is not possible as we don't have one, and no money is going to be put forward for it. Now the cron job is a neat thing as it will reduce the amount of hard shutdowns considerably. I'll ask to see what the exhibition's opening and closing time is (I can also program a startup time in the bios). But it all depends on the janitor's punctuality.

Can any configurations be done to the OS to increase reliability in such situations?
eddie3000
Level 3
Level 3
Posts: 136
Joined: Mon Jun 24, 2013 2:11 pm

Re: Getting prepared for daily power cuts.

Post by eddie3000 »

Bumpity bump!

I was wondering if anybody else can come up with what to do to the computer to make it more resistant to hard shutdowns. I'm sure things can be done to the fstab file, maybe a ramdisk ( but this computer only has 8gb), dunnow... Maybe disabling unnecessary services as well, or making the entire disk read only (is that even possible?).

Any ideas are welcome, as well as how each one might be done. Thanks again
FreedomTruth
Level 4
Level 4
Posts: 443
Joined: Fri Sep 23, 2016 10:19 am

Re: Getting prepared for daily power cuts.

Post by FreedomTruth »

eddie3000 wrote: Thu Aug 02, 2018 2:56 pm I'm sure things can be done to the fstab file
(No idea what your fstab looks like now) In the 4th field (options), try something like:

Code: Select all

UUID=abcdefed-cbab-cdef-edcb-abcdefedcbab /               ext4    ro,dev,exec,auto,async,suid,nouser 0       1
UUID=01234567-8987-6543-2101-234567898765 /home           ext4    ro,dev,exec,auto,async,suid,nouser 0       2
These options are identical to "defaults", with the exception of making it ro (read-only) instead of rw (read-write)
Note you'll have a hard time performing updates, configuration changes, etc...
User avatar
all41
Level 19
Level 19
Posts: 9523
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Getting prepared for daily power cuts.

Post by all41 »

The best option is offered by richyrich.
These devices can be purchased for 40 to 50 USD.
This sounds like an important event for both you and your company.
UPS is not possible as we don't have one, and no money is going to be put forward for it
Weigh the cost of proper protection against the cost of damaged hardware and embarassing down time if the system fails to recover.
Everything in life was difficult before it became easy.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Getting prepared for daily power cuts.

Post by catweazel »

eddie3000 wrote: Wed Aug 01, 2018 9:28 am When the end of the day arrives, the janitor just shuts the power off until the following day.
You could always determine the absolute earliest time that the power will go off and set a cron job to shut the machine down, say 30 minutes before that time arrives.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
User avatar
all41
Level 19
Level 19
Posts: 9523
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Getting prepared for daily power cuts.

Post by all41 »

absolute earliest time that the power will go off
Depends on the janitor which op does not have confidence.
And what happens afer a temporary power disruption during the event?
Everything in life was difficult before it became easy.
User avatar
catweazel
Level 19
Level 19
Posts: 9763
Joined: Fri Oct 12, 2012 9:44 pm
Location: Australian Antarctic Territory

Re: Getting prepared for daily power cuts.

Post by catweazel »

all41 wrote: Fri Aug 03, 2018 11:15 pm
absolute earliest time that the power will go off
Depends on the janitor which op does not have confidence.
It would more likely depend on the venue's contract with the exhibition holder, or at least on venue management.
all41 wrote:And what happens afer a temporary power disruption during the event?
I think that's a red herring. We are all subject to temporary power disruption at all times.
"There is, ultimately, only one truth -- cogito, ergo sum -- everything else is an assumption." - Me, my swansong.
User avatar
all41
Level 19
Level 19
Posts: 9523
Joined: Tue Dec 31, 2013 9:12 am
Location: Computer, Car, Cage

Re: Getting prepared for daily power cuts.

Post by all41 »

We are all subject to temporary power disruption at all times.
My point exactly, and perhaps an increased risk at such a presentation.
But if I were to be responsible for such an event I would choose to reduce the odds.
Everything in life was difficult before it became easy.
carum carvi

Re: Getting prepared for daily power cuts.

Post by carum carvi »

Due to a mechanical button problem on my pc I have gotten used to hard power offs for years, because my fysical power button gets stuck when I use it. Therefore for years with Windows and now for a full year with LInux I have been using a hard power off for my pc by fysically disconnecting the powersupply. No problems whatsoever with Linux. Windows usually gave me a standard warning message that the powering off had gone wrong, but Linux works just as well with a hard power off as with the regular poweroff in the menu.

Since the poster hasnt got the money for a new battery supply I would advice just to use the hardpower off by the janitor. Linux works just fine. The poster hasnt got any valuable software on the pc, so there is nothing to lose. If something would get corrupted he could just do a new install. Takes an hour at most. Easy peasy...
eddie3000
Level 3
Level 3
Posts: 136
Joined: Mon Jun 24, 2013 2:11 pm

Re: Getting prepared for daily power cuts.

Post by eddie3000 »

Hello again.

After a long time after the event, just wanted to say that the computer worked 100% perfect for about a month with hard shutdowns. No problems whatsoever. I guess I have been lucky. The computer didn't have to do anything fancy, just playback a bunch of photos, videos and audio files in a scripted manner using cron.

Just for your information.

Cheers.
Locked

Return to “Installation & Boot”