Ubiquiti Jefferson filesystem problem

Hi all I am trying to recover my previous configuration in an airgrid M5 HP which also included several custom scripts that I would not like to lose. After reading the entire firmware contained in the flash via UART. I tried to extract it with binwalk. The Squash filesystem is successfully unpacked and I get all the folders and files. The Jffs2 filesystem seems to be unpacked correctly but I only get an empty folder. Since I assume that my configuration files are included in this filesystem, how can I solve this problem? On my PC I tried to install Jefferson several times since it is among the tools required by binwalk the installation completes perfectly but i keep getting the empty folder from jefferson. Any advice is appreciated

are you asking us why Jefferson won't install on your PC ?

No, jefferson is installed in my pc, I'm asking why I get an empty folder from jefferson? while from squash I get all the folders and firmware files perfectly

Jefferson is not made here.

1 Like

Hi, sure of course I know that the jefferson tool was not created here. With my post I am trying to understand what could have happened so that I receive an empty folder on jffs2. Is it possible that there is some other type of compression or encryption applied by the firmware itself that I am not aware of? I accept any advice, maybe someone has already encountered the same problem as me. Thanks regards

We are as good at guessing as you.

1 Like

Tried simply mounting the fs using another Openwrt device, assuming it ran Openwrt at that point, that is.

How that crap is related to OpenWrt in any way. At all.

Hi, yes I already tried and had the same problem. Another test I did to see if the problem was the jefferson tool or not was to extract this image https://github.com/Sq00ky/Dumping-Router-Firmware-Image/, in this case I got the jffs2-root folder with all the related files and subfolders without any problem.

Why do you say this? What reason would I have then to write in this forum?

plese post the output of

ubus call system board

from your OpenWrt device

I can't execute any command on the device because it seems to be bricked. As announced in my post I'm trying to recover the old configuration. I extracted the firmware via UART

No openwrt involved at all?

Only u-boot commands can be executed

Ask ubiquity

1 Like

It is likely that at some point in the bricking process, the jffs partition was indeed erased and reformatted to an empty filesystem. These devices have a remote reset button feature which can be falsely activated by a short in the Ethernet cable such as water getting into a connector.

If the Ethernet still works you can use serial to command a tftp transfer of an initramfs OpenWrt image then boot it from RAM. From this you could then further inspect or download the mtd partitions and possibly live-mount the jffs. Booting an initramfs does not initially alter the flash.

Hi, thanks for this precious help, it seems to me a great way to try to recover the configuration, but I have some questions. Where can I find a specific OpenWrt initramfs image for my device? What commands are allowed to not alter my flash? For example, does mounting partitions alter my flash? Is there a way to inspect mtd, jffs partitions without mounting them?

try https://firmware-selector.openwrt.org/?version=SNAPSHOT&target=ath79%2Fgeneric&id=ubnt_nanostation-loco-m-xw

all that won't do any writing.

you can always mount -o ro (read only).

hex editor, or create a dump using dd or some other tool, manipulate the dump.

I don't see builds specifically for the Airgrid M5 but if it is the later XW version it is probably the same hardware platform as the Nanostation Loco M5 (XW) in a dish form factor. https://downloads.openwrt.org/releases/24.10.0/targets/ath79/generic/openwrt-24.10.0-ath79-generic-ubnt_nanostation-loco-m-xw-initramfs-kernel.bin
If it is an earlier XM version with AR7140 SoC (instead of AR9344) that was not ported to ath79 so you'll need to go back to 19.07/ar71xx.