Discussion in 'Asuswrt-Merlin' started by Fab30, Jan 21, 2013.
Hi, please, how can i configure autostart swap file on SD card?
is on /dev/sdb1. THX
How to setup a swap partition?
First: SDcard for swap is not a good idea - search the forum why this is so!
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
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...
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.
Separate names with a comma.