OpenWrt 19.07.0 - Where is /proc/swaps?

Please, help! I can not find / proc / swaps in 19.07.0, and because of this, swap does not work. (mkswap -- ok ;swapon -- exit error -1; swapoff -- writes no file /percent /swaps)

D-Link DIR-320 H/W Ver.: B1 (8/32)

This device is NOT RECOMMENDED for future use with OpenWrt due to low flash/ram.
DO NOT BUY DEVICES WITH 4MB FLASH / 32MB RAM if you intend to flash an up-to-date and secure OpenWrt version (18.06 or later) onto it! See 4/32 warning for details.

I would stop investing time in fixing this and instead work some hours to afford a newer device with 16 MB flash and 128 MB RAM or more.

You could even lower this cost if you take a good supported used device.

1 Like

Снимок

This forum should find easy ways. The 4 MB flash and 32 MB RAM discussion is already over:

Advice
Users that are not expert users of OpenWrt (those that can build their own images) should consider
16/64 as an absolute minimum for any device, with at least 128 MB of RAM being preferred.

You have RAM issues with a 32 MB RAM device. So buy a new device with more RAM. Quick and easy solution.

Don't waste more time with OpenWrt 19.07 on 32 MB RAM.

1 Like

The documentation says that it supports ... it means it should support it.

Why release an update that is not working properly?

Can you stop with the bludgeoning? It's a perfectly reasonable question, small device or not.
If someone comes on and says "It works fine on my 32MB device", and another person confirms that it doesn't work (or isn't supposed to work) on low flash/low memory devices, then by golly you can come on back and hit him with your stick again.
But for now, kindly leave the thread and see if someone with more useful input shows up.

I provided advice and a solution. What did you provide?

Maybe if you couldn't help you should kindly leave the thread and see if someone with more useful input shows up.

The device is not supported, it is a fact. But here the problem is that the developer wrote in the documentation that the device can be updated to 19.07.0, but did not say that one of the most important functions will not work in the update. Maybe it's a bug?

And if you stop supporting the device, make sure that everything works as it should, and there will be no questions ...

In the interest of not further cluttering the thread, i'm replied by PM.
I've also unmarked the solution until someone can confirm that it is indeed a problem with the low memory device.

1 Like

If support ceased on January 1, who makes sure everything works?

This has to be a quirk, as LuCI had issues on 32 MB RAM devices since version 18. I think the page was only updated because it has >4MB Flash...and probably hence your desire for swap. If you can browse LuCI, what does the "Mount Points" page show?

It should also be noted that v19 was originally scheduled to be released in 2019.

Not sure it won't work; but it would be quite slow.

BusyBox v1.30.1 () built-in shell (ash)

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 OpenWrt 19.07.0, r10860-a3ffeb413b
 -----------------------------------------------------
root@OpenWrt:~# ls /proc/swaps -l
-r--r--r--    1 root     root             0 Jan 13 22:55 /proc/swaps

It's present on my OpenWrt.

I also noticed my file is read only.

MY First questions

https://bugs.openwrt.org/index.php?do=details&task_id=2047&pagenum=5
Theory indicates that SWAP is disabled to save flash space.
Generic config turns it on (https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/generic/config-4.14;h=b0805b1a2cda704ddfb699c0835024dd5a32f8be;hb=refs/heads/openwrt-19.07#l4841)

I don't see anything specific in ramips turning it back off (https://git.openwrt.org/?p=openwrt/openwrt.git;a=blob;f=target/linux/ramips/rt305x/config-4.14;h=76e875dbe87a23ca5428bfda7c20825f3144dc78;hb=refs/heads/openwrt-19.07)

Unless i'm looking in the wrong spot?

Summary

Maybe that is the answer, it's explicitly disabled in small devices. In which case the answer is:
"Your device is low flash/ram (link to article), and this feature is disabled to help it continue to work. You may be able to reenable it in a custom build, but your success may vary. You might consider purchasing a more futureproof device".

But until someone confirms that either way...

2 Likes

???

I'm not sure what that means. As you see the file is present on [at least some devices running] 19.07.0.

  • Can you use a full sentence?
  • Can you consider using one thread?

On 06/18/6 version I found / proc / swaps

If you are trying to confuse people then you succeeded! You say 18.06 then you highlight a screenshot from 15.05!

Anyway, 15.05 is an old version and the firmware was likely much smaller. So it is possible that the swaps was removed from later versions as they grew in size.

I don't own this device so I can't confirm.

1 Like

The ramips/rt305x subtarget was classified as small_flash target with https://github.com/openwrt/openwrt/commit/cf7154db07c0b8746be290c9e11dcab3c91d237e - later the small_flash feature flag handling was extended to exclude, among others, swapfile support from the kernel to save further space in https://github.com/openwrt/openwrt/commit/11d6547455e848efb4fac0b983a07b11be5caf25

The solution to gain back swapfile support on rt350x is to create a custom build, with Global build settings -> Kernel build options -> [ ] Support for paging of anonymous memory (swap) enabled in make menuconfig.

5 Likes

Oh, not that screenshot (I updated) ...

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.