OpenWrt Forum Archive

Topic: OpenVPN install failed, almost no space remaining, how to remove pkg's

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

Believe it or not this is the second time I've done this recently.

Attempted to install openvpn in WRT54G running openwrt Backfire 10.03.1

Ran out of space.

32.0K remaining.

How can I get back that space these packages are taking up?  Is there anyway to remove them?

Yes I realize this is a common and stupid mistake.

root@OpenWrt:/etc# opkg install openvpn openvpn-easy-rsa
Installing openvpn (2.1.4-3) to root...
Downloading http://downloads.openwrt.org/backfire/10.03.1/brcm-2.4/packages/openvpn_2.1.4-3_brcm-2.4.ipk.
Installing kmod-tun (2.4.37.9-1) to root...
Downloading http://downloads.openwrt.org/backfire/10.03.1/brcm-2.4/packages/kmod-tun_2.4.37.9-1_brcm-2.4.ipk.
Installing libopenssl (0.9.8r-1) to root...
Downloading http://downloads.openwrt.org/backfire/10.03.1/brcm-2.4/packages/libopenssl_0.9.8r-1_brcm-2.4.ipk.
Installing zlib (1.2.3-5) to root...
Downloading http://downloads.openwrt.org/backfire/10.03.1/brcm-2.4/packages/zlib_1.2.3-5_brcm-2.4.ipk.
Installing liblzo (2.04-1) to root...
Downloading http://downloads.openwrt.org/backfire/10.03.1/brcm-2.4/packages/liblzo_2.04-1_brcm-2.4.ipk.
Installing openvpn-easy-rsa (2.1.4-3) to root...
Downloading http://downloads.openwrt.org/backfire/10.03.1/brcm-2.4/packages/openvpn-easy-rsa_2.1.4-3_brcm-2.4.ipk.
Installing openssl-util (0.9.8r-1) to root...
Configuring kmod-tun.
Configuring liblzo.
Configuring zlib.
Configuring libopenssl.
Collected errors:
 * copy_file_chunk: write: No space left on device.
 * pkg_write_filelist: Failed to open //usr/lib/opkg/info/openvpn.list: No space left on device.
 * opkg_install_pkg: Failed to extract data files for openvpn. Package debris may remain!
 * opkg_install_cmd: Cannot install package openvpn.
 * verify_pkg_installable: Only have 32kb available on filesystem /overlay, pkg openssl-util needs 140
 * opkg_install_cmd: Cannot install package openvpn-easy-rsa.
 * opkg_conf_write_status_files: Can't open status file //usr/lib/opkg/status: No space left on device.

Any help on this?  I can't find anything googling.  Just lots of people who screwed themselves by ending up at 0kb free.  At least I have a fully functional router still, just 32KB left.

Resetting is a good way to revert back to flashed contents (if you use squshfs/jffs2 combination like most users do).

Alternative is to remove excatly those packages that you have installed after flashing. (probably those shown in the log.)

The people who have screwed themselves have not realized the difference of read-only squashfs partition (where the core and pre-installed packages are located) and read-write jffs2. Trying to remove packages in flash read-only "ROM" part (squashfs) will just lead to more bytes taken from jffs2. http://wiki.openwrt.org/doc/techref/fil … in.openwrt

But deleting packages from squashfs partition should free space (provided that there are enough free space for opkg to work).

Ps. You might also go to the /overlay folder (which actually has all the modifies files), and manually delete the largest added files (likely the openssl from there, e.g. from /overlay/usr/include and /overlay/lib/. Then you might have enough free space to use opkg to gracefully uninstall the modules completely.

(Last edited by hnyman on 24 Jul 2012, 11:11)

I tried looking through the folders.  I didn't want to just start manually removing files.  OPKG was functional but when asked to remove, autoremove, etc it would just say nothing exists related to openvpn (even tho I can see the files).

I ended up just doing a Backup and Reset.  Thanks for pointing out the web interface which I rarely use has a backup/restore.

After the restore there is 1.16MB left on the device.  I wonder how short I am for openvpn.

Heh I managed to get it installed.  48.0K left.  Ridiculously low.

End result.

ImageBuilder, custom package list (adding openvpn) and extra files list.

Same setup, 480KB free.

Nice work on imagebuilder, very nice to use.

http://wiki.openwrt.org/doc/howto/obtai … e.generate

define Profile/WRT54G
  NAME:=Linksys WRT54G
  PACKAGES:=base-files busybox dnsmasq dropbear firewall iptables iptables-mod-conntrack iptables-mod-nat kernel kmod-brcm-wl kmod-diag kmod-ipt-conntrack kmod-ipt-core kmod-ipt-nat kmod-ipt-nathelper kmod-ppp kmod-pppoe kmod-switch kmod-tun kmod-wlcompat libc libgcc libip4tc libiwinfo libiwinfo-lua liblua liblzo libopenssl libuci libuci-lua libxtables lua luci luci-app-firewall luci-i18n-english luci-lib-core luci-lib-ipkg luci-lib-lmo luci-lib-nixio luci-lib-sys luci-lib-web luci-mod-admin-core luci-mod-admin-full luci-proto-core luci-proto-ppp luci-sgi-cgi luci-theme-base luci-theme-openwrt mtd nas nvram openssl-util openvpn openvpn-easy-rsa opkg ppp ppp-mod-pppoe uci uhttpd wireless-tools wlc zlib
endef

define Profile/WRT54G/Description
        Package set optimized for the WRT54G3G with UMTS support
endef
$(eval $(call Profile,WRT54G))

There is likely some packages in there not needed.  Most important though, openvpn is installed and significantly smaller due to being squashed.

(Last edited by halsafar on 24 Jul 2012, 18:38)

General Discussion This topic is very quite forum posting......................

The discussion might have continued from here.