Skip to content
Contents
GuidesOpenWrt

Why a NAND router can run SquashFS but still require UBI

Reconstruct the flash layout using MTD, UBI volumes, and root mount records to determine which component handles bad block management, and halt operations when information is missing.

On the router, if /rom is SquashFS, it only indicates that the kernel has loaded a read-only file system. In between, there might still be a UBI layer that maps physical erase blocks with bad blocks to logically usable volumes for upper layers. Isolating the SquashFS file alone does not provide the same bad block management or boot layout.

First, align the partitions, volumes, and mount points.

Execute read-only queries via wired SSH. Use the last line if the system is equipped with ubinfo.

cat /proc/mtd
cat /proc/mounts
ls /sys/class/ubi
command -v ubinfo && ubinfo -a

The size and erasesize fields in the MTD list represent partition boundaries and erase granularities, respectively. Once the UBI device and volumes are visible, check the mount records for ubiblock, ubifs, or the corresponding root device. Read-only volumes can host SquashFS, while writable data may be stored separately. UBI handles bad block and wear-leveling; UBIFS and SquashFS are distinct file systems.

If the system does not list UBI?

First, verify whether the system is currently booting from RAM temporarily and whether the kernel has mounted the corresponding partition. Then check the official device definition and upgrade format for this board. The absence of ubi0 alone is insufficient to infer bare-write safety. A successful inventory must document: "which flash partition, which layer handles bad blocks, and from which device the kernel mounts the root filesystem." If any one of these is unclear, retain the current firmware and the local backup, and return to the installation documentation for this revision. Reading these states does not require a restart or partition modification.

Reference

Related guide · OpenWrt x86 combined images: choosing ext4 or SquashFS for recovery

Explore hardware

Comments