stich86/UF-Instant-Mod

Stick not accessible after the flash

Opened this issue · 20 comments

Hello! Thanks for all the work. I've followed your guide and here is the output I have:

# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 00040000 00001000 "boot"
mtd1: 00002000 00001000 "env"
mtd2: 00002000 00001000 "env2"
mtd3: 0003c000 00001000 "config"
mtd4: 00300000 00001000 "k0"
mtd5: 004b0000 00001000 "r0"
mtd6: 00300000 00001000 "k1"
mtd7: 004b0000 00001000 "r1"
mtd8: 00010000 00001000 "hw"
mtd9: 00010000 00001000 "sec"
mtd10: 00001000 00001000 "Partition_010"
mtd11: 00001000 00001000 "Partition_011"
mtd12: 00300000 00001000 "linux"
mtd13: 004b0000 00001000 "rootfs"

# nv getenv bootcount
bootcount=0
# nv getenv bootlimit
bootlimit=10

# nv getenv | grep sw_ver
sw_version0=v4.1.0.359-b87.191101.0940
sw_version1=v4.1.0.359-b87.191101.0940

# nv getenv | egrep "sw_active=|sw_commit="
sw_active=0
sw_commit=0

## I got it using wget from a local http server because nc wasn't available on v4.1.0.359-b87.191101.0940
wget http://192.168.196.95:5004/fw -O mtd7

# md5sum mtd7 
4ae50a56f5c4768ea5ac95d4298a01ba  mtd7

# flash_eraseall /dev/mtd3 && flash_eraseall /dev/mtd7
flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it
flash_erase: ubnt_eb_size = 4K

Erasing 4 Kibyte @ 3b000 -- 100 % complete 
flash_eraseall has been replaced by `flash_erase <mtddev> 0 0`; please use it
flash_erase: ubnt_eb_size = 4K

Erasing 4 Kibyte @ 4af000 -- 100 % complete 

# cat mtd7 > /dev/mtd7

nv setenv sw_active 1 && nv setenv sw_commit 1 && reboot

First, you will see that my stick was on v4.1.0 so it didn't had nc and I was able to pull the firmware from a local http server and the checksum match so I assumed it was ok.

When running the flash_eraseall besides the warning of deprecation and the suggestion to use flash_erase, it seems to have worked.

As soon as I set the partition to boot and reboot, the device never comes up.

A note regarding this stick is that I had the default ip changed to 192.168.196.5. So, should I expect it to reset to 192.168.1.1 after your roots is written? or would it preserve that setting? I'm asking it because neither the old or the default IPs are accessible anymore.

Any thoughts?

Thanks

Ok made progress. It IS booting. But after a few seconds it just shut down and I'm disconnected. So I tried to quickly login as soon as it boot to revert to the original partition which was stable.

However, I misread when you said "erase the config before reboot". Now it booted on what appear to be the original partition (SSH is enabled again) but the username/passwor (ubnt/ubnt) don't work anymore. I guess it is because I haven't deleted the config as you mentioned. 😢

Any thoughts on how to proceed to revive it? I got a CP2102 and another PL2303 UART/USB adapters. Both can do 3.3V ou 5V. Do you think they have enough power to enable the serial terminal without frying the SFP?

Thanks

Hi @galvesribeiro,
I'm planning to change the firmware and I have the very same version v4.1.0.359-b87.191101.0940 maybe I can do a backup and send it to you? No idea on how to do it but I open to suggestions :-D
I'm not able to connect via ssh, only telnet, any hints on how to enable ssh?

Thanks!

Thanks @amaduain. The problem is that I don't have probes and 0 soldering skills in a so tiny contact points to be able to use the UART port. I ordered two new sticks and they should arrive in the next few days.

The SSH I honestly don't remember how I've enabled. Its being an year since I did that :/

Need to check the Realtek docs somewhere to enable it.

Hi again @galvesribeiro, I was going to do the flash, but I'm worried about what you did wrong, I'm checking all the steps and it seems that you follow the instructions to the letter, but even so it didn't work for you, what was wrong?
Thx

yeah, make 100% sure you read all the steps specially this:

Please rember that if you go back to stock firmware, it's mandatory to erase mtd3 partion BEFORE rebooting.

@galvesribeiro
I successfully flashed it, and it is working, what I did is to upgrade first to the same version used in the tutorial, also I have the problem of the UI not working, but after configuring via CLI it is working fine.

@amaduain great! Just in time I received my two brand new UF-Instant sticks :)

So, how did you ended up enabling SSH? I'll need to do it now but no clue how I did it 😃

Just found out from my notes! To enable SSH, just run flash set SERVICE_SSH_ENABLE 1 and reboot. :)

Will try the update now. 🤞🏻

@amaduain

also I have the problem of the UI not working, but after configuring via CLI it is working fine.

What you did for the UI to work?

Awesome! It worked! Yay!

Now, the only things I'm missing here are:

  1. How to enable 2.5Gbps on UF-Instant with this custom rootfs
  2. How to enable SSH on this custom rootfs: On the stock 4.3.1 the flash set SERVICE_SSH_ENABLE 1 works. However, when using this rootfs, it doesn't.
  3. Since this is being used on my WAN port on UDM-PRO (SFP+ port 10), we don't have access to the GPON IP, meaning that no telnet/ssh or even web interface on it. Not critical, but would be good to be able to access the web UI.

Any thoughts on those points?

image

It doesn't report temperatures on UDM-PRO UI.

Damn. Missing kernel support. Ridiculous...

I bought one of the DFP-34X-2C2 xGPO modules suggested by that author. Lets see how it behaves.

@galvesribeiro Seems that UF-Instant do not support 2.5gbps :-( https://github.com/Anime4000/RTL960x/blob/main/Docs/2.5Gb.md

the chipset support it (it's the same used by LEOX LXT-010S-H and Technicolor AFM0003), but kernel support from UF is broken. May be it's a registry problem (because Leox had same issue on first firmware).

so ATM the UF-Instant cannot work @ 2.5GbE, and I don't think it will never work, beacuse HiSGMII is not so much standard :(

@stich86 ah ok. Understood. Well, let's hope the other one @Anime4000 suggested does work. But I think I'll have to upgrade to UDM-SE as I don't see 2.5G as a WAN option for the UDM-PRO anyway :(

Did anyone get to put the Ufiber Instant to work? I have a Ufiber Instant, i had change image 1 to the custom firmware and i can set the GPN_SN and ELAN_MAC_ADDR using the flash set command up until here it's ok.
But when testing the Ufiber instant connected to my ISP i cant pass the O2 state... and the gpon is always rebooting e wont last too mutch time connected....

What i have found until here.
With the original firmware if i do this command: gpon set serial-number PTIN 0x________ i do put on the ufiber my serial number and i can go from state o1 to state o5 i dont get internet because the gpon reboots the state to 02 and then goes again to state o5 lasts for some time and then she restarts the process this is i believe because off the ufiber instant having the original firware dosent work with other OLT's that are not from ubiquiti....

Now on the custom firmware chaging the GPN_SN, ELAN_MAC_ADDR and PON_VENDOR_ID i cant pass from state o2.... and i noticed that the gpon is always rebooting it self i'm always losing connecting to the ufiber instant. Even if i chage the gpon set serial-number as quick has i connect the fiber to the ufiber intant it reboots. This only happens on the custom firmware.

Does anyone have a clue why does this happens or what i could do to resolve this rebooting problem on the custom firmware ??