Creating a reliable operating systemPosted Jan 24 2016 by Florian Wesch
When running a digital signage installation it is important to make sure that your devices are as reliable as possible. Here's how info-beamer hosted solves this challenge.
The info-beamer hosted operating system is installed by simply unzipping a single zip file onto a normal FAT formatted SD card. Once the system boots for the first time it will download an additional 15MB system image. After that it will repartition the SD card into a 200MB boot partition and a data partition.
The data partition is treated as disposable. If the system detects a problem with it during startup it will be completely wiped and is then fully restored by redownloading everything required for displaying your content. The boot partition is read-only and hosts the compressed system image. During normal operation it is completely read-only and will only be touched when the system updates itself.
This makes the system resilient against problems like sudden loss of power: You never have to cleanly shutdown an info-beamer hosted device. It's always safe to just turn off the power. If the power loss resulted in a corrupted data parition it will be wiped and restored. If it results in corrupted files they will be caught by an automated checksum verification that runs after the next boot and will restore those files by redownloading them if required.
If there is a undetected error with the filesystem that results in runtime problems the system will automatically reboot and the problem will be fixed during startup.
Minimizing SD card writes
The info-beamer hosted operating system will also make sure to minimize the number of writes to the SD card in order to maximize its lifetime. The most obvious cause of writes are log files. info-beamer hosted minimizes those by only keeping logs in a fixed sized memory buffer of 1MB size. Old log lines are automatically discarded. If required, it is possible to send logs to a safe locations using the syslog protocol.
The data partition is mounted in a way the the default interval of five seconds between journal writes is increased to several minutes. In addition the kernel is instructed to lower the frequency of flushing dirty data to the SD card. This means the several minutes of changed data could be lost during a power outage. This is acceptable for info-beamer hosted as the system is capable of restoring everything lost by simply redownloading it.
Some files don't have to be persisted at all. This includes files like resolv.conf, which stores the name server configuration. The content of those files is fully restored during the next boot, so it's sufficient to only save it to a ram based filesystem.
Together this results in only the minimal number of writes required which greatly improves the life time of the SD card used.
If you run info-beamer hosted, make sure you use a proper SD card and you follow the info-beamer hosted best practices.
Self updating system
The boot file system is never written to during normal operation. The only moment it is modified is when the system updates itself. An update is always atomic: Once the update is complete, you know that the latest version is installed and there won't be any obsolete files remaining from a previous version. This is important for reliability as it guarantees that the exact same version of the system is running on all of your devices. This makes everything highly predictable.
The update process also minimizes the required bytes to transfer. So the system won't have to update the complete images each time. It will only download changed data. A normal system update is only around 1MB and only takes a couple of seconds to download.
The info-beamer hosted distribution uses several mechanisms to keep it running reliably. The Raspberry PI has a hardware watchdog. The info-beamer software that runs your visualization is expected to keep that watchdog happy by regularly sending it a byte to proof it's still alive. Failure to do that will result in a system reboot. If there is any hardware problem that might result in the visualization getting stuck it will be caught and the system will be reset.
If there is any problem with the data filesystem, like a loose SD card the system will automatically reboot and try to recover. Of course if the SD card isn't properly inserted into the SD card slot, info-beamer hosted can't do a lot about that.
Try info-beamer hosted
If you want to run a highly reliable digital signage installation on the Raspberry PI, have a look at info-beamer hosted and give it a free trial. If you need a custom visualization that is not available right now, don't hesitate to get in contact. I'm pretty sure info-beamer hosted can satisfy your digital signage requirements.
The next blog post provides more insights on how the web server part of info-beamer hosted works.
Recent blog postsinfo-beamer hosted 13 released
info-beamer hosted 12 released
info-beamer hosted 11 released
info-beamer pi 1.0.0 released
More blog posts...
info-beamer.com offers the most advanced digital signage platform for the Raspberry Pi. Fully hosted, programmable and easy to use. Learn more...
Get started for free!
Trying out the best digital signage solution for the Raspberry Pi is totally free: Use one device and 1GB of storage completely free of charge. No credit card required.
Follow @infobeamer on twitter to get notified of new blog posts and other related info-beamer news. It's very low traffic so just give it a try.
You can also subscribe to the RSS feed.
Share this post:
Questions or comments?
Get in contact!