UF-Instant-Mod icon indicating copy to clipboard operation
UF-Instant-Mod copied to clipboard

Stick not accessible after the flash

Open galvesribeiro opened this issue 1 year ago • 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

galvesribeiro avatar Mar 02 '23 18:03 galvesribeiro