What's new

Best way to replace USB

  • 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!

sirzur

Occasional Visitor
I have a RT-AC86U with a 2GB USB drive attached. I don't stress the router much and only have and use diversion. The drive has a 1GB swap file and the rest is for jiffs storage. However, I am thinking that with more of Merlin's functionality going to be stored in jiffs, maybe 1GB is not enough and am thinking of replacing the drive. Is there a recommended way to replace the USB drive (as in clone the drive and expand the space outside the router) or is my best solution to do a complete reset of the router and start from fresh?
 
I would personally start fresh with the new USB stick but that's probably because I don't know my way around Linux and have no idea how to transfer the data to the new stick :)

Factory resetting your router and starting fresh is never a bad idea. If you haven't done a reset in a while now might be a good time.
 
I use a 2tb usb drive with a 20gb partition for jiffs, the rest for movies and stuff over the network. Works like a dream, can extend over 20gb if required but still 20 is overkill rn, seemed like a good number though.
 
JFFS is writable flash memory according to the wiki, so I fail to see what this has to with your USB drive?
 
New scripts require a 2GB swap file.

If starting 'fresh' is an option, do so.

Look in my signature below for the M&M Config and at my last few posts which have the best practice 2021 link too.
 
So to close the loop, I replaced the USB drive, but did not do a full reset. I was prepared to do a full reset if what I tried did not work, and in any case, I may well perform a full reset when I next upgrade to 386.3. Here is how I did it (on my RT-AC86U), with a lot of help from this thread


  • First off, you need a Linux PC. I have Ubuntu loaded on my spare old laptop
  • Format USB drive to NTFS file format on computer - you will lose existing data
  • Turn router off, remove the old USB drive and insert the newly formatted USB drive into a router USB port - I used the USB2 port on my RT-AC86U
    • Keep the old USB drive for now
  • Turn on router and use PuTTY to SSH into the router - my username and password is the same as the web GUI interface
  • Type 'amtm' without the quotes into PuTTY terminal and hit Enter
  • Using amtm's 'fd' command, format the USB drive to Ext4 with journaling and make sure to also label the drive.
  • Turn off router and remove USB drive
  • Plug both the old USB drive and new USB drive into Linux computer and copy the two directories from the old drive to the new drive
    • The two directories are 'entware' and 'old-jffs_scripts' on my drive (maybe yours maybe different
    • You need root priviledges to copy the entware directory. Use 'sudo nautilus' in terminal to open a file manager with root priviledge
    • I also had a swap file on my old USB drive - do not copy
  • Plugged new USB drive into router and turn on router
  • SSH to router, enter amtm and create a swap file using amtm's 'sw' command. The recommended size is 2GB size. Be patient. The swap file creation takes a while
  • Using amtm's 'dc' command, enable the disk checker utility
  • Reboot the router and make sure to check the disk checker log (using dcl command in amtm) to ensure the USB drive is OK
  • Re-install Diversion from amtm as it was trying to read drive statistics using the old USB drive name and complained that it could not find mount point
Good luck, but as always be prepared for the worse
 
I use Gparted in Linux to create a swap partition in the beginning of the thumb drive followed by an EXT4 format. Mount the swap with "swapon /dev/sda1" in the post-mount file. Swap files can become corrupt in time and ruin your day. At least that is my experience. And swap size seldom needs to be greater than RAM (if it needs to be larger than RAM consider not using the app that runs up the memory).
Just the opinion of an old guy...
 

Similar threads

Latest 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