New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FS#3646 - Unable to Swap /proc/swaps does not exist (ramips rt305x/) #8682
Comments
odmdas: Hi, xapukserge. A quick search showed that the swap option is enabled for all targets except those marked as small_flash [0].
rt305x is marked as small_flash [1].
small_flash feature flag was introduced in commit cf7154d. You can try building a modified OpenWrt with the swap option forcibly enabled and see if there is any worth. Especially on the upcoming 21.02 release with the 5.4 kernel. Post your results. [0] https://github.com/openwrt/openwrt/blob/v19.07.6/config/Config-kernel.in [1] https://github.com/openwrt/openwrt/blob/v19.07.6/target/linux/ramips/rt305x/target.mk |
Swap support is disabled for small_flash targets to save space. This isn't really a bug. |
I wonder if swap support can be provided as separate packages. Because now I have 3 MiB of free space on flash (Keenetic and Keenetic Lite b, 8 MiB flash size), but I'm short on RAM (32 MiB). Also I'm thinking about replacing flash and RAM chips, but rebuilding the kernel takes long and is a memory-hungry process, so it may be cheaper to throw the routers into garbage and buy new ones, instead of building an own kernel for every release. |
Unfortunately mtd devices can't be used as swap. You need block devices such as a USB flash drive for swap to work.
Agree :) |
|
xapukserge:
Device Dlink DIR320 rev.B1
OpenWrt 19.07.7 r11306-c4a6851c72 / LuCI openwrt-19.07 branch git-21.044.30835-34e0d65
Istalled packages:
block-mount
kmod-usb-core
kmod-usb2
kmod-usb-ohci
kmod-usb-storage
kmod-fs-ext4
zram-swap
swap-utils
How-to:
root@OpenWrt:~# mkswap /dev/sda1
mkswap: /dev/sda1: warning: wiping old swap signature.
Setting up swapspace version 1, size = 511 MiB (535818240 bytes)
no label, UUID=5413e04d-954e-493c-b26d-926a67af1bbc
root@OpenWrt:~# swapon -a
block: failed to swapon /dev/sda1
root@OpenWrt:~# cat /proc/swaps
cat: can't open '/proc/swaps': No such file or directory
So, I think, swap module was accidentally turned off during building firmware, because OpenWRT build version 18.06 works fine!
The text was updated successfully, but these errors were encountered: