Dismiss Notice

Welcome To SNBForums

SNBForums is a community for anyone who wants to learn about or discuss the latest in wireless routers, network storage and the ins and outs of building and maintaining a small network.

If you'd like to post a question, simply register and have at it!

While you're at it, please check out SmallNetBuilder for product reviews and our famous Router Charts, Ranker and plenty more!


Discussion in 'Asuswrt-Merlin' started by Fab30, Jan 21, 2013.

  1. Fab30

    Fab30 Regular Contributor

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

    joegreat Very Senior Member

    Jan 9, 2013
    Vienna, Austria
    How to setup a swap partition?


    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:
  3. brusyev

    brusyev Occasional Visitor

    Jul 17, 2013
    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: Jul 12, 2014
  4. lwizard

    lwizard Regular Contributor

    Jan 27, 2014
    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.

Share This Page