OpenWrt Forum Archive

Topic: Not enough space

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

Hi, I've just installed a vanilla 'openwrt-ar71xx-dir-600-a1-squashfs-factory-10.03.1-rc5' on a D-link DIR-601 A1 (Flash -> 4MB, RAM -> 32MB) without any modifications, etc.  I'm now trying to install "openvpn" and its complaining about not having enough memory/space.

Installing openvpn (2.1.4-3) to root...
Downloading http://downloads.openwrt.org/backfire/1 … ar71xx.ipk.
Installing libopenssl (0.9.8p-1) to root...
Collected errors:
* verify_pkg_installable: Only have 412kb available on filesystem /overlay, pkg libopenssl needs 509
* opkg_install_cmd: Cannot install package openvpn.

And this is where things stand,

root@OpenWrt:~# df -h
  Filesystem                Size      Used   Available    Use%   Mounted on
  /dev/root                 2.1M         2.1M           0    100%   /rom
  tmpfs                     14.4M     112.0K     14.3M       1%   /tmp
  tmpfs                    512.0K            0    512.0K       0%   /dev
  /dev/mtdblock4      640.0K    228.0K    412.0K     36%   /overlay
  mini_fo:/overlay        2.1M        2.1M           0    100%   /

My question, short of me building my own image (which I'd like to avoid), is

  1. what packages can I safely remove to get a bit of space (ppp, usb*, etc) ?
      a. I am using squashfs which is read-only meaning nothing can be removed, no ?
      b. When I did try to remove 'kmod-leds-gpio' my /overlay shrunk in size even after a reboot - whoa ?
  2. I ought to have 4MB in the flash is there anyway to have /overlay take a bigger chunk of that ?
  3. Are there recent pre-built images which include openvpn which I can use ?

Thanks.

tfft wrote:

a. I am using squashfs which is read-only meaning nothing can be removed, no ?
      b. When I did try to remove 'kmod-leds-gpio' my /overlay shrunk in size even after a reboot - whoa ?

Yes, squashfs is read-only, so nothing gets removed (and trying to remove some modules will just consume more space, as you already noticed).

You probably need to build an own image.

In general, routers with 4 MB flash are problematic. Even 8 MB can get crowded, if you need many additional modules.

tfft wrote:

root@OpenWrt:~# df -h
  Filesystem                Size      Used   Available    Use%   Mounted on
  /dev/root                 2.1M         2.1M           0    100%   /rom
  tmpfs                     14.4M     112.0K     14.3M       1%   /tmp
  tmpfs                    512.0K            0    512.0K       0%   /dev
  /dev/mtdblock4      640.0K    228.0K    412.0K     36%   /overlay
  mini_fo:/overlay        2.1M        2.1M           0    100%   /

The above is for 10.03.1-rc5 while -rc4 looks more tidy with the following,

root@OpenWrt:~# df -h
  Filesystem                Size        Used   Available   Use%  Mounted on
  /dev/root                   2.1M       2.1M            0    100%   /rom
  tmpfs                       14.4M       1.4M     13.0M      10%   /tmp
  tmpfs                      512.0K           0    512.0K       0%    /dev
  root                            2.1M      2.1M           0     100%   /tmp/root
  mini_fo:/tmp/root        2.1M      2.1M           0     100%   /tmp/root
  /dev/mtdblock4        704.0K   204.0K   500.0K      29%   /overlay
  mini_fo:/overlay          2.1M      2.1M           0     100%   /

The /overlay partition got reduced in size from 704K to 640K from RC-4 to RC-5; anyway to not inch in that direction and to ask the developers to be conscious of that ?  So there is less of it with RC5 and its used-up more (228K vs. 204K) - ouch !

Thanks.

tfft wrote:
tfft wrote:

root@OpenWrt:~# df -h
  Filesystem                Size      Used   Available    Use%   Mounted on
  /dev/root                 2.1M         2.1M           0    100%   /rom
  tmpfs                     14.4M     112.0K     14.3M       1%   /tmp
  tmpfs                    512.0K            0    512.0K       0%   /dev
  /dev/mtdblock4      640.0K    228.0K    412.0K     36%   /overlay
  mini_fo:/overlay        2.1M        2.1M           0    100%   /

The above is for 10.03.1-rc5 while -rc4 looks more tidy with the following,

root@OpenWrt:~# df -h
  Filesystem                Size        Used   Available   Use%  Mounted on
  /dev/root                   2.1M       2.1M            0    100%   /rom
  tmpfs                       14.4M       1.4M     13.0M      10%   /tmp
  tmpfs                      512.0K           0    512.0K       0%    /dev
  root                            2.1M      2.1M           0     100%   /tmp/root
  mini_fo:/tmp/root        2.1M      2.1M           0     100%   /tmp/root
  /dev/mtdblock4        704.0K   204.0K   500.0K      29%   /overlay
  mini_fo:/overlay          2.1M      2.1M           0     100%   /

And one minor revision back (ie. to 10.3[.0]) things are ALOT more abundant,

root@OpenWrt:~# df -h
  Filesystem                Size          Used  Available   Use%  Mounted on
  /dev/root                   1.3M        1.3M           0     100%   /rom
  tmpfs                       14.4M      48.0K     14.4M        0%   /tmp
  tmpfs                      512.0K            0    512.0K       0%   /dev
  root                            1.3M       1.3M           0    100%   /tmp/root
  mini_fo:/tmp/root        1.3M       1.3M           0    100%   /tmp/root
  /dev/mtdblock4           1.5M    204.0K      1.3M     13%   /overlay
  mini_fo:/overlay          1.3M       1.3M           0   100%   /

WOW (/overlay shrunk from 1.5M to 704K) !!  And considering most, well about 60-70% from the looks of it of the supported hardware list, is 4MB sounds like this storage creep in the newer version in a step in the wrong direction, no (well at least for those looking to add 1 or 2 other applications on top of the vanilla install) ?  What application(s) account for most of this extra baggage ?

Regards.

opkg list-installed

Read:  http://wiki.openwrt.org/doc/techref/flash.layout

do opkg info xxx

opkg info openvpn
Package: openvpn
Version: 2.1.4-3
Depends: kmod-tun, libopenssl, liblzo
Provides:
Status: unknown ok not-installed
Section: net
Architecture: ar71xx
Maintainer: OpenWrt Developers Team <openwrt-devel@openwrt.org>
MD5Sum: e4c846d02b563e4dce55c6ede8738dda
Size: 154025
Filename: openvpn_2.1.4-3_ar71xx.ipk
Source: feeds/packages/net/openvpn
Description: Open source VPN solution using SSL

opkg info libopenssl
Package: libopenssl
...
Size: 593322
....

Check for alternative libs:   http://wiki.openwrt.org/doc/devel/links … .libraries

Read:  http://wiki.openwrt.org/doc/howto/vpn.overview

"VPN is a security concept, not a protocol!" Try to use something different to OpenVPN.

(Last edited by Orca on 13 Aug 2011, 15:31)

I do not think shrinking /overlay is a "step in the wrong direction". OpenWRT is including more features in the default image at the expense of available user space. Anyone who has a device with 4MB flash will ultimately have to use ExtRoot.
http://wiki.openwrt.org/doc/howto/extroot?s[]=extroot
http://wiki.openwrt.org/doc/howtobuild/ … howtobuild

Have a look at my overlay:

 root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                 2.4M      2.4M         0 100% /rom
tmpfs                     7.0M    292.0K      6.7M   4% /tmp
/dev/ide/host0/bus0/target0/lun0/part3    45.4G    144.0M     42.9G   0% /overlay
mini_fo:/overlay          2.4M      2.4M         0 100% /
/dev/ide/host0/bus0/target0/lun0/part1     27.5G    130.2M     26.0G   0% /home

(Last edited by F1aw on 13 Aug 2011, 19:30)

F1aw wrote:

I do not think shrinking /overlay is a "step in the wrong direction". OpenWRT is including more features in the default image at the expense of available user space. Anyone who has a device with 4MB flash will ultimately have to use ExtRoot.
http://wiki.openwrt.org/doc/howto/extroot?s[]=extroot
http://wiki.openwrt.org/doc/howtobuild/ … howtobuild

Thanks for the note but with the lower priced routers (which most 4MB are) there usually aren't USB and/or external memory access which leads us back to the same problem.  I realize that more and more functionality is being added to the "vanilla" image but can't there be a means to have the ability to maybe put some of those less used applications as install and/or load options to give users not looking to build their own images an option ?

As a thought, can't LuCI for instance be installed with a trimmed down option which gives a user the ability to "upload firmware" and possibly only see status and forgo everything else unless he/she opt to install more LuCI-"apps" (maybe even download 'em each time just like 'opkg update' works) to be installed for the session in RAM ?

Regards.

@tfft - the only way to achieve what you want is to build your own firmware http://wiki.openwrt.org/doc/howto/build2. Everything you need is detailed on that page. It is extremely easy, plus "make menuconfig" has a graphical interface and allows you to pick the packages to include/exclude.

I think the ease/noob friendliness of OpenWRT build process is what sets this linux distro apart from the rest of the pack.

(Last edited by F1aw on 14 Aug 2011, 02:33)

Cast off the shoe! Follow the gourd!?

Hi. I'm also concerned about space.

I want to build openwrt backfire to install it in a 4 M flash router. I've read the docs you mention, but i don't understand clearly how to use menuconfig correctly.

When i select a Target Profile (D-Link DIR-600 for example) and press <?> for help i see this: "Selects: DEFAULT_base-files && DEFAULT_busybox && DEFAULT_dnsmasq && DEFAULT_dropbear...." I understand these are all the packages and modules selected to compile, is that right? I'm not sure because when i select this profile and navigate through the rest of the menu i don't see all those things selected with [*].

I wonder if i can select just the packages i want without selecting a profile, and in that case, which packages and modules are  indispensable for not bricking the router.

hi pomelo,

this stuff should be selected with "*" or "---" (which means that it is needed by another package and isn't disselectable).
The Target Profile includes all devicedrivers needed for the specific router (wifi, usb, leds, buttons (needed for failsafe!), switch, etc.) and really a minimal set of packages.
I would recommend using the right target profile and deselecting stuff you don't need, but if you are using your device as router there won't be much to remove. maybe ppp pppoe (+kernelmodules). If you use the device as accesspoint only, you could remove firewall + iptables, dnsmasq,... and you will save some space. But if you use it as router there is not really much to remove.
You should build in everything you need into the image because the compression-ratio of the readonly-partition is better than of the jffs2-partition where you can install packages afterwards.

Thank you eleon216. I was confused beacuse menuconfig wasn't working well. After you confirmed me that the packages of the profile should appear with "*" or "---" i noticed that most of them were there, but ath9k and others didn't. Then when i exited from menuconfig i saw a warning talking about a circular dependence between ath9k, hostapd and other packages.

I was using the tagged version of Backfire, i changed it for the branch, and now with menuconfig the warning doesn't appear anymore, and when i select a profile all the drivers and stuff are selected as expected. Thanks!

Was this topic resolved? If there is a DIR-601 image with OpenVPN, I'd like to get it. I'm in the same situation.

I'm compiling my own firmware now, with the defaults for this target but I don't know if that will work.

Good evening all,
I am new to openWRT, but not new to Linux cmd.

I came across this thread, as I too discovered the limitations of a small device memory.

I am assuming the Flaw1 is talking about Image Generator (Image Builder).
If I am correct, I run the builder on my router device which in my case is (TP-WR703n)

I followed the instructions at
http://wiki.openwrt.org/doc/howto/obtai … .generator

cd ~
mkdir openwrt && cd openwrt
wget http://downloads.openwrt.org/attitude_adjustment/12.09/ar71xx/generic/OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486.tar.bz2
tar -xvjf OpenWrt-ImageBuilder-ar71xx_generic-for-linux-i486.tar.bz2

I could not unzip the b2z file, the error I get using "tar -xvjf filename.bz2" is:

tar: invalid option -- j
BusyBox v1.19.4 (2013-03-14 11:28:31 UTC) multi-call binary.

Usage: tar -[cxtzhvO] [-X FILE] [-T FILE] [-f TARFILE] [-C DIR] [FILE]...

Create, extract, or list files from a tar file

Operation:
        c       Create
        x       Extract
        t       List
        f       Name of TARFILE ('-' for stdin/out)
        C       Change to DIR before operation
        v       Verbose
        z       (De)compress using gzip
        O       Extract to stdout
        h       Follow symlinks
        X       File with names to exclude
        T       File with names to include

I am guessing that the j option has been depreciated
I tried omitting option J but I get an error which I kind of expected.

Has anyone got a clue why I cannot unzip the file or how to unzip the file?

If this fails then I might have to look into Buildroot, using Ubuntu as my OS.

I thank you in advance for any help you may give.

Imagebuilder should be run on a desktop computer not on a router.

Busybox does not support bzip.

Thank you for clarifying this, I will give this a shot

The discussion might have continued from here.