TP-Link TL-WR902AC v1 - low disk space

Hello! First question here… :slight_smile:

I’ve installed OpenWrt on a TL-WR902AC v1 and it works well by default.

With the 24.10.4, a df -h gives me the following:

root@flea:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 4.3M      4.3M         0 100% /rom
tmpfs                    27.5M      1.2M     26.2M   4% /tmp
/dev/mtdblock4          512.0K    228.0K    284.0K  45% /overlay
overlayfs:/overlay      512.0K    228.0K    284.0K  45% /
tmpfs                   512.0K         0    512.0K   0% /dev

I wanted to update the software but Disk Space only shows 512 KiB in Luci. That means I can not even update LuCi as the router quickly runs out of space.

I’m surprised since the router has a 8MB Flash. Why this 512 KiB limit?

I’ve checked extroot but there is not way to install the required software.

Do you know of any way to tweak something and be able to update existing packages or install new ones?

Thanks!

How big was the OpenWRT image and where do you think it's stored ?

You should never update packages.


Upgrading packages (via the CLI opkg upgrade command or the LuCI Upgrade... button) can result in major problems. It is generally highly discouraged, unless you know what you are doing or if there is specific instruction to do so.

Btw, https://openwrt.org/supported_devices/864_warning.

1 Like

The file is 6.7 M.
What do you mean by “where do you think it's stored”?

The image is 6.7MB, then there are some additional "mandatory" partitions on the flash (cat /proc/mtd).
Where is the flash space you're missing supposed to come from ?

You can use owut xor luci-app-attendedsysupgrade to compose packages into squashfs root.

Nah… The system is full. :slight_smile:

Would you know if there is a way to boot from with the USB on this router?

most likely not.

but you can create an image without Luci ( = the webUI) add the packages you need for extroot, then install Luci once extroot's up.

2 Likes

I have one of these devices and I use extroot in order to fit the packages I need. My recipe is to create a custom image that omits LuCI and adds block-mount kmod-usb-storage kmod-fs-ext4. This image gets flashed to the router, I use ssh to connect to the router and run the extroot process. After the router reboots with extroot active, I install LuCI and the other packages that I need.

This works out as the following package list (which can be built on the firmware selector):

base-files ca-bundle dnsmasq dropbear firewall4 fstools kmod-ath9k kmod-gpio-button-hotplug kmod-nft-offload libc libgcc libustream-mbedtls logd mtd netifd nftables odhcp6c odhcpd-ipv6only opkg ppp ppp-mod-pppoe procd-ujail swconfig uboot-envtools uci uclient-fetch urandom-seed urngd wpad-basic-mbedtls kmod-usb2 kmod-usb-ledtrig-usbport kmod-ath10k-ct-smallbuffers ath10k-firmware-qca9887-ct -swconfig -uboot-envtools block-mount kmod-usb-storage kmod-fs-ext4

Depends on use case, i got one 8mb without firewall and ppp drivers and it takes 3mb rootfs for an extender and vlans

Good point... it does depend on how the device will be used. But 8MB is tight for many situations, of course.

Just for background, the device has 8MB flash, but that is shared by various uses. The boot loader needs to live somewhere, the kernel itself needs a chunk, there's usually a bunch of tables with WiFi calibration data for the radios and on and on...

Look at the mtd tables and you can get a feel for how it's all apportioned (this from an Archer C7, since I don't have a TL-WR902, but you get the idea).

$ cat /proc/mtd
dev:    size   erasesize  name
mtd0: 00020000 00010000 "factory-uboot"
mtd1: 00020000 00010000 "u-boot"
mtd2: 00ec0000 00010000 "firmware"
mtd3: 0029b322 00010000 "kernel"
mtd4: 00c24cde 00010000 "rootfs"
mtd5: 00420000 00010000 "rootfs_data"
mtd6: 000f0000 00010000 "info"
mtd7: 00010000 00010000 "art"
1 Like

Thank you very much; your answer helped a great deal.

For documentation purpose, I went through these steps:

  1. Format USB key with an ext4 filesystem and a gpt label with my computer (since parted does not fit in the image).
  2. Build the image based on your list.
  3. Plug USB in the router, the router to computer via ethernet, and boot the router.
  4. Flash the image (with TFTP in my case).
  5. Follow steps for extroot.
  6. Find a way to connect to the network, which was a wifi in my case.
  7. Update packages with opkg update.
  8. Install LuCi with opkg install luci.

I now have a running router with extroot. Thanks again!

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.