L&LD
Part of the Furniture
This is a step-by-step guide that will show how to optimally set up a USB drive for Asus’ RMerlin powered routers that will at the very minimum allow for use of a swap file for your supported router. It will optionally install Entware properly too, all with the help of amtm by @thelonelycoder. The world of scripts will soon become child’s-play with these powerful tools and allow to make your network, more your own.
The full power and control this will give you over your network and clients have not fully been understood yet, but do not worry! Time will give to those who wait. In return, please consider any contribution you can to those that create and continue to support these scripts for us. They really and truly deserve our full support, including @RMerlin for providing such a powerful and stable platform for us to fully use and enjoy.
This guide will make a few assumptions to try to keep it as concise as possible. First, I am assuming that we are using a supported RMerlin Asus router. Second, I am assuming that your router is stable and is in a good/known state. Thirdly, I take no responsibility for what the following steps and scripts may potentially do to your router, your USB drive, or your network. Not that there is anything wrong with the steps or scripts as presented and used correctly, but I have no control over your use of these steps and scripts. Follow the steps closely, please ask questions if you need to ask, but the final decision and responsibilty to go ahead with this guide is yours alone. For support on these scripts, please use the appropriate thread that each developer has created for their script(s).
Hope this guide leads you a little more gently down the scripting path for some of the same rewarding discoveries I have found on it too. Let's begin.
Finally, amtm time! Like hammer time but with more up-to-date scripts.
Copy the 'curl' command from the Code box below.
Try this as a tip to copy the curl command fully without needing to scroll within the Code box:
But there is so much more to be had!
Installing Entware via amtm.
The full power and control this will give you over your network and clients have not fully been understood yet, but do not worry! Time will give to those who wait. In return, please consider any contribution you can to those that create and continue to support these scripts for us. They really and truly deserve our full support, including @RMerlin for providing such a powerful and stable platform for us to fully use and enjoy.
This guide will make a few assumptions to try to keep it as concise as possible. First, I am assuming that we are using a supported RMerlin Asus router. Second, I am assuming that your router is stable and is in a good/known state. Thirdly, I take no responsibility for what the following steps and scripts may potentially do to your router, your USB drive, or your network. Not that there is anything wrong with the steps or scripts as presented and used correctly, but I have no control over your use of these steps and scripts. Follow the steps closely, please ask questions if you need to ask, but the final decision and responsibilty to go ahead with this guide is yours alone. For support on these scripts, please use the appropriate thread that each developer has created for their script(s).
Hope this guide leads you a little more gently down the scripting path for some of the same rewarding discoveries I have found on it too. Let's begin.
Enable JFFS custom scripts and configs
- Go to Administration and select the System Tab
- Click 'Yes' to the 'Enable JFFS custom scripts and configs' option
- Click USB Mode option to use 'USB 2.0'
- Enable SSH to 'LAN Only'
- Change SSH Port to '51111'. (Example port number)
- We want to use a different 'default' than Port '22'
- Anything between '49152 - 65535' is allowed for Dynamic and/or Private Ports
- Make sure 'Allow Password Login' is 'Yes'
- Set 'Enable SSH Brute Force Protection' to 'Yes'
- Finally, make sure to hit the Apply Button at the bottom of the screen
Now, reboot the router, after it has booted up, wait at least 10 minutes for it to settle.
The CPU cores will be mostly idle when it is ready.
Okay, PuTTY! Download and install it from here (64bit) or here (32bit), for Windows PC's.The CPU cores will be mostly idle when it is ready.
- Startup PuTTY
- Type in your Router's IP address into the 'Host Name (or IP address)' box
- On default installs, this may be 192.168.1.1, or 192.168.50.1
- To verify which IP it is, on a Windows computer, open up a file explorer window, click on the 'Network' link in the left side of that window and then find and right-click on your router
- Click on the Network Device tab and verify that the IP address is the one you are typing into PuTTY
- Change the Port number to the one used above, the example I gave is '51111'
- Make sure that the connection type selected is SSH
- Type a meaningful name into the Saved Sessions box such as 'RT-AC86U-Home'
- Click the Save button on the right-hand side
- Click the Open button at the bottom
When Putty opens up, it should be asking for our user name.
Type in the user name you chose for the router.
Now, it should be asking for our password.
Type in the password you chose for your router and then hit enter.
Type in the password you chose for your router and then hit enter.
PuTTY won't show you typing in your password.
After you finish typing it in 'blind', just hit the Enter key on your keyboard.
After you finish typing it in 'blind', just hit the Enter key on your keyboard.
Tip: If you have your password saved in a text file on the desktop, copy it.
In the PuTTY screen, which is waiting for your password to be entered,
Left-Click once to select PuTTY, then, Right-Click to paste your password.
Hit Enter and you will be logged in.
In the PuTTY screen, which is waiting for your password to be entered,
Left-Click once to select PuTTY, then, Right-Click to paste your password.
Hit Enter and you will be logged in.
Finally, amtm time! Like hammer time but with more up-to-date scripts.
Copy the 'curl' command from the Code box below.
Code:
curl -Os https://raw.githubusercontent.com/decoderman/amtm/master/amtm && sh amtm
Try this as a tip to copy the curl command fully without needing to scroll within the Code box:
In the code box above, or from the amtm home page (I just copied it here for your convenience, it is the same code at this time), don't do a double click on the word 'curl' above, rather, do a triple click. The click-speed isn't too important, but when you do it properly, the whole command in the Code box will be selected.
Once it is selected, right-click on it and select copy. Then, at the command prompt in the PuTTY window (you're at the command prompt after entering your username and password), simply right-click to paste it. Then, hit Enter to execute the command.
Congratulations! You've installed your first script!
Prepare the USB Drive for the swap file, Entware, and scripts.Once it is selected, right-click on it and select copy. Then, at the command prompt in the PuTTY window (you're at the command prompt after entering your username and password), simply right-click to paste it. Then, hit Enter to execute the command.
Congratulations! You've installed your first script!
- If your USB drive is used, make sure to save all files off of it first
- Format it in your computer with the NTFS file format
- Insert the USB drive into a router USB port
- Use your PuTTY skills above to SSH into the router
- Type '/jffs/scripts/amtm' without the quotes and hit Enter
- Using amtm's 'fd' command, format the USB drive to Ext4 with journaling and
- Make sure to also Label the drive too. The router will reboot.
- Note: MIPS routers are limited to ext2 and ext3
- Create a swap file using amtm's 'sw' command. I recommend the 2GB size
- Be patient while this file is created. It will be worth it
- Using amtm's 'dc' command, enable the disk checker utility
- Reboot the router and make sure to check the disk checker log to ensure the USB drive 'passes'
But there is so much more to be had!
- SSH into the router with PuTTY
- Type '/jffs/scripts/amtm' without the quotes and hit Enter
- using amtm, install Entware
- Wait for Entware install to be completed
- Optionally, if Diversion is also required,
- Install Diversion (Lite) and it will properly install Entware or
- Install Diversion (Standard) and it will properly install Entware and pixelserv-tls too
By having amtm install Entware for us, Entware is guaranteed to start when booting up or inserting the USB drive into the router. This specialized behavior is also applied when installing Diversion on a USB drive that contained Entware that was previously installed by other methods than above.
amtm is still the preferred way to have Entware installed on your router!
There are many more scripts we can use to enhance our network-experience with our routers.
The next few posts will describe some of these and also which ones I use and recommend.
Including, in no particular order, scripts like YazFi, Skynet, spdMerlin,
FreshJR QOS, ntpMerlin, Diversion, pixelserv-tls, disk check, connmon, and scribe.
I will do my best to add new scripts in the posts below as I
discover them, if you don't discover them first!
Looking forward to hearing how these and future scripts help each
of us manage the networks we use daily in easier
and always more enjoyable ways.
This has been an
L&LD
Time Flies Production
v2019/04/21
amtm is still the preferred way to have Entware installed on your router!
There are many more scripts we can use to enhance our network-experience with our routers.
The next few posts will describe some of these and also which ones I use and recommend.
Including, in no particular order, scripts like YazFi, Skynet, spdMerlin,
FreshJR QOS, ntpMerlin, Diversion, pixelserv-tls, disk check, connmon, and scribe.
I will do my best to add new scripts in the posts below as I
discover them, if you don't discover them first!
Looking forward to hearing how these and future scripts help each
of us manage the networks we use daily in easier
and always more enjoyable ways.
This has been an
L&LD
Time Flies Production
v2019/04/21
Last edited: