OpenWrt Forum Archive

Topic: install package in ram (/tmp folder)

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.

hello,

I spent days searching on google and the forum, but I can not find solutions.

I want to install a program (openvpn, but anyway which one) in memory of my WR841ND router (v9) under OpenWrt Barrier Breaker 14.07. However, the command "destination" (d) of opkg program appears to be taking no account.

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
rootfs                  704.0K    560.0K    144.0K  80% /
/dev/root                 2.3M      2.3M         0 100% /rom
tmpfs                    14.1M   1000.0K     13.1M   7% /tmp
/dev/mtdblock3          704.0K    560.0K    144.0K  80% /overlay
overlayfs:/overlay      704.0K    560.0K    144.0K  80% /
tmpfs                   512.0K         0    512.0K   0% /dev

Below the command does not work

root@OpenWrt:/tmp/openvpn_ram# opkg install openvpn-openssl -d ram
Installing openvpn-openssl (2.3.6-2) to root...
Downloading http://downloads.openwrt.org/barrier_br … r71xx.ipk.
Installing libopenssl (1.0.2-1) to root...
Collected errors:
* verify_pkg_installable: Only have 144kb available on filesystem /overlay, pkg libopenssl needs 709
* opkg_install_cmd: Cannot install package openvpn-openssl.

as you see, openwrt attempts to install in root. I do not understand why.
But the order seems to be taken into account, because if I use foo as the destination, which is not defined in my opkg.conf file, then I get an error (see below)

root@OpenWrt:~# opkg install openvpn-openssl -d foo
Collected errors:
* resolve_pkg_dest_list: Unknown dest name: `foo'.

For information :

root@OpenWrt:/tmp/openvpn_ram# cat /etc/opkg.conf
dest root /
dest ram /tmp
lists_dir ext /var/opkg-lists
option overlay_root /overlay
src/gz barrier_breaker_base http://downloads.openwrt.org/barrier_br … kages/base
src/gz barrier_breaker_luci http://downloads.openwrt.org/barrier_br … kages/luci
src/gz barrier_breaker_packages http://downloads.openwrt.org/barrier_br … s/packages
src/gz barrier_breaker_routing http://downloads.openwrt.org/barrier_br … es/routing
src/gz barrier_breaker_telephony http://downloads.openwrt.org/barrier_br … /telephony
src/gz barrier_breaker_management http://downloads.openwrt.org/barrier_br … management
src/gz barrier_breaker_oldpackages http://downloads.openwrt.org/barrier_br … ldpackages

did I miss something?
Thanks for replies ^^

Clement

It's installing all dependencies to root.. i think you must change dest root path in opkg.conf..

Thanks for you reply, but I modify my opkg.conf like this, /tmp/root_ext exists

dest root /tmp/root_ext
dest ram /tmp

but i obtain the following error :

root@OpenWrt:~# opkg install openvpn-openssl
Installing openvpn-openssl (2.3.6-2) to root...
Downloading http://downloads.openwrt.org/barrier_br … r71xx.ipk.
Collected errors:
* satisfy_dependencies_for: Cannot satisfy the following dependencies for openvpn-openssl:
*      libc *  kernel (= 3.10.49-1-0114c71ed85677c9c1e4911437af4743) *         libc *  libc *  libc *
* opkg_install_cmd: Cannot install package openvpn-openssl.

Any ideas ?

Are you using a custom built image?

no, this is "official" image from openwrt.

i found solution, i remove this line :

option overlay_root /overlay

from my opkg.conf file....

So i can successfull install openvpn and dependencies inside ram smile (in /tmp/ram_root)
I have to also add this two lines inside /etc/profile in order to indicate path and libraries path...

export PATH=/usr/bin:/usr/sbin:/bin:/sbin:/tmp/ram_root/usr/sbin:/tmp/ram_root/usr/bin
export LD_LIBRARY_PATH=/lib:/usr/lib:/tmp/ram_root/lib:/tmp/ram_root/usr/lib

But, after that openvpn won't start, even the --help command

root@OpenWrt:~# openvpn --help
Usage message not available

you should start it with its init script inside /etc/init.d , after having a valid configuration inside /etc/config wink

The discussion might have continued from here.