What's new
  • 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!

Doesn't matter how much is used, it's how much the scripts may demand (instantaneously).

Skynet requires a 2GB swap file for a long time now.

This isn't an OS. Do a clean install.

Format the USB drive in a computer in NTFS format. Format the JFFS partition on the next reboot and reboot the router at least twice more in the next 10 minutes.

Use the amtm Step-by-Step Guide to install the scripts needed (amtm is already installed, so skip those steps).
 
Can't. It's at the far end of a VPN I'm managing remotely for a year.
laugh.gif
hsdance.gif
 
Well. Tried this technique so I could update one of my routers from 1GB to 2GB, but it just auto-recreates a 1GB file immediately after selecting "delete." So. Not sure what to do about this.
(Edit: My 3200 was already 2GB, but my 86Us both have 1GB /swap)
Who is "it"? I am not aware that amtm, Diversion or Skynet can auto-create a swap file when missing.
 
@JaimeZX, can someone help you on the remote end via Skype, etc.?
 
Who is "it"? I am not aware that amtm, Diversion or Skynet can auto-create a swap file when missing.
In AMTM and Diversion, if I type "sw" then I get

Swap file found at:
/tmp/mnt/YourMom/myswap.swp

Delete the Swap file? [1=Yes e=Exit]


Assuming I have shut down Diversion and Skynet, I can [1], and then get:

Swap file deleted:
/tmp/mnt/YourMom/myswap.swp
Added missing swap file entry to
/jffs/scripts/post-mount


So if I type "sw" again, I'm right back to:

Swap file found at:
/tmp/mnt/YourMom/myswap.swp

Delete the Swap file? [1=Yes e=Exit]


So either it's not actually deleting myswap.swp or it's recreating it immediately afterwards.

@JaimeZX, can someone help you on the remote end via Skype, etc.?
Well, my wife is there and reasonably tech-savvy, but if anything goes sideways I lose an extremely useful VPN and the ability to remote-manage that whole network for six months. Prefer not to risk it. ;)
 
The likely scenario @JaimeZX is that the 1GB swap file never got deleted because it was in use at the time of deletion.
Diversion and amtm have checks built in that auto-write the missing entries to the user files and enable an existing swap file. But never auto-create a new file.
 
Sounds reasonable. Is there a technique you'd recommend for replacing a 1GB swap with a 2GB one from the other side of the planet? Or just leave it alone for six months? :)
 
Assuming I have shut down Diversion and Skynet, I can [1], and then get:

Swap file deleted:
/tmp/mnt/YourMom/myswap.swp
Added missing swap file entry to
/jffs/scripts/post-mount
The message "Swap file deleted:" is printed by default, there is no check that the file was in fact removed.
So my previous comment comes into effect: amtm or Diversion found a swap file without the references in the user files and did what needed to be done.
 
Sounds reasonable. Is there a technique you'd recommend for replacing a 1GB swap with a 2GB one from the other side of the planet? Or just leave it alone for six months? :)
Try this:
Open the router Webui, in Tools you'll find how big and how much of your swap file is in use.
With Diversion and Skynet disabled, run
Code:
sync; echo 3 > /proc/sys/vm/drop_caches
and run swapoff -a repeadetly until the WebUI says "No swap file configured".
Then delete the swap file with rm -f /tmp/mnt/YourMom/myswap.swp.
Then open amtm to create a new file.
 
Try this:
Open the router Webui, in Tools you'll find how big and how much of your swap file is in use.
Interestingly, before doing anything it was already 0.00 / 1024.00MB

Code:
sync; echo 3 > /proc/sys/vm/drop_caches
and run swapoff -a repeadetly until the WebUI says "No swap file configured".
Then delete the swap file with rm -f /tmp/mnt/YourMom/myswap.swp.
Then open amtm to create a new file.
Solid.

SEEMS to have been successful. Skynet and Diversion fired up just fine. Unbound still not working / trying a reinstall at this time. Thanks much for the assist!!
 
Interestingly, before doing anything it was already 0.00 / 1024.00MB


Solid.

SEEMS to have been successful. Skynet and Diversion fired up just fine. Unbound still not working / trying a reinstall at this time. Thanks much for the assist!!
If the Diversion, amtm, Skynet and WebUI say there's a 2GB swap file, then one can reasonably assume that this is indeed the case.
 
I just discovered this thread via your very informative L&LD | SmallNetBuilder Forums list and have a couple of questions, 1) is it advantageous to have a swap for our router and 2) what is an ideal USB drive to place it on?

I'm actually in the market for network storage (DAS/NAS can't decide) but I have an older WD Passport and have read these and others like them, e.g. their Elements drives have their own built in spin down protocols etc., many thanks for putting this 101 list together.
 
Last edited:
You're welcome @GK59. On the latest routers (RT-AC86U, RT-AX88U, RT-AX86U) and even a couple of the older ones (RT-AC3100 and others that have 1.4GHz processors or faster), I recommend the 128GB or larger Patriot Elite USB drives. I myself am using the 512GB version which I find to be the most responsive of that lineup. I also use amtm to partition it and only use half for amtm + Entware + swap file + Scripts (the rest I leave 'empty' for better/longer nand lifetime).

I would suggest a NAS, (I prefer QNAP), and to use an iSCSI LUN (Thick) and map it with iSCSI Initiator on your computer, formatting it as you see fit. The data transfer is fast over 2.5GbE network Ports or above, and the data stays protected with the multiple drives on the NAS. Of course, make sure only one iSCSI Initiator is used per mapped Initiator (otherwise, data corruption will happen unless you're using Cloud or Enterprise level OS/software Cluster Aware solutions).

I wouldn't go with a DAS myself unless it was also a NAS (with full functionality of a NAS too). Such narrowly focused options (like a 'repeater', etc.) are just money that you burn through quickly with no real options after you've outgrown them (except to dispose of them at huge discounts).

For your first question (which I almost forgot to answer!), yes, you need a swap file. Skynet for one won't work without it. I don't think Diversion or Entware will either (and currently, Skynet requires a 2GB swap file).
 
You're welcome @GK59. On the latest routers (RT-AC86U, RT-AX88U, RT-AX86U) and even a couple of the older ones (RT-AC3100 and others that have 1.4GHz processors or faster), I recommend the 128GB or larger Patriot Elite USB drives. I myself am using the 512GB version which I find to be the most responsive of that lineup. I also use amtm to partition it and only use half for amtm + Entware + swap file + Scripts (the rest I leave 'empty' for better/longer nand lifetime).

I would suggest a NAS, (I prefer QNAP), and to use an iSCSI LUN (Thick) and map it with iSCSI Initiator on your computer, formatting it as you see fit. The data transfer is fast over 2.5GbE network Ports or above, and the data stays protected with the multiple drives on the NAS. Of course, make sure only one iSCSI Initiator is used per mapped Initiator (otherwise, data corruption will happen unless you're using Cloud or Enterprise level OS/software Cluster Aware solutions).

I wouldn't go with a DAS myself unless it was also a NAS (with full functionality of a NAS too). Such narrowly focused options (like a 'repeater', etc.) are just money that you burn through quickly with no real options after you've outgrown them (except to dispose of them at huge discounts).

For your first question (which I almost forgot to answer!), yes, you need a swap file. Skynet for one won't work without it. I don't think Diversion or Entware will either (and currently, Skynet requires a 2GB swap file).
@L&LD, really appreciate the detailed response, regarding the Patriot drives are you referring to the Supersonic Rage line? sorry my phone isn't cooperating with my responses here...
 
You're welcome @GK59. On the latest routers (RT-AC86U, RT-AX88U, RT-AX86U) and even a couple of the older ones (RT-AC3100 and others that have 1.4GHz processors or faster), I recommend the 128GB or larger Patriot Elite USB drives. I myself am using the 512GB version which I find to be the most responsive of that lineup. I also use amtm to partition it and only use half for amtm + Entware + swap file + Scripts (the rest I leave 'empty' for better/longer nand lifetime).

I would suggest a NAS, (I prefer QNAP), and to use an iSCSI LUN (Thick) and map it with iSCSI Initiator on your computer, formatting it as you see fit. The data transfer is fast over 2.5GbE network Ports or above, and the data stays protected with the multiple drives on the NAS. Of course, make sure only one iSCSI Initiator is used per mapped Initiator (otherwise, data corruption will happen unless you're using Cloud or Enterprise level OS/software Cluster Aware solutions).

I wouldn't go with a DAS myself unless it was also a NAS (with full functionality of a NAS too). Such narrowly focused options (like a 'repeater', etc.) are just money that you burn through quickly with no real options after you've outgrown them (except to dispose of them at huge discounts).

For your first question (which I almost forgot to answer!), yes, you need a swap file. Skynet for one won't work without it. I don't think Diversion or Entware will either (and currently, Skynet requires a 2GB swap file).
bingo, just what I have up on my app, thank you so much for the link!
 
That's the one I'm using. :)
 
I also have a WD MyPassport 1TB that I wiped with Parted Magic and reformatted NTFS I might try before the Patriot. I read some reviews on the Patriots and some were having issues with it and R/W breaking or freezing, have you experienced any of this?

So followed all the directions in your OP, for preparing the drive, seemed to go well but after router reboot I get this:

Code:
xxxxxxx@RT-AX86U-xxxx:/tmp/home/root# /jffs/scripts/amtm

-sh: /jffs/scripts/amtm: not found

ahh figured it out, had to type 'amtm'

Code:
amtm
amtm 3.1.8 FW             by thelonelycoder
RT-AX86U (aarch64) FW-386.1 @ 192.168.xxx.xxx
    The Asuswrt-Merlin Terminal Menu

fd run      Format disk         fdl show log

i  show     all available scripts or tools
u  check    for script updates

    amtm options
e  exit      t  theme   r  reset   a  about
_____________________________________________

Enter option  sw
_____________________________________________

This creates a Swap file.
A Swap file is useful when the router
runs out of memory (RAM).
See router WebUI/Tools under Memory.
_____________________________________________

Continue? [1=Yes e=Exit] 1

_____________________________________________

Listing compatible device(s) for a Swap file

1. /tmp/mnt/AX86U_SWAP

Select device [1-1 e=Exit] 1
_____________________________________________

creating Swap file on /tmp/mnt/AX86U_SWAP

Continue? [1=Yes e=Exit] 1
_____________________________________________

Select a Swap file size

1.  1 GB
2.  2 GB (recommended)

Enter size [1-2 e=Exit] 2
_____________________________________________

Creating the Swap file,
this will take some time...

Code:
2097152+0 records in
2097152+0 records out
Setting up swapspace version 1, size = 2147479552 bytes
UUID=9b1ab8f4-fca3-4deb-88ca-947a34d6b48c
amtm 3.1.8 FW             by thelonelycoder
RT-AX86U (aarch64) FW-386.1 @ 192.168.xxx.xxx
    The Asuswrt-Merlin Terminal Menu

fd run      Format disk         fdl show log
sw manage   Swap file /mnt/AX86U_SWAP 2.0G

i  show     all available scripts or tools
u  check    for script updates

    amtm options
e  exit      t  theme   r  reset   a  about
_____________________________________________

Swap file created and activated at:
/tmp/mnt/AX86U_SWAP/myswap.swp
_____________________________________________

Enter option  dc
_____________________________________________

This installs the disk-check script
on this router.
It runs a filesystem check on compatible
USB storage devices before they are mounted.

Authors: ColinTaylor, thelonelycoder, latenitetech
https://github.com/RMerl/asuswrt-merlin/wiki/USB-Disk-Check-at-Boot-or-Hot-Plug                                              -(improved-version)
https://github.com/RMerl/asuswrt-merlin/wiki/USB-Disk-Check-at-Boot
_____________________________________________

Continue? [1=Yes e=Exit] 1
amtm 3.1.8 FW             by thelonelycoder
RT-AX86U (aarch64) FW-386.1 @ 192.168.xxx.xxx
    The Asuswrt-Merlin Terminal Menu

dc manage   Disk check script
fd run      Format disk         fdl show log
sw manage   Swap file /mnt/AX86U_SWAP 2.0G

i  show     all available scripts or tools
u  check    for script updates

    amtm options
e  exit      t  theme   r  reset   a  about
_____________________________________________

Disk check script installed.
The check log can be viewed with dcl.

Getting from fwupdate.asuswrt-merlin.net
- Module disk_check.mod downloaded
_____________________________________________

Enter option  dcl
amtm 3.1.8 FW             by thelonelycoder
RT-AX86U (aarch64) FW-386.1 @ 192.168.xxx.xxx
    The Asuswrt-Merlin Terminal Menu

dc manage   Disk check script
fd run      Format disk         fdl show log
sw manage   Swap file /mnt/AX86U_SWAP 2.0G

i  show     all available scripts or tools
u  check    for script updates

    amtm options
e  exit      t  theme   r  reset   a  about
_____________________________________________

No amtm-disk-check.log found

Enter option  dc
_____________________________________________

Disk check options

1. Remove Disk check script
2. Add disk check exclusion

Enter selection [1-2 e=Exit] 2
_____________________________________________

Listing compatible devices to exclude in
the disk check script.

  sda Western Digital My Passport 25E1 (1000.2 GB)

1.  /dev/sda1  mounted as  /tmp/mnt/AX86U_SWAP  UUID="4aa115a1-a27f-4794-99a9-a57fbdb536a8"

Select device to exclude [1-1 e=Exit] e
_____________________________________________

Disk check options

1. Remove Disk check script
2. Add disk check exclusion

Enter selection [1-2 e=Exit]

rebooted router,

Code:
Enter option  dcl

---------------------------------------------------
amtm-disk-check.log has this content:

START FILE, --- lines are not part of file
---------------------------------------------------

Wed Dec 30 10:20:34 MST 2020 Probing 'ext4' on device /dev/sda1
Running disk check v2.9, with command 'e2fsck -p' on /dev/sda1
AX86U_SWAP: recovering journal
AX86U_SWAP: clean, 24/61046784 files, 4636249/244181967 blocks
Wed Dec 30 10:20:35 MST 2020 Disk check done on /dev/sda1
---------------------------------------------------
END FILE

_____________________________________________

Delete log file now? [1=Yes e=Exit]

Code:
Enter option  i
 amtm 3.1.8 FW             by thelonelycoder
 RT-AX86U (aarch64) FW-386.1 @ 192.168.50.1
    The Asuswrt-Merlin Terminal Menu

 1  install  Diversion - the Router Adblocker
 2  install  Skynet - the Router Firewall
 3  install  FlexQoS - Flexible QoS Enhancement
 3d install  FreshJR QOS - Adaptive QOS (deprecated)

 4  install  YazFi - enhanced guest WiFi
 5  install  scribe - syslog-ng and logrotate
 6  install  x3mRouting - Selective Routing

 7  install  unbound Manager - unbound utility
 8  install  nsrum - NVRAM Save/Restore Utility

 j1 install  connmon - Internet uptime monitor
 j2 install  ntpMerlin - NTP Daemon
 j3 install  scMerlin - Quick access control

 j4 install  spdMerlin - Automatic speedtest
 j5 install  uiDivStats - Diversion WebUI stats
 j6 install  uiScribe - WebUI for scribe logs

 di install  dnscrypt installer
 ep install  Entware - Software repository

 dc manage   Disk check script   dcl show log
 fd run      Format disk         fdl show log
 lc install  LED control - Scheduled LED control
 rs enable   Reboot scheduler
 sw manage   Swap file /mnt/AX86U_SWAP 2.0G

 i  hide     inactive scripts or tools

    amtm options
 e  exit      t  theme   r  reset   a  about
_____________________________________________

 Enter option  ep
_____________________________________________

 This installs Entware - the ultimate Software repository
 on this router.

 If you plan to install Diversion on this
 router, install Diversion first.
 It includes the installation of Entware.

 Author: thelonelycoder
_____________________________________________

 Continue? [1=Yes e=Exit]
 
Last edited:
No, the Elite drives I've used for myself and for many customers have been working flawlessly and noticeably faster and more robust than the older RAGE series.

I don't think that an HDD is a promising idea for amtm + Entware + swap file + scripts. Let us know how it works (I'm guessing not particularly good). :)
 

Similar threads

Support SNBForums w/ Amazon

If you'd like to support SNBForums, just use this link and buy anything on Amazon. Thanks!

Sign Up For SNBForums Daily Digest

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