r/openwrt • • Mar 31 '26

MX4300 with 1gb flash, only has 100mb available for storage

Hello! Ive been using a linksys 4300:
https://openwrt.org/toh/linksys/mx4300#tab__openwrt_firmware

I wanted to install adguard home but realized that would leave me with little storage.. I remembered thinking that I had the space for a couple more packages so I checked the wiki again and yeah, it seems it should have 1gb available.

Any idea what I can do to actually access that storage space?

The partition layout is full of little partitions that I know not what they do, nor do they seem to be accesible.. This is for example the ones that have at least 1MiB:

fdisk -l | grep MiB
Disk /dev/mtdblock0: 1 MiB, 1048576 bytes, 2048 sectors
Disk /dev/mtdblock1: 1 MiB, 1048576 bytes, 2048 sectors
Disk /dev/mtdblock4: 3 MiB, 3145728 bytes, 6144 sectors
Disk /dev/mtdblock5: 3 MiB, 3145728 bytes, 6144 sectors
Disk /dev/mtdblock15: 1 MiB, 1048576 bytes, 2048 sectors
Disk /dev/mtdblock16: 1 MiB, 1048576 bytes, 2048 sectors
Disk /dev/mtdblock18: 1 MiB, 1048576 bytes, 2048 sectors
Disk /dev/mtdblock19: 1 MiB, 1048576 bytes, 2048 sectors
Disk /dev/mtdblock21: 175.25 MiB, 183762944 bytes, 358912 sectors
Disk /dev/mtdblock22: 167.25 MiB, 175374336 bytes, 342528 sectors
Disk /dev/mtdblock23: 175.25 MiB, 183762944 bytes, 358912 sectors
Disk /dev/mtdblock24: 167.25 MiB, 175374336 bytes, 342528 sectors
Disk /dev/mtdblock25: 4 MiB, 4194304 bytes, 8192 sectors
Disk /dev/mtdblock27: 121.75 MiB, 127664128 bytes, 249344 sectors
Disk /dev/mtdblock28: 4 MiB, 4194304 bytes, 8192 sectors
Disk /dev/mtdblock29: 25 MiB, 26214400 bytes, 51200 sectors
Disk /dev/mtdblock30: 353.5 MiB, 370671616 bytes, 723968 sectors
Disk /dev/mtdblock31: 146.5 MiB, 153616384 bytes, 300032 sectors
Disk /dev/ubiblock0_0: 7.51 MiB, 7872512 bytes, 15376 sectors

30 and 31 are half a gig together, they are not in the stock layout and I have no clue what they are for..

30 for example seems to not even be partitioned? I'm very confused and Id like to not brick the device by touching something I know nothing about

4 Upvotes

14 comments sorted by

2

u/orev Mar 31 '26

Are you frequently installing package updates instead of reflashing? Every update adds another layer to the overlay, even if the files are "replacing" an existing one (updates don't replace packages in the read-only area, they are copies).

If so, you probably need to reflash with the current OpenWRT version you're using, and also stop installing updates. OpenWRT is not like other Linuxes where you want to install updates on a weekly basis.

1

u/wolfsilver00 Mar 31 '26

Does that even happen with sysupgrade? Do I have to reflash as if new?

1

u/orev Mar 31 '26

No, not with sysupgrade, as that reflashes everything. But it would be an issue if you manually run opkg or apk to install updates.

1

u/hunterdeal Apr 06 '26

So have I been doing updates all wrong? I am also using a Linksys MX4300 and using luci web menu software updates weekly.

1

u/orev Apr 06 '26

You should probably stop doing updates like that, as it fills up the flash storage and also wears it out and the chips will eventually fail. Flash storage on these cheap routers is low quality, and it WILL fail. It's not like an SSD that's designed to handle it.

But also there's just no need for such frequent updates, and you also risk incompatibilities between the packages.

Mostly you should install updates when there's a release, then just forget about it until the next release.

1

u/hunterdeal Apr 06 '26

Gotcha. And when there is a “release” how should I upgrade? Reinstall firmware, redownload apps and redo all settings or can a restore of a backup get all that back.

1

u/orev Apr 06 '26

Usually you can use sysupgrade, or the Luci firmware update screen to upload the new release. It will try to keep your config, but make sure to make a backup first.

1

u/Timely-Shine Apr 21 '26 edited Apr 22 '26

Can you explain the difference between “installing package updates” and “reflashing”?

1

u/orev Apr 22 '26

I think you mean "reflaSHing".

"Installing package updates" means running the package updater on the device every few days/weeks to download any new packages from the update server. Sometimes there might only be one package updated, other times many. This type of update method leaves the original package versions on the flash, and then also adds the new package version to the flash, doubling the space it's using.

"Reflashing" is related to a full OpenWRT release, such as when a release is made for a specific version (like 25.12.2). In that case, you update the whole system (with all packages included) by flashing the sysupgrade release file onto the device and it overwrites all packages. Updating this way ensures all packages in the release work with each other, and it doesn't use up any extra space on the flash (because it erased and overwrote everything that was there).

1

u/Timely-Shine Apr 22 '26

Fixed the typo.

So I just flashed a stable build on my MX4300 since I had been running snapshot previously. I also see limited flash space (~100MB). I see the rest of the available 1GB under “Temp Space” in Luci.

I’m still not sure what you mean by “running the package updater on the device every few days/weeks to download any new packages from the update server”. Is this running ‘apk update’? Or specifically updating packages themselves?

I’ve added a few packages - Adguard, wireguard, htop, qrencode, luci DDNS.

Do I need to reflash and start over to reclaim that flash storage space? I’ve never used Luci to update packages or update package lists.

I’ve probably only run ‘apk update’ a time or 2 during setup to get my packages installed. Mostly just habit like on Debian running apt update before installing a new package.

2

u/orev Apr 22 '26

I tend to stick with the stable releases instead of using snapshots, which is typically recommended unless you're an OpenWRT developer.

Yes. I mean running 'apk update'. Don't make it a habit of doing it often, and for the most part not at all unless you're having an issue you know it will fix. Otherwise just install the official releases.

Adding new packages is fine, however you will need to add them again when there's a release and you do the full sysupgrade process. You probably don't need to remove them if things are working for you now, but watch the flash storage space. Note that adguard can be large.

You might consider using the firmware selector, which has an option to customize the included packages before downloading. That's a nice way to get all the packages you need without installing them one by one later. Keep notes on what packages you added so you can reuse the same list in the future.

The habit of doing the update is mainly what I'm addressing. OpenWRT shouldn't be managed that way. Just install a new package if you need it; there's no need to update everything first.

2

u/FreddyFerdiland Mar 31 '26

the oem partitioning reserves a huge space for the "kernel" and same again for backup kernel

openwrt just worked with it.

but sure, preserving oem partitioning doesn't matter if OEM debrick restores all partitioning... whybis the crazy partitioning preserved ?

but if you modify , then attended upgrade works ?

1

u/fr0llic Mar 31 '26

If boot loader check the signature/CRC on the eMMC, changing the layout would lead to a brick.

Using the storage as it is, should be doable, assuming you know which ones won't lead to a brick too :)