Mender blog

Raspbian update breaks devices

A couple of days ago there was an incident involving Raspberry Pi devices running Raspbian. During a period of time devices could brick if you perform an ‘apt-get update && apt-get upgrade’. In this case they would brick by losing most of their functionality and if restarted they would not boot anymore.

The problem, in this case, was that a misconfigured package was uploaded (raspi-copies-and-fills) to the official repositories and if updated it would lead to a broken system. The change in the upstream repositories was quickly reverted when people started reporting problems but it existed long enough to significantly affect users.

The impact for people with physical access to their devices was not as severe as there is a quick fix which involves removing the SD card from your device, plug it into your PC and removing the ‘etc/ld.so.preload’ file.

For people who manage distributed Raspberry Pi devices with only remote access, there is no quick fix and the common catchall SSH does not work either as you were not able to launch new applications which is required as the sshd daemon is started on-demand. One needs to travel to each device to manually recovery it either by using the workaround presented or re-writing SD cards.

You can read more about the incident at the following links (blog posts and Raspberry Pi forums):

This incident clearly highlights the drawbacks of using a standard Linux package manager for deploying software Over-the-Air to distributed devices. It is not possible to automatically roll back in case there are problems and there is also no way to validate or sanity check the packages before installing them on your active system.

Ensuring a robust update process that never leaves devices bricked has always been one of the main goals of Mender, which utilizes a dual A/B system layout.

During the update process, the Mender client writes the updated image to the rootfs partition that is not running and configures the bootloader to boot from the updated rootfs partition. The device is then rebooted. If booting the updated partition fails, the partition that was running is booted instead, ensuring that the device does not get bricked. If the boot succeeds, Mender sets the updated partition to boot permanently when Mender starts as part of the boot process.

Persistent data can be stored in the data partition, which is left unchanged during the update process.

You can read more about how Mender works here or by visiting our documentation

We do also support Raspbian and you can follow this tutorial to get started.

Recent articles

Enhancing sustainability in oil & gas: tackling methane emissions with cutting edge solutions

Enhancing sustainability in oil & gas: tackling methane emissions with cutting edge solutions

Discover how Kuva Systems overcame challenges in managing methane emission monitoring cameras in the oil & gas industry with advanced OTA updates and remote troubleshooting.
CVE-2024-37019 - Account takeover using SAML

CVE-2024-37019 - Account takeover using SAML

CVE-2024-37019 is an account-takeover vulnerability in Mender Enterprise which was fixed in versions 3.6.4 and 3.7.4.
The top challenge for autonomous vehicles: What does adding AI to cars mean for OEMs?

The top challenge for autonomous vehicles: What does adding AI to cars mean for OEMs?

The critical question for the automotive industry is: how can you shorten the time to market and innovate faster in software and AVs to meet more demanding customer requirements?
View more articles

Learn more about Mender

Explore our Resource Center to discover more about how Mender empowers both you and your customers with secure and reliable over-the-air updates for IoT devices.

 
sales-pipeline_295756365