3
1
What is the best way to harden a linux system to power cycling? I often came upon systems used in shops, public, exhibitions, by several people where no one is responsible for. Usually those systems are shut down by loosing power if the main switch is turned off every evening or so.
With Linux, some annyoing problems arise:
- GRUB shows a boot menu after power fail on most distributions. I was able to circumvent that by
GRUB_RECORDFAIL_TIMEOUT=0
at /etc/default/grub. However I still wonder how long this setting is kept if packages get updated etc. - File system checks run after boot, sometimes failing or asking questions. While the checks can be disabled by
/etc/fstab
, this sometimes forces a read only mount of root, which leads to several problems as most applications, including vanilla X setups, are not aware running on read only filesystems. So I kept the check, but this slows down every boot by some minutes, depending on disk size and usage. Also I am not sure if the check guarantees a read write mount. So I replaceerrrors=remount-ro
byerrors=continue
too, just by guess.
Is there any best practice to achieve maximum reliability? What are your thoughts?
2A rock solid solution for presentation applications would be having the harddisk mounted read only, and use OverlayFS or something else to get a read write capable root fs, that only writes to a temporary ram fs. However it seems quite complex to turn a ordinary distribution into such a setup. – dronus – 2013-02-16T14:56:37.013
A tailored LiveCD might be a solution... or perhaps even better a USB pendrive that can be switched read-only. – vonbrand – 2013-02-16T17:26:15.253
The LiveCD was a good hint.. actually it seems a readonly partition overlayed with a writable tempfs would do the job for 'kiosk'-only uses. The harddisk would be mounted readonly this way, suffering no effects from powering off. So the fs should stay clean and reboot like usual every time. Will try this out. – dronus – 2013-02-16T21:35:54.677