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!

MerlinAU MerlinAU v1.5.6 - The Ultimate Firmware Auto-Updater (WEBUI + GNUTON SUPPORT!)

Just wandering as Backupmon does a daily backup of my router settings, could I revert to an earlier setting as a solution?
Not sure if it backs up password.
Just really frustrated how the password could have changed.

The password will be the same one you use for SSH. They should not be different.

If you can access SSH, you should be able to access the WebUI, unless something is fundamentally more broken as mentioned by @Ripshod .

From the MerlinAU angle, the question remains, does validating the password with the TAB key over SSH display the correct password? Does checking the username using the nvram command I provided match what you were expecting? If not, that would be the first thing to drill into.

Yes backupmon backs up your router credentials, but any backupmon questions should generally be directed to its own thread.
 
That said, BACKUPMON would likely be your get-out clause. Wind back, see what happens.
 
For SSH I don't use a password, just public key.
From the MerlinAU angle, the TAB key displayed a similar password except there was an extra characacter and the first character was lower case.
So I can now login to the gui with the password displayed by the TAB key.
Thank you very much.
The only explanation is I must have changed the password and not updated Bitwarden password manager! Which is very unlike me.
 
For SSH I don't use a password, just public key.
From the MerlinAU angle, the TAB key displayed a similar password except there was an extra characacter and the first character was lower case.
So I can now login to the gui with the password displayed by the TAB key.
Thank you very much.
The only explanation is I must have changed the password and not updated Bitwarden password manager! Which is very unlike me.

Things happen, I sometimes do something similar with my password manager at the office, and then shoot myself in the foot down the line when I require that password.

I'm happy we were able to help you narrow it down. Enjoy!
 
Tried to update my RT-AX3000 today using MerlinAU 1.5.6 but the update failed. The log mentions that the flash/reboot occurred at 12:13:27. I waited for almost 18 minutes and finally rebooted the router physically at 12:31:57, at which point it came back up, but was at the old firmware. I was trying to go from 3004.388.9_2 to 3004.388.10_2.

Log attached.
 

Attachments

Last edited:
Tried to update my RT-AX3000 today using MerlinAU 1.5.6 but the update failed. The log mentions that the flash/reboot occurred at 12:13:27. I waited for almost 28 minutes and finally rebooted the router physically at 12:31:57, at which point it came back up, but was at the old firmware. I was trying to go from 3004.388.9_2 to 3004.388.10_2.

Log attached.

Can you send me the entire log file please when you can? That log file is missing most of the steps.

As well as your system logs.
Did you try again? Did it work the second time if you did?
 
Sorry, not sure why it truncated the log. Here is the full MerlinAU file. Also attached is the syslog from when I SSH'd into the router to update MerlinAU until after the manual reboot. I see a lot of failures to unmount the flash drive, I think.

I will try again but won't be able to until about 9 hours from now, the internet needs to stay up during the day.
 

Attachments

Would this be why?
Code:
2025-11-09 12:08:42 The firmware update to 3004.388.10.2 version is currently postponed for 199 day(s).
2025-11-09 12:08:42 The firmware update is expected to occur on 2026-05-19 00:00:00.
 
Sorry, not sure why it truncated the log. Here is the full MerlinAU file. Also attached is the syslog from when I SSH'd into the router to update MerlinAU until after the manual reboot. I see a lot of failures to unmount the flash drive, I think.

I will try again but won't be able to until about 9 hours from now, the internet needs to stay up during the day.

Are you downloading the firmware to your entware directory by chance? Or is this just a USB called entware?

Code:
2025-11-09 12:12:05 -----------------------------------------------------------
2025-11-09 12:12:05 Archive:  /tmp/mnt/entware/MerlinAU.d/RT-AX58U_firmware/RT-AX58U_firmware.zip
2025-11-09 12:12:05   Length      Date    Time    Name
2025-11-09 12:12:05 ---------  ---------- -----   ----

If so, can you try changing it to the default mount directory in the MerlinAU settings before you try again?

Thanks!

Would this be why?
Code:
2025-11-09 12:08:42 The firmware update to 3004.388.10.2 version is currently postponed for 199 day(s).
2025-11-09 12:08:42 The firmware update is expected to occur on 2026-05-19 00:00:00.

No, he manually pushed through the update even though he has a very long postpone period. (I.e essentially making it not auto-update but manual update instead)
 
Sorry, not sure why it truncated the log. Here is the full MerlinAU file. Also attached is the syslog from when I SSH'd into the router to update MerlinAU until after the manual reboot. I see a lot of failures to unmount the flash drive, I think.

I will try again but won't be able to until about 9 hours from now, the internet needs to stay up during the day.

According to the system logs you sent, I don't even see an attempt at flashing the firmware.

It goes from this:

Code:
Nov  9 12:13:56 ejusb: USB partition unmounted from /tmp/mnt/entware fail. (return -1, Device or resource busy)

To rebooting (I'm assuming your manual reboot around 12:31)

Usually it should say that it's starting an upgrade and getting an upgrade signal,

Code:
Jul 22 12:26:40 rc_service: start_upgrade.

but I don't see it in your logs. Did you cut anything out of these logs or is this really how it was?

Can you confirm you updated your MerlinAU password to match whatever the router web interface is using? (If you changed it pre-emptively for the new password requirements in 388.10?)
 
Last edited:
Continuing my previous message, I do see these in your logs:

Nov 9 12:12:26 [MerlinAU] 21058: Router Web URL is: http://router.lan
Nov 9 12:12:34 rstats[1798]: Problem loading /mnt/storage/tomato_rstats_a85e450f7000.gz. Still trying...

Question:

Is "http://router.lan" actually accessible to get to the WebUI if you try manually?
Not sure what the problem loading tomato_rstats is about?... That's a new one for me.
 
Last edited:
Would this be why?
Code:
2025-11-09 12:08:42 The firmware update to 3004.388.10.2 version is currently postponed for 199 day(s).
2025-11-09 12:08:42 The firmware update is expected to occur on 2026-05-19 00:00:00.
That shouldn't be the problem. I do have a 199 day delay set, but I checked the box in the web UI to ignore the delay and force update.

but I don't see it in your logs. Did you cut anything out of these logs or is this really how it was?

Can you confirm you updated your MerlinAU password to match whatever the router web interface is using? (If you changed it pre-emptively for the new password requirements in 388.10?)
I didn't cut anything, all lines are included from the start to the end. I have no idea why the log suddenly switches to Oct 16 directly after that line you quoted, but that's what the download from the router's admin page gave me.

I have not changed my router password, so it still matches the one in MerlinAU.

Question:

Is "http://router.lan" actually accessible to get to the WebUI if you try manually?
Not sure what the problem loading tomato_rstats is about?... That's a new one for me.
I have no idea about the tomato_rstats, but I did see in some changelogs for other AMTM plugins that legacy tomato code was removed recently, so probably something with that?
"router.lan" is accessible in a browser. I believe it is set here:
1762748078809.png
 
Last edited:
Sorry, not sure why it truncated the log. Here is the full MerlinAU file. Also attached is the syslog from when I SSH'd into the router to update MerlinAU until after the manual reboot. I see a lot of failures to unmount the flash drive, I think.
AFAICT, based on my review of the syslog that was provided, the F/W update failed because the script was unable to unmount/eject the USB-attached drive, which is the final step to start flashing the F/W image. The syslog shows that spdMerlin initiated a speedtest almost at the same time that MerlinAU was launched, so at some point during the speedtest, SQLite3 must have been executing to update the database, which uses a directory on the USB drive for temporary files and log, and this was likely the reason the USB drive was "busy" and, therefore, could not be unmounted.
Rich (BB code):
....
Nov  9 12:13:27 [MerlinAU] 21058: Post-update email notification hook was added successfully to '/jffs/scripts/services-start' script.
Nov  9 12:13:27 [MerlinAU] 21058: Flashing RT-AX58U_3004_388.10_2_puresqubi.w... Please wait for reboot in about 4 minutes or less.
Nov  9 12:13:34 ejusb[12751]: USB partition unmounted from /tmp/mnt/entware fail. (return -1, Device or resource busy)
Nov  9 12:13:38 spdMerlin_[31610]: Calculated Download speed (553417 Kbps) does not exceed 10% threshold of existing value (584221 Kbps)
Nov  9 12:13:38 spdMerlin_[31610]: Calculated Upload speed (344617 Kbps) does not exceed 10% threshold of existing value (330070 Kbps)
Nov  9 12:13:41 avahi-daemon[14026]: Alias name "RT-AX3000" successfully established.
Nov  9 12:13:41 ejusb: USB partition unmounted from /tmp/mnt/entware fail. (return -1, Device or resource busy)
Nov  9 12:13:42 ejusb: USB partition unmounted from /tmp/mnt/entware fail. (return -1, Device or resource busy)
...
I'll write a function to monitor more closely the state of the USB drive, and will report status messages while waiting for the drive to become "idle" before initiating the F/W flash. If nothing else, at least the function will log entries that may provide more clues to what is happening at that point during such scenarios.

My 2 cents.
 
AFAICT, based on my review of the syslog that was provided, the F/W update failed because the script was unable to unmount/eject the USB-attached drive...
That was my unprofessional guess as well, after reading the logs.
I'll write a function to monitor more closely the state of the USB drive, and will report status messages while waiting for the drive to become "idle" before initiating the F/W flash. If nothing else, at least the function will log entries that may provide more clues to what is happening at that point during such scenarios.
That would definitely be helpful. I don't know how much collaboration there is between different plugins, but perhaps a signal could be sent to spdMerlin and connman (and perhaps others) to suspend all tests for the duration of the update? Perhaps the cron stuff that MerlinAU does should already take care of that, so maybe it's a bit of a race condition that can't be avoided?
 
That would definitely be helpful. I don't know how much collaboration there is between different plugins, but perhaps a signal could be sent to spdMerlin and connman (and perhaps others) to suspend all tests for the duration of the update? Perhaps the cron stuff that MerlinAU does should already take care of that, so maybe it's a bit of a race condition that can't be avoided?
It might be worth taking a look at that idea. But, like you said, there's always the possibility of a race condition where both processes are started virtually simultaneously, and once spdmerlin launches a speed test, followed by SQLite3 calls to process the resulting data to update the database entries, it may not be as simple as just killing the process.

For now, I think we'll just try to wait until the USB drive becomes "idle" to continue with the F/W flash.
 
For now, I think we'll just try to wait until the USB drive becomes "idle" to continue with the F/W flash.
And after a certain time period just mark the upgrade as failed, inform the user, and rollback whatever prep work MerlinAU did? It wouldn't do to have it waiting forever, if something got stuck. I don't know if that time period needs to be user configurable, but maybe 15 minutes is a reasonable default?
 
Just tried to run the update again, making sure this time to avoid spdMerlin's schedule, and it completed successfully in about 5 minutes. I'm now on 3004.388.10.2. FYI, the logs don't show any lines containing rc_service: start_upgrade. Are you sure that's part of an upgrade?
 

Attachments

Are you sure that's part of an upgrade?

Well it's not part of a downgrade ;) (just kidding it actually is)
Yes I'm sure, however your device isn't displaying that log message when upgrading, it's no matter as this log clearly shows an upgrade starting compared to the old one.

The old one only showed a reboot, which is why the time changed to Oct 16 before the time synced.
Happy we seem to have confirmation it's a busy USB device which was the intial theory as mentioned here:

According to the system logs you sent, I don't even see an attempt at flashing the firmware.
It goes from this:

Code:
Nov  9 12:13:56 ejusb: USB partition unmounted from /tmp/mnt/entware fail. (return -1, Device or resource busy)

To rebooting (I'm assuming your manual reboot around 12:31)

which could also be tested/validated by changing the directory to use the default local directory on the router instead of the USB as suggested here:

Or is this just a USB called entware?

Code:
2025-11-09 12:12:05 -----------------------------------------------------------
2025-11-09 12:12:05 Archive:  /tmp/mnt/entware/MerlinAU.d/RT-AX58U_firmware/RT-AX58U_firmware.zip
2025-11-09 12:12:05   Length      Date    Time    Name
2025-11-09 12:12:05 ---------  ---------- -----   ----

If so, can you try changing it to the default mount directory in the MerlinAU settings before you try again?
 
Last edited:
which could also be tested/validated by changing the directory to use the default local directory on the router instead of the USB as suggested here:
I thought about it, but I was pretty sure it was spdMerlin locking the drive, not MerlinAU itself. If the update had failed again, I would've tried changing MerlinAU's save path. FWIW, the default path is /tmp/mnt/entware:
1762763030532.png
 
FWIW, the default path is /tmp/mnt/entware:
View attachment 68839

The default local directory, instead of the one on the USB.
Which would be: /home/root as found below:

Code:
 #---------------------------------------------------------#
    # If the expected directory path for the ZIP file is not
    # found, we select the $HOME path instead as a temporary
    # fallback. This should work if free RAM is >= ~150MB.
    #---------------------------------------------------------#
    if [ ! -d "$FW_ZIP_BASE_DIR" ]
    then
        Say "Expected directory path $FW_ZIP_BASE_DIR is NOT found."
        Say "Using temporary fallback directory: /home/root"
        "$inMenuMode" && { _WaitForYESorNO_ "Continue?" || return 1 ; }
        # Continue #
        _SetUp_FW_UpdateZIP_DirectoryPaths_ "/home/root"
    fi

Any tmp/mnt directory is a default USB directory
For now we will simply test the theory of adding a 4-minute wait until the USB becomes idle
 

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!

Staff online

Back
Top