OpenWrt Forum Archive

Topic: How to free up some space?

The content of this topic has been archived on 4 May 2018. There are no obvious gaps in this topic, but there may still be some posts missing at the end.

Hi everyone,
in the last few days I was trying to set up a tp-link mr3220 to work as a samba server for my home network. The sticker under the AP report it as 1.2v hardware, but the firmware say 1.0000v. Anyway, I flashed it with trunk r27832, it work like a charm. After a bit of setup I've started to remove packages to free up the necessary space to install samba, but I noticed that even if opkg info report a certain amount of space in fact df -h report just a couple of kb of difference. I've removed all the packages related to wireless (this AP will be connected to another AP with wireless enabled, so no matter to setup another wlan), like wireless-tools, but even if opkg info report a size of 23165, only a few kb of free space were gained. I know that there are better way to achieve what I want, extroot just to say one, but this solution would avoid to use an extra hub for the other usb port (the drive to mount can't be left attached to the AP all the time, so in this case I should use a dedicated drive for the extroot).
Can anyone explain why the packages size doesn't fit with the space that should change after removed it? I was thinking about something related to filesystem type, cause I've noticed this behaviour only for the packages already installed in the image (but maybe I can be wrong). Maybe I must compile a custom version of the image without some packages?
Just as reference I've used the squashfs-factory.bin image as suggested in the wiki. Actually I've removed all the unnecessary packages then I installed the minimum requested to mount ext partition (mount work perfectly) and I'm using it as an ftp server for now, but I really need to switch to samba and I still need about 50kb to install samba3 package.
Tanx all for support, have a good day.

P.S. Sorry for my bad english.

OpenWRT uses squashfs.  Read about squashfs at http://en.wikipedia.org/wiki/SquashFS

In short you cannot remove preinstalled packages such that flash space it released.  But preinstalled packages have the advantage of being compressed in flash and therefor take a lot less flash space.  Packages installed using opkg are not compressed on your router so they are less efficient in regards to the amount of flash space they occupy but they can be removed.

To do what you want you need to build your own version of openwrt using make menuconfig to select the packages you want preinstalled.

Thank you for the suggestion pbix, after reading a bit of wiki and docs some facts appear more clear now, as the wiki say a custom image with the necessary packages built into the flash will solve my need of space, unfortunately doesn't seem to be an ar71xx trunk version of the image builder, so I must go for the standard compiling way. Tanx again.

The discussion might have continued from here.