enabling swap :

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware
Author Message
eki27
DD-WRT Novice


Joined: 31 May 2011
Posts: 42

PostPosted: Tue Aug 21, 2012 12:43    Post subject: enabling swap : Reply with quote
Hi all,

I use USB dongle with 3 partitions on my WRT160NL with dd-wrt svn16124, the partition /dev/sda2 is a swap one, I would like to enable it (I know it's a bad idea on USB)...

Code:

root@ddwrt / # fdisk -l

Disk /dev/sda: 7748 MB, 7748222976 bytes
239 heads, 62 sectors/track, 1021 cylinders
Units = cylinders of 14818 * 512 = 7586816 bytes
Disk identifier: 0x000395e3

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1               1         132      977957   83  Linux
/dev/sda2             133         264      977988   82  Linux swap / Solaris
/dev/sda3             265         396      977988   83  Linux


Code:
root@ddwrt / # swapon /dev/sda2
swapon: /dev/sda2: Function not implemented


Code:
root@ddwrt / # /bin/busybox swapon /dev/sda2
swapon: applet not found


I think the kernel version is recent enough :

Code:
root@ddwrt / # uname -a
Linux ddwrt 2.6.34.8-svn16124 #3619 Thu Feb 17 07:03:57 CET 2011 mips G
NU/Linux


I tought it was a probel with busybox (actual version : 1.13.4), but :
Code:

root@dd-wrt / # opkg upgrade busybox
Installing busybox (1.15.3-2) to root...
Downloading http://downloads.openwrt.org/backfire/10.03.1-rc4/ar71xx/packages/bu
sybox_1.15.3-2_ar71xx.ipk.
Configuring busybox.
Configuring kmod-loop.
/opt//usr/lib/opkg/info/kmod-loop.postinst: .: line 3: can't open /etc/functions
.sh
Collected errors:
 * pkg_run_script: postinst script returned status 2.
 * opkg_configure: kmod-loop.postinst returned 2.


and thus, I tought about opkg problem but:

Code:
root@dd-wrt / # opkg upgrade
Not upgrading package libpthread which is marked hold (flags=0x2).
Not upgrading package libgcc which is marked hold (flags=0x102).
Not upgrading package librt which is marked hold (flags=0x2).
Not upgrading package kmod-loop which is marked hold (flags=0x102).
Not upgrading package kernel which is marked hold (flags=0x2).
Configuring kmod-loop.
/opt//usr/lib/opkg/info/kmod-loop.postinst: .: line 3: can't open /etc/functions
.sh
Collected errors:
 * pkg_run_script: postinst script returned status 2.
 * opkg_configure: kmod-loop.postinst returned 2.


I'm now affraid to discover all those problems just to enable swap and I will wait for your advices to go further, thanks!!
Sponsor
eki27
DD-WRT Novice


Joined: 31 May 2011
Posts: 42

PostPosted: Tue Aug 21, 2012 23:27    Post subject: Reply with quote
in brief, what could cause this problem? and how to fix this?

root@ddwrt root # opkg install php5-mod-session
Installing php5-mod-session (5.3.1-4) to root...
Downloading http://downloads.openwrt.org/backfire/1p5-mod-session_5.3.1-4_ar71xx.ipk.
Configuring kmod-loop.
/opt//usr/lib/opkg/info/kmod-loop.postinst: .: line
.sh

Configuring php5-mod-session.
Collected errors:
* pkg_run_script: postinst script returned status
* opkg_configure: kmod-loop.postinst returned 2.
eki27
DD-WRT Novice


Joined: 31 May 2011
Posts: 42

PostPosted: Wed Aug 22, 2012 1:06    Post subject: Reply with quote
Ok, it happens when we try to upgrade busybox!

but even with the right busybox and swap-utils correctly installed :

root@ddwrt / # /bin/busybox swapon /dev/sda2
swapon: applet not found

what is missing?
eki27
DD-WRT Novice


Joined: 31 May 2011
Posts: 42

PostPosted: Wed Aug 22, 2012 2:28    Post subject: Reply with quote
Also tried with swapon from swap-utils, with no luck :

root@ddwrt / # /mnt/opt/sbin/swapon /dev/sda2
swapon: /dev/sda2: Function not implemented

Maybe swap is disabled in SVN16214?

-----------------------------------------
Please let me know why nobody answer me;
- my english is realy ugly
- I ask bad (or my questions are stupid)
- I'm in the wrong place?
- all together

P.S. : I'm going to listen to the song of Charlie Winston... Hello, alone...
------------------------------------------
clweb
DD-WRT Novice


Joined: 17 Nov 2008
Posts: 43

PostPosted: Wed Aug 22, 2012 7:20    Post subject: Reply with quote
Do you really need swap ?
Not enough RAM in your device ?
LOM
DD-WRT Guru


Joined: 28 Dec 2008
Posts: 7632

PostPosted: Wed Aug 22, 2012 7:31    Post subject: Reply with quote
The WR160NL builds do not have swap enabled in the linux kernel.
_________________
Kernel panic: Aiee, killing interrupt handler!
eki27
DD-WRT Novice


Joined: 31 May 2011
Posts: 42

PostPosted: Wed Aug 22, 2012 8:55    Post subject: Reply with quote
Razz I'm happy to read you! Even if it's for bad news.

Indeed, there is enough ram for many things.

With large Sqlite queries, the devices sometimes run out of memory and php hangs up (I can see it in syslog.log)

Is there any solution to enable swap on WRT160NL in other way? Or Do you know such a documentation to increase physically it's memory size?

Thank you
Display posts from previous:    Page 1 of 1
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Atheros WiSOC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You cannot download files in this forum