root@OpenWrt:~# fdisk -l /dev/sda

Disk /dev/sda: 8031 MB, 8031043584 bytes
224 heads, 16 sectors/track, 4376 cylinders, total 15685632 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x00000000

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048    15677439     7837696    b  W95 FAT32

********************************************************************************************************
root@OpenWrt:~# cat /etc/config/fstab

config global 'automount'
        option from_fstab '1'
        option anon_mount '1'

config global 'autoswap'
        option from_fstab '1'
        option anon_swap '0'

config mount
        option target '/overlay'
        option options 'rw,sync'
        option enabled '1'
        option fstype 'vfat'
        option device '/dev/sda1'

config swap
        option enabled '1'
        option device '/dev/sda1'

**********************************************************************************************************
root@OpenWrt:~# ls -l /
drwxr-xr-x    2 root     root           666 Mar 23  2013 bin
drwxr-xr-x    6 root     root          1140 Jan 30 16:53 dev
drwxr-xr-x    1 root     root             0 Mar 23  2013 etc
-rw-r--r--    1 root     root             1 Jan 30 10:17 fstab
drwxr-xr-x    2 root     root             0 Jan 30 10:09 home
drwxr-xr-x    1 root     root             0 Mar 23  2013 lib
drwxr-xr-x    1 root     root             0 Jan 30 11:20 mnt
drwxr-xr-x    9 root     root             0 Jan 30 10:17 overlay
dr-xr-xr-x   51 root     root             0 Jan  1  1970 proc
drwxr-xr-x   16 root     root           223 Mar 23  2013 rom
drwxr-xr-x    2 root     root             3 Mar 23  2013 root
drwxr-xr-x    1 root     root             0 Jan 30 10:49 sbin
drwxr-xr-x   11 root     root             0 Jan  1  1970 sys
drwxrwxrwt   14 root     root           400 Jan 30 17:08 tmp
drwxr-xr-x    1 root     root             0 Mar 23  2013 usr
lrwxrwxrwx    1 root     root             4 Mar 23  2013 var -> /tmp
drwxr-xr-x    4 root     root            67 Mar 23  2013 www

************************************************************************************************
root@OpenWrt:~# lsmod
Module                  Size  Used by    Tainted: G
ath79_wdt               2240  1
ledtrig_usbdev          2032  0
ledtrig_netdev          3184  0
nf_nat_irc               784  0
nf_conntrack_irc        2464  1 nf_nat_irc
nf_nat_ftp               976  0
nf_conntrack_ftp        4416  1 nf_nat_ftp
ipt_MASQUERADE           976  1
iptable_nat             2544  1
nf_nat                 10256  4 nf_nat_irc,nf_nat_ftp,ipt_MASQUERADE,iptable_nat
pppoe                   7488  0
xt_conntrack            2048  3
xt_CT                   1216  0
xt_NOTRACK               448  0
iptable_raw              560  1
xt_state                 608  0
nf_conntrack_ipv4       4384  6 iptable_nat,nf_nat
nf_defrag_ipv4           656  1 nf_conntrack_ipv4
nf_conntrack           38336 12 nf_nat_irc,nf_conntrack_irc,nf_nat_ftp,nf_conntrack_ftp,ipt_MASQUERADE,iptable_nat,nf_nat,xt_conntrack,xt_CT,xt_NOTRACK,xt_state,nf_conntrack_ipv4
pppox                   1152  1 pppoe
ipt_REJECT              1808  2
xt_TCPMSS               2560  0
ipt_LOG                 6160  0
xt_comment               400  0
xt_multiport            1104  0
xt_mac                   528  0
xt_limit                 944  1
iptable_mangle           832  1
iptable_filter           592  1
ip_tables               8864  4 iptable_nat,iptable_raw,iptable_mangle,iptable_filter
xt_tcpudp               1632  3
x_tables                9984 18 ipt_MASQUERADE,iptable_nat,xt_conntrack,xt_CT,xt_NOTRACK,iptable_raw,xt_state,ipt_REJECT,xt_TCPMSS,ipt_LOG,xt_comment,xt_multiport,xt_mac,xt_limit,iptable_mangle,iptable_filter,ip_tables,xt_tcpudp
ppp_async               5952  0
ppp_generic            18848  3 pppoe,pppox,ppp_async
slhc                    4368  1 ppp_generic
vfat                    7824  0
fat                    41728  1 vfat
ath9k                  84944  0
ath9k_common            1152  1 ath9k
ath9k_hw              329024  2 ath9k,ath9k_common
ath                    14320  3 ath9k,ath9k_common,ath9k_hw
nls_iso8859_1           2800  0
nls_cp437               4336  0
mac80211              252240  1 ath9k
crc_ccitt                944  1 ppp_async
cfg80211              153696  3 ath9k,ath,mac80211
compat                  5776  5 ath9k,ath9k_common,ath9k_hw,mac80211,cfg80211
arc4                     768  2
aes_generic            29808  0
usb_storage            33152  0
ohci_hcd               16160  0
ehci_hcd               33632  0
sd_mod                 22240  0
usbcore                99200  5 ledtrig_usbdev,usb_storage,ohci_hcd,ehci_hcd
usb_common               480  1 usbcore
scsi_mod               69904  2 usb_storage,sd_mod
nls_base                4640  5 vfat,fat,nls_iso8859_1,nls_cp437,usbcore
crypto_algapi           9200  2 arc4,aes_generic
ledtrig_timer           1072  0
ledtrig_default_on       416  0
leds_gpio               1552  0
gpio_button_hotplug     3184  0

******************************************************************************************************************************************

root@OpenWrt:~# opkg list-installed
base-files - 117-r36088
blkid - 2.21.2-1
block-mount - 0.2.0-9
busybox - 1.19.4-6
dnsmasq - 2.62-2
dropbear - 2011.54-2
fdisk - 2.21.2-1
firewall - 2-55.1
hotplug2 - 1.0-beta-4
iptables - 1.4.10-4
iw - 3.6-1
jshn - 2013-01-29-0bc317aa4d9af44806c28ca286d79a8b5a92b2b8
kernel - 3.3.8-1-d6597ebf6203328d3519ea3c3371a493
kmod-ath - 3.3.8+2012-09-07-3
kmod-ath9k - 3.3.8+2012-09-07-3
kmod-ath9k-common - 3.3.8+2012-09-07-3
kmod-cfg80211 - 3.3.8+2012-09-07-3
kmod-crypto-aes - 3.3.8-1
kmod-crypto-arc4 - 3.3.8-1
kmod-crypto-core - 3.3.8-1
kmod-fs-vfat - 3.3.8-1
kmod-gpio-button-hotplug - 3.3.8-1
kmod-ipt-conntrack - 3.3.8-1
kmod-ipt-core - 3.3.8-1
kmod-ipt-nat - 3.3.8-1
kmod-ipt-nathelper - 3.3.8-1
kmod-leds-gpio - 3.3.8-1
kmod-ledtrig-default-on - 3.3.8-1
kmod-ledtrig-netdev - 3.3.8-1
kmod-ledtrig-timer - 3.3.8-1
kmod-ledtrig-usbdev - 3.3.8-1
kmod-lib-crc-ccitt - 3.3.8-1
kmod-mac80211 - 3.3.8+2012-09-07-3
kmod-nls-base - 3.3.8-1
kmod-nls-cp437 - 3.3.8-1
kmod-nls-iso8859-1 - 3.3.8-1
kmod-ppp - 3.3.8-1
kmod-pppoe - 3.3.8-1
kmod-pppox - 3.3.8-1
kmod-scsi-core - 3.3.8-1
kmod-usb-core - 3.3.8-1
kmod-usb-ohci - 3.3.8-1
kmod-usb-storage - 3.3.8-1
kmod-usb2 - 3.3.8-1
kmod-wdt-ath79 - 3.3.8-1
libblkid - 2.21.2-1
libblobmsg-json - 2013-01-29-0bc317aa4d9af44806c28ca286d79a8b5a92b2b8
libc - 0.9.33.2-1
libcom_err - 1.42.4-1
libext2fs - 1.42.4-1
libgcc - 4.6-linaro-1
libip4tc - 1.4.10-4
libiwinfo - 36
libiwinfo-lua - 36
libjson - 0.9-2
liblua - 5.1.4-8
libncurses - 5.7-5
libnl-tiny - 0.1-3
libpthread - 0.9.33.2-1
libubox - 2013-01-29-0bc317aa4d9af44806c28ca286d79a8b5a92b2b8
libubus - 2013-01-13-bf566871bd6a633e4504c60c6fc55b2a97305a50
libubus-lua - 2013-01-13-bf566871bd6a633e4504c60c6fc55b2a97305a50
libuci - 2013-01-04.1-1
libuci-lua - 2013-01-04.1-1
libuuid - 2.21.2-1
libxtables - 1.4.10-4
lua - 5.1.4-8
luci - 0.11.1-1
luci-app-firewall - 0.11.1-1
luci-i18n-english - 0.11.1-1
luci-lib-core - 0.11.1-1
luci-lib-ipkg - 0.11.1-1
luci-lib-nixio - 0.11.1-1
luci-lib-sys - 0.11.1-1
luci-lib-web - 0.11.1-1
luci-mod-admin-core - 0.11.1-1
luci-mod-admin-full - 0.11.1-1
luci-proto-core - 0.11.1-1
luci-proto-ppp - 0.11.1-1
luci-sgi-cgi - 0.11.1-1
luci-theme-base - 0.11.1-1
luci-theme-openwrt - 0.11.1-1
mtd - 18.1
netifd - 2013-01-29.2-4bb99d4eb462776336928392010b372236ac3c93
opkg - 618-3
ppp - 2.4.5-8
ppp-mod-pppoe - 2.4.5-8
swap-utils - 2.21.2-1
swconfig - 10
terminfo - 5.7-5
uboot-envtools - 2012.04.01-1
ubus - 2013-01-13-bf566871bd6a633e4504c60c6fc55b2a97305a50
ubusd - 2013-01-13-bf566871bd6a633e4504c60c6fc55b2a97305a50
uci - 2013-01-04.1-1
uhttpd - 2012-10-30-e57bf6d8bfa465a50eea2c30269acdfe751a46fd
wpad-mini - 20120910-1


Thanks a lot for your help!

Theodoros



On Thu, Jan 30, 2014 at 6:05 PM, Johannes Morgenroth <morgenroth@ibr.cs.tu-bs.de> wrote:
Am 30.01.2014 17:38, schrieb Theodoros Bourchas:
> 1) Where are the packages stored, when an "opkg install package " is
> performed?
Packages are installed on the root parition of the system. Libraries are
installed in /lib, binaries in /sbin or /bin.

>
> 2)Do u think that a pivot root instead of pivot overlay will solve
> this issue?
No. The overlay is just not properly configured.

>
> 3)Or it is better to partition the USB and use this "swap" feature?
The overlay fs has nothing to do with the swap feature.

To analyse the issue why it is not working I need the partition table of
your device:

opkg install fdisk
fdisk -l /dev/sda

and the output of these commands:

cat /etc/config/fstab
ls -l /
lsmod
opkg list_installed

Kind regards,
Johannes Morgenroth