OpenWrt Forum Archive

Topic: swapon: Function not implemented ?

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

Im trying to get some swap space going on my nslu2 with 7.07.
I installed swap-utils, did a : swapon /dev/sda2
and get a as the subject states: "swapon: /dev/sda2: Function not implemented"
so i searched a bit on the forum and found this: http://forum.openwrt.org/viewtopic.php?pid=29445#p29445
i did a ext* partion of /dev/sda2 and created a swapfile and ran mkswap on the file, however it ended up the same way.

Edit: minor spelling and some idiotacracy =

"I guess ", ill have to build it on me own, however im not sure yet if im gonna pull it off, if the (http://forum.openwrt.org/viewtopic.php?pid=45838) applys regarding the nslu2 and the intel eth-card, have to free some space first, or well.. if say, some lovely sweet person would like to hand over a squashfs with swap. wink

(Last edited by telfrid on 1 Aug 2007, 10:14)

*bump*

Just to get this straight, i do have to recompile kamikaze for getting swap to work right?

Hi, I installed and configured swap with xwrt. You could take a look at there script. You also need kmod-loop installed.
So, for a 1 MB swap file, it should be something like:

dd if=/dev/zero of=/tmp/sda1/swapfile count=2000
losetup /dev/loop0 /tmp/sda1/swapfile
mkswap /dev/loop0
swapon /dev/loop0

(Last edited by Oconnor on 6 Aug 2007, 19:29)

strange, i had kmod-loop installed and did install losetup.
did a:

mke2fs /dev/sda2 
mkdir /swap
mount /dev/sda2 /swap
dd if=/dev/zero of=/swap/swapfile count=800000
losetup /dev/loop0 /swap/swapfile
mkswap /dev/loop0
swapon /dev/loop0

And i still get, "swapon: /dev/loop0: Function not implemented".. ?

suggestions?

i got the same error
doesn't matter if i use a partition or a file (over loop)

Ulukay wrote:

i got the same error
doesn't matter if i use a partition or a file (over loop)

"yay", now there is two of us with the same issue.. IF you are using kamikaze on the linksys nslu2, right?

Hi, I tried it with Netgear wgt634u with Kamikaze 7.06 and Asus wl-500gP with Kamikaze 7.07 both of them are working. Then it should be a problem with the nslu2.

Swap support for the IXP4xx target is disabled in Kamikaze 7.07 because of an overlooked config setting.  This was fixed with trunk r7989 which will propagate into the next release (Afterburner 7.09)

edit: to be clear, kernel support for swap was disabled on the ixp4xx target; this was fixed.  The userspace tools, mkswap and swaponoff are still disabled in busybox.  busybox must be rebuilt with these enabled, or the swap-utils package must be installed in order to actually use swap.

(Last edited by Bartman007 on 23 Aug 2007, 06:27)

The discussion might have continued from here.