What's new

Rebootin Router with 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!

AntonK

Very Senior Member
Hi,
I'm using a USB drive in my router for the first time, to take advantage of features such as Diversion and Skynet.

When rebooting the router (either via the router's GUI or power cycling), must the USB drive be removed for the reboot process?

Thanks,
Anton
 
Seems like removing it would interfere with installed 3rd party packages that load during the reboot and need to to access it. Kinda counter-productive.

I take removal of USB devices to be a last resort, only when a problem happens.
 
Last edited:
Use one of the many free utilities to save an image of your USB stick so that if it gets corrupt, it only takes you a few minutes to write the image back.
Recommend that you add the disk check script in amtm
+1
 
@AntonK, for simple rebooting of the router, no, do not remove the USB drive. While you can 'Safely Remove' it from the GUI, how will you know at what point to plug it back in while it is rebooting? :)

But! I have been successfully using a different method to update routers for a while now (you may have already seen it in my recent posts).

Instead of rebooting the router/network and waiting 5 to 10 minutes to flash a new firmware (which is almost required for a router that is running for more than a couple of days with scripts installed), I do the following.

  • ssh into the router and fully update all scripts, including amtm and all non-amtm scripts such as unbound (currently) to their latest versions.
  • In the GUI, safely remove all USB drives you have connected to the router. Be patient, this may take a minute or more depending on how many scripts are running and for how long the router has been 'up'.
  • When the GUI comes back, I simply flash the latest firmware I want to use.
  • After the router has rebooted and is idling/stable again (5 to 15 minutes, depending on the hardware/configuration), I ssh into the router and verify that the scripts are working properly and also check one last time for updates.
  • At this point, I usually reboot the router (at around the 15 or 20-minute mark).
  • Finally, after an additional hour has passed, I reboot the router once again and usually don't need to touch the router/network until the next upgrade.
It doesn't hurt to 'Safely Remove' the USB drive(s) and, leaving them plugged in, reboot the router.

I would be leary of physically removing the drives ('Safely' or not) though. Even though amtm has made inserting a USB drive effectively bullet-proof, I am not one to tempt fate. :)

Using the GUI to safely remove the drive(s) and flash the newest firmware is a great time saver. And (to flash the actual firmware), only one reboot needed afterward. :)

The additional reboots I perform are for increased stability of the network. I have seen the router 'busy' configuring itself up to an hour afterward. I don't want to have to go back to a customer site just to reboot their network. ;)
 
@AntonK, for simple rebooting of the router, no, do not remove the USB drive. While you can 'Safely Remove' it from the GUI, how will you know at what point to plug it back in while it is rebooting? :)

But! I have been successfully using a different method to update routers for a while now (you may have already seen it in my recent posts).

Instead of rebooting the router/network and waiting 5 to 10 minutes to flash a new firmware (which is almost required for a router that is running for more than a couple of days with scripts installed), I do the following.

  • ssh into the router and fully update all scripts, including amtm and all non-amtm scripts such as unbound (currently) to their latest versions.
  • In the GUI, safely remove all USB drives you have connected to the router. Be patient, this may take a minute or more depending on how many scripts are running and for how long the router has been 'up'.
  • When the GUI comes back, I simply flash the latest firmware I want to use.
  • After the router has rebooted and is idling/stable again (5 to 15 minutes, depending on the hardware/configuration), I ssh into the router and verify that the scripts are working properly and also check one last time for updates.
  • At this point, I usually reboot the router (at around the 15 or 20-minute mark).
  • Finally, after an additional hour has passed, I reboot the router once again and usually don't need to touch the router/network until the next upgrade.
It doesn't hurt to 'Safely Remove' the USB drive(s) and, leaving them plugged in, reboot the router.

I would be leary of physically removing the drives ('Safely' or not) though. Even though amtm has made inserting a USB drive effectively bullet-proof, I am not one to tempt fate. :)

Using the GUI to safely remove the drive(s) and flash the newest firmware is a great time saver. And (to flash the actual firmware), only one reboot needed afterward. :)

The additional reboots I perform are for increased stability of the network. I have seen the router 'busy' configuring itself up to an hour afterward. I don't want to have to go back to a customer site just to reboot their network. ;)
Thank you, and thanks to all for your comments and experience/advice.

Much appreciated,
Anton
 
Seems like removing it would interfere with installed 3rd party packages that load during the reboot and need to to access it. Kinda counter-productive.
Not the ones I code. The amtm disk-check and Diversion (and with it Entware) start when the disk is mounted, irrespective of the procedure that ran before that - like a reboot.
But in the OP's case you are right, there is absolutely no need to remove an attached USB device before rebooting.
 
@AntonK, for simple rebooting of the router, no, do not remove the USB drive. While you can 'Safely Remove' it from the GUI, how will you know at what point to plug it back in while it is rebooting? :)

But! I have been successfully using a different method to update routers for a while now (you may have already seen it in my recent posts).

Instead of rebooting the router/network and waiting 5 to 10 minutes to flash a new firmware (which is almost required for a router that is running for more than a couple of days with scripts installed), I do the following.

  • ssh into the router and fully update all scripts, including amtm and all non-amtm scripts such as unbound (currently) to their latest versions.
  • In the GUI, safely remove all USB drives you have connected to the router. Be patient, this may take a minute or more depending on how many scripts are running and for how long the router has been 'up'.
  • When the GUI comes back, I simply flash the latest firmware I want to use.
  • After the router has rebooted and is idling/stable again (5 to 15 minutes, depending on the hardware/configuration), I ssh into the router and verify that the scripts are working properly and also check one last time for updates.
  • At this point, I usually reboot the router (at around the 15 or 20-minute mark).
  • Finally, after an additional hour has passed, I reboot the router once again and usually don't need to touch the router/network until the next upgrade.
It doesn't hurt to 'Safely Remove' the USB drive(s) and, leaving them plugged in, reboot the router.

I would be leary of physically removing the drives ('Safely' or not) though. Even though amtm has made inserting a USB drive effectively bullet-proof, I am not one to tempt fate. :)

Using the GUI to safely remove the drive(s) and flash the newest firmware is a great time saver. And (to flash the actual firmware), only one reboot needed afterward. :)

The additional reboots I perform are for increased stability of the network. I have seen the router 'busy' configuring itself up to an hour afterward. I don't want to have to go back to a customer site just to reboot their network. ;)

Thanks for this guide. But a question, in your comment:
I ssh into the router and verify that the scripts are working properly
how do you check that the scripts are working fine from ssh? I am only aware of checking the logs (Skynet, etc), and Tools (ntpMerlin) from the GUI.
 
@TonyK132 this is just a fairly simple check that the scripts are 'alive'. Using amtm (another script that we're testing too, of course) I launch each installed script, check for updates, check the disk checker log and otherwise just use the menus of each script to ensure that they are working.

In the GUI, I also further verify that the logs are working properly (as I'm using scribe) and that the graphs make 'sense' too.

Further/deeper testing is usually not needed if the above quick checks have passed. :)
 
@AntonK, for simple rebooting of the router, no, do not remove the USB drive. While you can 'Safely Remove' it from the GUI, how will you know at what point to plug it back in while it is rebooting? :)

But! I have been successfully using a different method to update routers for a while now (you may have already seen it in my recent posts).

Instead of rebooting the router/network and waiting 5 to 10 minutes to flash a new firmware (which is almost required for a router that is running for more than a couple of days with scripts installed), I do the following.

  • ssh into the router and fully update all scripts, including amtm and all non-amtm scripts such as unbound (currently) to their latest versions.
  • In the GUI, safely remove all USB drives you have connected to the router. Be patient, this may take a minute or more depending on how many scripts are running and for how long the router has been 'up'.
  • When the GUI comes back, I simply flash the latest firmware I want to use.
  • After the router has rebooted and is idling/stable again (5 to 15 minutes, depending on the hardware/configuration), I ssh into the router and verify that the scripts are working properly and also check one last time for updates.
  • At this point, I usually reboot the router (at around the 15 or 20-minute mark).
  • Finally, after an additional hour has passed, I reboot the router once again and usually don't need to touch the router/network until the next upgrade.
It doesn't hurt to 'Safely Remove' the USB drive(s) and, leaving them plugged in, reboot the router.

I would be leary of physically removing the drives ('Safely' or not) though. Even though amtm has made inserting a USB drive effectively bullet-proof, I am not one to tempt fate. :)

Using the GUI to safely remove the drive(s) and flash the newest firmware is a great time saver. And (to flash the actual firmware), only one reboot needed afterward. :)

The additional reboots I perform are for increased stability of the network. I have seen the router 'busy' configuring itself up to an hour afterward. I don't want to have to go back to a customer site just to reboot their network. ;)

hello @L&LD

i have a ac3100 and just did a dirty upgrade from alpha to beta version. i performed your steps as recommended but now i dont see amtm at all when in ssh.
usb is indeed attached and shows on the web gui

can you please advise?
 
@andresmorago in PuTTY, try typing unalias amtm and hit enter.

Now, typing amtm should bring the menu up. :)
 
thanks so much. it works now.
this scared the heck out of me. its the first time that occurs to me. why did it happen?
 
@andresmorago, this is called progress and the restructuring of the underlying code of how everything will work together into the future. :)
 

Similar threads

Sign Up For SNBForums Daily Digest

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