No space left on device

I have just upgraded a TP-LINK TL-WDR4300 to the latest version of OpenWrt and have managed to fill up most of the available space.

How do I identify programs/drivers that I can do without?

I tried installing Midnight Commander but ran out of space, after most of the components had been installed. Is there any way the delete all the associated programs.

I'm trying to install the drivers required for USB tethering which are mentioned here:-

but am unable to do so because of lack of space.

this device only has 8MB flash memory. If you're running out of space, you may need to look at doing an extroot (using a USB thumb drive in one of your USB ports) to give you more working space.

5 Likes

See also

5 Likes

The best way to recover is to run firstboot (or GUI reset to defaults) or flash again, and start over. Trying to selectively delete stuff tends to leave a lot of residual files.

Adding support for smartphone tether is only a few kmods that will not take much space.

5 Likes

building on another aspect of deleting stuff...

Don't try to delete the packages that are built into the image you flashed. That will, counterintuitively, actually consume space and it will not free anything up. If you want to remove packages that you won't be using, build a custom image to save space in the actual image (and you can also include the things you would otherwise need to install).

6 Likes

I don't think this applies to the OP with ath79 21.02.1, but if you're running snapshot builds, the attended-sysupgrade will automatically squash up a new ROM with your desired package configuration, including removing standard built-in packages that you don't want. Add or remove packages, then request an upgrade and they will all be put in the ROM instead of the overlay.

4 Likes

If I flash again will all the packages I've installed disappear?

I'll try anyway - nothing to lose...

Yes that is the point, so you can be more selective which ones to install considering the limited space.

2 Likes

Should I use 'df' to see how much space I have? And how do I tell how much space 'mc' uses? Some distributions do an mc-light. Is this available for OpenWrt?

What happens if you just do it instead of asking?

df -h tells me I have
2.5M available on overlayfs:/overlay
and
60.2M on tmpfs

but I don't how to find the size of the mc package.

See https://openwrt.org/packages/pkgdata/mc

1 Like

Except that .opkg files are compressed archives, which will expand to a larger amount of files, then the jffs2 system compresses the data with a different method while storing it in flash-- so the amount of flash occupied by a package can't be readily predicted.

Note that one of mc dependencies is glib2, which is 1.1 MB compressed.

The safest way to do this is use Image Builder to build in what you want then check the size of the resulting image (this also re-compresses the packages into a squashfs using lzma, which is highly space-efficient). You need to leave at least 500 kB of flash free for the overlay.

tmpfs is a RAM disk. Everything stored there will be lost on a power cut or reboot.

4 Likes

The USB extroot is the only viable option with this router... I did it and it works without issue and you will have more space than you will ever need for packages... but it is tricky to setup a bit and make it functional still effortless if you are determined, you can uninstall some packages (I don't remember the list right now) to make it possible to do the extroot trick... I recommend you to use WinSCP or Putty to do this, if you still need help I will try to gather you the required details.

See above: