Have I bricked my Ubiquity UniFi 6 LR?

While following these install instructions: https://openwrt.org/toh/ubiquiti/unifi_6_lr I missed a critical part of the command below

$ dd if=/dev/zero bs=1 count=1 of=/dev/mtdblock6

I accidentally left out the "count=1" option and instead of writing just one record it wrote 64k records. I'm sure this can't be good.

I am still connected via my PC and have an active ssh open. Can I recover?

no problem, reinstall stock firmware with tftp. redo the process from the beginning.

Shoot I was hoping somebody could dd /dev/mntblock6 to a file and send it to me. The author of the install instructions makes it sound like it's easy to break the case trying to get it open.

Don't have an LR so I don't know for sure. But the original contents is most likely the same as many other Unifi devices: a 32bit integer with values 0 or 1 telling the bootloader which kernel to boot, followed by the magic value 0x2be84da3. The rest is empty. One problem is that the endianness of the magic varies. This is a Unifi AP AC Pro:

root@unifiac2:~#  hexdump -C /dev/mtd7ro
00000000  00 00 00 00 a3 4d e8 2b  00 00 00 00 00 00 00 00  |.....M.+........|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|

This is a Unifi 6 Lite:

root@u6-1:~# hexdump -C /dev/mtd4ro
00000000  00 00 00 00 2b e8 4d a3  ff ff ff ff ff ff ff ff  |....+.M.........|
00000010  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff  |................|

I am guessing that the system will boot fine with the error you did, but I cannot guarantee that and I do think you're wise waiting instead of gambling...

But for the next time: Don't skip the backup step. Doing a mistake/typo like this during first-time install happens all the time. Having backups is important. OK, I know that doesn't help you now. Just stating it here for the next person reading this thread.

@bmork, thank you so much for the information you provided. Before I saw your reply I had gone through the trouble of removing the cover. Once inside I saw further disassembly was necessary to expose the serial pins, at which point I saw your reply.

Since I was still connected (yeah I know stupid removing the cover while it was powered up but I was careful) I decided to try to fix mtdblock6 using the data from your Unifi 6 Lite. I created an 8 byte file and wrote that to mtdblock6, being careful to set the bs and count parameters properly this time. :smiley:

After a reboot I'm happy to say I'm now running OpenWRT on the 6 LR.

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.