[Solved] Few questions about OpenWrt on AC58U

Really escuse me, but I can't wait ~12 hours at a time. PM has a limit of 10 hours here I think. I will delete ome of the accounts as soom as I can.

Before this same apply&save worked perfectly without issuing roll back and it did mot show the red button.

The first boot failure is always : can't format (or whatever it is called) , /overlay. Will be formated on next mount. Then an error for I think /dev/root.

Again, when I tried returning to stock for a third time, 192.168.1.1 was showing luci error can't load the interface (i checked, no caching, the router was showing that... Wtf...) AND the ASUS interface on router asus com.....

I will come back with an edit after I try to create a file in etc config.

Please email me at alex9457sn@gmail.com or alex945@protonmail.com . Yea this is a public forum but I never cared about privacy, there is no privacy on the net afterall in the last 15 years. Probably only if someone uses double-encrypted messaages over a vpn :slight_smile:

Can't think here. The computer tells you right on the screen. Guessing on things like partitions will brick routers. Again, copy and paste, please.

You'll have to wait ~10-12 hours, sorry. You should use your available posts more wisely.

I also said this in another PM:

Are you connected by wireless, by any chance?

It appears you're disabling a wireless interface or something...?

I'm almost sure if you make a change that causes the web GUI to loose connection, the new roll back will take affect.

...another suggestion, follow the exact same process when you got:

You can also make your changes on command line.

No, everything was done wired. Disabling that wireless interface was done automatically by that rollback, I actually tried to turn wifi on, as that's the first thing I usually do.

The same thing worked perfectly on the same firmware, before I had that faithful factory reset screw things up. Do you suggest there might be something wring with luci or something? But why it worked before then?

Yeah I know. I didn't make hugely grotesque guesses so far :slight_smile:

I have some photos of what you asked for. Were taken with phone this time, pc has no internet rn unless I tether the phone to it. Again router is running the same, latest, 18.06.

Creating file in etc config now works for whatever reason.

i.imgur. com/u6y3IqX.jpg

Firstboot also works now, no more error. How in the hell it works, this can't be real

i.imgur. com/4thPbuh.jpg

----- Wait it fixed itself------

Wait, I just issued some mount commands regarding ubi0 6, they were all errored, but now the damn thing works, it applies changes.

Another restart and another factory reset of openwrt, it works!!!!

-------------Oh, but now df is showing that it writes to /tmp, is that wrong?

I'm installing adblock for luci, space used from 1% to 2%on tmp

https://i.imgur.com/efBJqqz.jpg

It's funny how the router gets scared when someone is taking a screenshot.

That's perfectly OK. Your free space in the LuCI picture looks OK too.

Consider marking this thread as solved by editing the title (from your original account) and appending "[SOLVED]" to the beginning.

Haha that is literally the only explanation :slight_smile: The router has it's own social/emotional processing engine hidden somewhere

I'm also getting some usage on dev/ubi 0 6 after I installed all packages and apps.

Thanks a lot for your help! Now I know routers n networking a little better. And have a more stable installation of openwrt than before. Will mark as solved.

1 Like

@The_Hitman @The_Hitman2 - very glad to hear everything is solved for now. If you continue to experience this unwanted rollbacks I'd be interested to learn more about the issue to see if things need to be fixed.

Feel free to ping me when this happens.

1 Like

@jow I think it was the data partition not being mounted correctly with the ubi volume - possibly because the russians who initially ported LEDE for this router required, at first, to wipe jffs2 for the data to save properly. Somehow with that factory reset it triggered something that was wrong fron the beginning. What was it, I don't know :slight_smile:

So again, I issued some mount commands, they were more or less random and all of them had errors of "unrecognized", but it might have "put it back in it's senses". Firstboot worked at first try, and I even tried it again, the rollback/inability is gone

I'll continue to mess around with this router, because this AC58U is a relatively new model.

I'm actually curious, how can I dump all the ubi volumes and make them available here? I want to know more about my router, if you have the time to go through them of course :slight_smile:

Thanks to you too, also!

I already posted how you backup UBI partitions:

You repeat the step for each partition.

Although, I'll admit to you, I'm not curious nor interested in the device's stock firmware. I will suggest the program Binwalk if you still wish to explore it further.

Glad you got it working.

The easy, but slightly cheesy way would be to:

  1. Login into the RT-AC58U Luci
  2. navigate to System -> LED Configuration
  3. Press the green "Add" Button on the bottom
  4. Scroll down to the newly created LED entry
  5. Select "rt-ac58u:blue:status" for the "LED Name"
  6. Select "switch0" as the "Trigger"
  7. Set "Switch Port Mask" to 0
  8. Press "Save & Apply"

This should put the status/power LED to sleep for most of the time. The setting will also kinda work after a reboot. Of course, the power/status LEDs will still flash as usual during the boot process or when flashing a new image, etc...

Yep, dd can kill. There's a great thing about this particular router design though: ASUS treated the RT-AC58U with a dedicated small u-boot flash chip (which is marked as read-only by the DT). So it is possible to completely erase the SPI-NAND chip and still be able to recover the device with just a serial-console adapter.

Well, I'm a bit late. well maybe someone else will find this useful.

The problem is related to ASUS' decision how it allocated the flash and implemented the firmware upgrade procedure. They are sadly at odds with OpenWrt's way of doing these things. So the OpenWrt install is a two-stage process. The "install" image from zyxmon is trying to be compatible with ASUS' decisions. This is only meant so one can get at least a foot in the door via the "live-demo" that is the install/factory image. It has a working ssh and it's easier to revert back to stock.... but in this state, it will always forget the changes made to the system (all configuration/uploaded file/manually installed apps from opkg are gone after a reboot).

So a second sysupgrade step is needed to install the real/proper/full OpenWrt. And for this to work the jffs2 (and/or linux2) ubi partitions have to be removed since ASUS left no free space.

1 Like

I didn't know about Binwalk, thanks. When I have the time I'll mess around with it a little more and try to see what can I contribute to the project.

It's working now perfectly for the last three days, all the firewall rules work, adblock/ddns are stable, wifi is strong like a rock with only 500 mw. So it's a good improvement, and thank you again for helping me un-fu..... things :slight_smile:

Yep, that worked. Didn't see the status light listed there for the first time. All led's are off now and it only flashes a bit when I reboot the router. Big improvement over stock where they will turn on back after a reboot.

Very good design in this, this is really a good quality budget router.

Thank you so much, this helped clear things up in my mind. So jffs2 gets replaced for the overlay.
My only big question now is: How in the earth, when I restored stock firmware, were both the openwrt and asus stock interfaces accessible? Albeit openwrt was just sowing an error with pink background. Does some junk data remain stored on the router?

1 Like

yes, that's the rootfs_data partition.

ASUS stock firmware is backed up in the linux2.... and as long as you don't delete it, there's a chance that the RT-AC58U will boot it, if there's a problem with the linux1 OpenWrt installation. That's how you can end up with both. You can delete linux2 if you want, but the u-boot on the RT-AC58U will complain about it when it's missing.

could be related to this:

https://forum.openwrt.org/t/asus-rt-ac58u-and-openwrt-18-06-problem
(definitely a flash that has gone bad. But sadly no info as to why exactly.)

I tried to reproduce this on my unit, but my RT-AC58U comes up after the reboot without any damaged files.

Thank you man, or dear sir, however you like it :slight_smile: What I thought was that it was exactly the opposite, linux2 for additional firmware. But no, linux1 is being "updated" with the custom firmware, openwrt in our case and linux2 keeps a backup.

Now I understand why also there was needed to remove linux2 in going back to stock.

I've noticed that when stock firmware is restored all it's settings are kept, so if they are most likely in linux2 then I will remove it. I'll come back to tell you if the router behaves the same without linux2.

Do you know anything about the factory1/factory 2 partitions? I hadn't had the time to explore them. Why are they two, and why are they exactly the same size?

It's working perfectly now, but it was just strange. I probably just messed around with it too much, being rather stupid in the process :))

LE: Wait, now I see that linux(1) is only 2 MB, and linux2 is 48 MB. Is it still ok to remove it?

My best guess in this case is that openwrt (only the system, not the data which is stored in rootfs_data and tmp) is only being stored in the 2mb linux partition and the 2.6mb rootfs partition?

I'm glad I could help. It would be nice if more rt-ac58u/ipq40xx users would stick around in the forums though.

There's more to this. ASUS extensively modified the device u-boot to the point it's becoming deleterious. For example, there's additional logic to verify the ubi volume on the flash on each boot. So much so, that if it fails it could repartition the nand and restore the original layout, which of course would brick the OpenWrt installation. So just in case, make a backup of your configuration (see Luci's backup option) and keep a recovery image ready.

It's a little bit different. The OEM firmware stores its configuration (network, wifi, services, ... you name it) in the tiny nvram partition. So if you go back to stock, you'll find that "nothing" has changed, since the OpenWrt image does not touch the nvram partition.

Factory2 is a backup of Factory1. As for its content: The calibration data for the 2.4GHz and 5GHz Wifi is stored in there. So please do not delete those. In fact, make a backup.
(I'm telling this, because I already had to restore the Factory1+2 partitions twice. In both cases the full NAND got corrupted to due a brown-out and an accidental short.)

On the ASUS firmware, both linux1 and linux2 have the same size. This is because ASUS decided to include kernel+dtb+ramdisk(rootfs) into the linux1/2 volume. The ramdisk there is a big problem, because the 128MiB RAM of the device is not enough for the memory-hungry dual ath10k-wifis. So the OpenWrt image is done differently to not use any rootfs ramdisks. Hence only the kernel+dtb are stored in the linux1 volume (which is why it's much smaller). The static rootfs data (squashfs) and the dynamic overlay rootfs_data each get their own volume.

@The_Hitman Hi there,
Could you please let me know whether the "Restoring stock (factory) firmware" works? I just want to restore the router back to stock since I did not have any experience with openwrt. It would be great if you could post an instruction on how to do it. I am not sure how to follow the post on "http://lede-ac58u.zyxmon.org/HowToFlashENG.html".

Thanks

Now that I have installed 18.06 the wireless does not show up in Network interface. Not sure what's wrong. I have used firstboot as well.

Wireless always appeared in Wireless, not Interfaces.

BTW, wireless is disabled by default.

How to enable Wireless. I do not have wireless option in Network. NoWireless

I have tried many things.
Firstboot.
deleted jffs2 and everything else suggested here.
Used wifi config command, which creates blank wireless file, but no more.
Restored existing wireless file from snapshot time. Nothing seems to be working. Looks like radio is not detected. Any inputs would be greatly appreciated.

With older wireless config, when I add Iface, it says wireless not associated. everything else works.

That means the wireless cards are not being detected by the system. So, if the file /etc/config/wireless exists, it's probably empty.

Can you connect through SSH and post the output from the command # dmesg | grep ath10k?

If you can't connect through SSH, you can look for relevant info, about ath10k, using the web interface under status -> Kernel Log

Thanks for replying. I ran the code, and the output is as below. I had gone back to stock, but came back to run this. Really want to onboard the latest stable firmware. This started happening when I upgraded one one of snapshot builds, couple of months back, and have been on stock since then. Try to come back to lede, however everytime face this issue, and then go back to stock.

root@OpenWrt:~# dmesg | grep ath10k
[   23.881366] ath10k_ahb a000000.wifi: Direct firmware load for ath10k/pre-cal-ahb-a000000.wifi.bin failed with error -2
[   23.881412] ath10k_ahb a000000.wifi: Falling back to user helper
[   24.310350] ath10k_ahb a000000.wifi: Direct firmware load for ath10k/QCA4019/hw1.0/firmware-6.bin failed with error -2
[   24.310396] ath10k_ahb a000000.wifi: Falling back to user helper
[   24.388876] firmware ath10k!QCA4019!hw1.0!firmware-6.bin: firmware_loading_store: map pages failed
[   25.539817] ath10k_ahb a000000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
[   25.539864] ath10k_ahb a000000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 1
[   25.551391] ath10k_ahb a000000.wifi: firmware ver 10.4-3.4-00104 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast,no-ps crc32 6c332c67
[   25.622703] ath10k_ahb a000000.wifi: failed to fetch board data for bus=ahb,bmi-chip-id=0,bmi-board-id=31,variant=RT-AC58U from ath10k/QCA4019/hw1.0/board-2.bin
[   25.623033] ath10k_ahb a000000.wifi: Direct firmware load for ath10k/QCA4019/hw1.0/board.bin failed with error -2
[   25.636195] ath10k_ahb a000000.wifi: Falling back to user helper
[   25.676341] firmware ath10k!QCA4019!hw1.0!board.bin: firmware_loading_store: map pages failed
[   25.676563] ath10k_ahb a000000.wifi: failed to fetch board-2.bin or board.bin from ath10k/QCA4019/hw1.0
[   25.683951] ath10k_ahb a000000.wifi: failed to fetch board file: -11
[   25.693369] ath10k_ahb a000000.wifi: could not probe fw (-11)
[   25.880678] ath10k_ahb a800000.wifi: Direct firmware load for ath10k/pre-cal-ahb-a800000.wifi.bin failed with error -2
[   25.880722] ath10k_ahb a800000.wifi: Falling back to user helper
[   26.260747] ath10k_ahb a800000.wifi: Direct firmware load for ath10k/QCA4019/hw1.0/firmware-6.bin failed with error -2
[   26.260792] ath10k_ahb a800000.wifi: Falling back to user helper
[   26.310658] firmware ath10k!QCA4019!hw1.0!firmware-6.bin: firmware_loading_store: map pages failed
[   26.312704] ath10k_ahb a800000.wifi: qca4019 hw1.0 target 0x01000000 chip_id 0x003b00ff sub 0000:0000
[   26.318559] ath10k_ahb a800000.wifi: kconfig debug 0 debugfs 1 tracing 0 dfs 1 testmode 1
[   26.332330] ath10k_ahb a800000.wifi: firmware ver 10.4-3.4-00104 api 5 features no-p2p,mfp,peer-flow-ctrl,btcoex-param,allows-mesh-bcast,no-ps crc32 6c332c67
[   26.377731] ath10k_ahb a800000.wifi: failed to fetch board data for bus=ahb,bmi-chip-id=0,bmi-board-id=31,variant=RT-AC58U from ath10k/QCA4019/hw1.0/board-2.bin
[   26.377937] ath10k_ahb a800000.wifi: Direct firmware load for ath10k/QCA4019/hw1.0/board.bin failed with error -2
[   26.391211] ath10k_ahb a800000.wifi: Falling back to user helper
[   26.435318] firmware ath10k!QCA4019!hw1.0!board.bin: firmware_loading_store: map pages failed
[   26.435544] ath10k_ahb a800000.wifi: failed to fetch board-2.bin or board.bin from ath10k/QCA4019/hw1.0
[   26.442916] ath10k_ahb a800000.wifi: failed to fetch board file: -11
[   26.452299] ath10k_ahb a800000.wifi: could not probe fw (-11)

@chunkeey i have seen your posts regarding this problem in different threads. Would you know of a solution?