Curious Minds

Clear answers to science and history questions

Embedded Devices Out of Space for Updates: What Happens

· 7 min read · Science

When an embedded device runs out of space for updates, the update either fails outright — leaving the device stuck on its current firmware — or it succeeds only after the manufacturer strips out features, compresses data more aggressively, or ships a staged multi-part update. In the worst cases, a partially applied update on a full flash chip can leave the device unbootable, a failure mode known as bricking. What actually happens depends on the device's hardware layout, its bootloader design, and how the vendor manages the finite flash memory inside it.

Why Space Runs Out in the First Place

Embedded devices — routers, smart thermostats, industrial controllers, IP cameras, set-top boxes, medical monitors — are built with just enough non-volatile storage (usually NOR or NAND flash) to hold their firmware with a modest margin. Every extra megabyte costs money, and on a device manufactured by the millions, shaving a few cents per unit matters. So engineers size the flash to fit the current software, plus a reasonable allowance for growth.

The problem is that firmware tends to grow over a device's lifetime. Security patches, new protocol support, browser engine updates in the case of smart TVs, and accumulating bug fixes all add code. Meanwhile the hardware stays frozen. After several years of updates, a device that shipped with comfortable headroom can find itself nearly full.

  • A typical home router might ship with 16 or 32 MB of flash; ten years of feature additions can easily consume all of it.
  • Smart TVs and streaming boxes carry larger firmwares, sometimes hundreds of megabytes, and fill up faster.
  • Industrial and medical devices often have long service lives — decades — so firmware growth collides with hardware that was never meant to be replaced.

What a Failed Update Looks Like

When the update image does not fit, several things can happen depending on the design:

  1. The updater checks available space before writing and refuses cleanly, reporting an error such as "insufficient storage" and leaving the old firmware untouched. This is the best-case outcome.
  2. The updater starts writing anyway and fails partway through. If the device uses a dual-partition (A/B) scheme, the original firmware survives and the device simply boots the old version again. If it writes in place over the only firmware copy, the device can be left with a corrupted image and will not start — a brick.
  3. The device downloads the update but cannot store it, again reporting an error, often because the update needs temporary space (to verify a downloaded image's signature and checksum) in addition to the space for the final image.

A subtle point many people miss: an update often needs roughly twice the firmware's size in free flash. The new image must be written somewhere while the old one is still running, because the device needs a fallback if the new image turns out to be damaged or fails its first boot. This is why a device can fail to update even when the free space looks, at first glance, larger than the update file itself.

How Manufacturers Cope: A/B Partitions and Recovery Images

Modern designs reduce the risk of bricking with redundancy. In an A/B layout, flash holds two complete firmware slots. The device runs from one slot while an update writes into the other; only after the new image verifies successfully does the bootloader switch over. The cost is that each slot must be large enough for the firmware, so total flash usage roughly doubles — a luxury many small, cheap devices cannot afford.

Other devices keep a tiny, rarely changed recovery image in a protected partition. If the main firmware is corrupted, the bootloader falls back to the recovery image, which can re-download or restore the main firmware. Smartphones, some routers, and many set-top boxes use this approach. Devices without either mechanism — older or very cheap hardware — are far more fragile when updates go wrong.

Tricks Vendors Use to Squeeze Updates In

When the hardware cannot change, the software must. Manufacturers facing a full flash chip have several established options:

  • Delta updates: instead of shipping the whole firmware, the update contains only the differences from the installed version. Tools like bsdiff-style binary diffing can shrink an update dramatically, which saves both bandwidth and temporary storage.
  • Stripping features: vendors remove rarely used code — legacy protocols, alternate language packs, sample apps, debug tools — to make room. Users sometimes notice a feature quietly disappearing after an update; this is often why.
  • Streaming updates: the updater writes blocks to flash as they download rather than storing the full image first, reducing the temporary space required. This demands careful design, because a dropped connection mid-write must still leave the device recoverable.
  • Better compression: firmware images are stored compressed and unpacked to RAM at boot, squeezing more functionality into the same flash.
  • Squashing the filesystem: read-only, compressed filesystems (such as SquashFS, common on Linux-based routers) let the same code occupy less space, at the cost of more CPU work at runtime.
  • Staged updates: shipping an intermediate firmware that reorganizes partitions or removes old code, after which the real update can be applied. This is slower and riskier — two updates, two chances to fail — but sometimes the only path.

What Happens When Nothing More Can Be Done

Eventually a device reaches the point where no trick is enough. At that stage manufacturers typically declare end of support: the device stays on its final firmware version and stops receiving updates. This is not merely an inconvenience. If a serious security vulnerability is discovered later, there is no way to patch it. Unpatchable embedded devices on home networks — old routers, cameras, network-attached storage boxes — are a well-known security concern precisely because their owners cannot fix them even if they want to.

The practical consequences for the owner are worth stating plainly. A device that no longer receives updates should be treated as a growing liability: it may keep working perfectly for years, but any vulnerability found in its final firmware will remain open. Common mitigations include isolating the device from the internet, replacing it, or — where the vendor allows it — installing community-maintained open-source firmware such as OpenWrt on supported routers, which can continue support long after the original manufacturer has stopped.

Common Misconceptions

One widespread misconception is that clearing user data — deleting photos from a smart camera or resetting a smart TV to factory settings — will free up space for a firmware update. Usually it will not, because firmware lives in its own flash partitions, separate from user storage. Factory resets wipe settings and user files, not the firmware partition. Another misconception is that a failed update always means the device is broken. On any reasonably modern design, a failed update should leave the old firmware intact; permanent damage is a design failure, not an inevitability. Finally, people often assume manufacturers let devices fill up by accident. In reality the end-of-life decision is usually deliberate: supporting a decade-old product costs engineering time that is better spent on current models.

How Buyers Can Judge Update Headroom

Space limitations are largely invisible at purchase time, but a few signals help:

  • Look up the device's flash and RAM specifications if published; more flash generally means more years of update headroom.
  • Check the vendor's stated support commitment — some network equipment makers now publish explicit end-of-support dates.
  • Prefer devices from vendors with a track record of long update support, and with documented recovery procedures if an update fails.
  • For routers and similar hardware, community firmware availability is a strong hedge against premature end of support.

Frequently Asked Questions

Why does my device say "not enough space" even though the update file looks small?

The update usually needs temporary storage to download, verify, and hold the new image while the old one keeps running. Total free space required is often close to twice the firmware size, so an update can fail even when the file itself seems to fit comfortably.

Can a failed update brick my device permanently?

It can, on devices with a single firmware partition and no recovery mechanism. Devices with A/B partitions or a recovery image should always fall back to the working firmware, though nothing is absolutely guaranteed. Vendors generally design updates so that power loss or a failed write does not destroy the running firmware.

Will a factory reset free up space for updates?

Not typically. Firmware occupies its own flash partitions, separate from user data and settings. A reset clears configuration and personal content, but the firmware partition — the part that is full — stays exactly as it was.

Why do manufacturers stop updating old devices instead of just making the update smaller?

They can shrink updates with delta patches and compression, but only so far. Once the accumulated code simply cannot fit in the fixed flash, no packaging trick helps. Continuing support also costs engineering effort, so vendors formally end support and expect hardware replacement.

What should I do with a device that no longer gets updates?

Keep it off the public internet if possible, or replace it if it handles sensitive traffic. For some routers and similar hardware, community-maintained firmware such as OpenWrt can restore update support, provided the specific model is officially supported.

Can flash memory be upgraded to add space?

Sometimes, but rarely easily. On many devices the flash chips are soldered and the bootloader has hardcoded partition sizes and hardware expectations. Replacing flash requires soldering skill, matching chip compatibility, and a way to write the bootloader — a hobbyist project, not a practical option for most owners.

In this article
  1. Why Space Runs Out in the First Place
  2. What a Failed Update Looks Like
  3. How Manufacturers Cope: A/B Partitions and Recovery Images
  4. Tricks Vendors Use to Squeeze Updates In
  5. What Happens When Nothing More Can Be Done
  6. Common Misconceptions
  7. How Buyers Can Judge Update Headroom
  8. Frequently Asked Questions