What's new

Swap,fstab

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

How to setup a swap partition?

Hi, please, how can i configure autostart swap file on SD card?
is on /dev/sdb1. THX

Hi,

First: SDcard for swap is not a good idea - search the forum why this is so! :confused:

Secound: As your router has a kind of Linux installed you can use the standard Linux commands for the job!
You need to partition your USB device with fdisk command to have a swap partition, then you can use swapon command to enable the swap.

With Merlin's firmware you can enable it automatically via user-script (e.g. pre-mount wloud be a good place).

So: Some searching in the forum and Google will give you all you need!
And: You will learn real(!) Linux. :)

With kind regards
Joe :cool:
 
I am in the same boat where my router constantly runs out of resources when I sync files to my drive attached to RTN66U. I also have a class 10 sd card installed inside the router. I searched the forum and did not find any posts to why it is bad to use it as swap...I tried to implement pre-mount scipt and was not able to get it to work....I do have my SD card formated as ext2...
 
Last edited:
Generally it's a bed idea because flash memories have a limited RW life. So a SWAP partition on them makes their life much shorter.
But if the memory is cheap I think you could consider giving a try (but I don't know whether a read failure on SWAP could bring a crash in linux or not).

Also if you set a swap partition in linux you must avoid formatting it. Another option is to format it and use a swap file.
 
Similar threads
Thread starter Title Forum Replies Date
pmcarrion Solved No Swap file detected Asuswrt-Merlin 13
M How to boot config swap on USB Asuswrt-Merlin 2

Similar threads

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top