Upcoming Maintenance Alert:

The UBNT Community will be upgraded at 5pm MDT on April 25th. During this time the community forums will be set to read-only status.

Learn more

×
Reply
Emerging Member
Posts: 51
Registered: ‎01-08-2014
Kudos: 3
Solutions: 1

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

This is also a good tutorial, writing from a Mac user perspective, but really, the process isn't that Mac-centric.  Mainly the TFTP portion is Mac-ish.

http://rmoff.net/2016/06/08/reviving-a-bricked-edgerouter-lite-erl-from-a-mac/

He just does a good job narrating the experience.  I assume you have a serial connection to the ERL already: the important part here is inturrupting the boot process to drop into the bootloader console.  You should see console output indicating there is a USB device mounted and ready for action (doesn't matter what's on it at this point, as long as it is formatted correctly).  

 

If you have a USB device that doesn't become ready quickly enough, then you won't see it as mounted in the console output.  If you do a warm reboot at that point from the command line, and again go into the boot console, you'll probably see the drive mounted since it is already "up" at that point.

 

If that is the case, it means you need to introduce a delay in the cold start boot process to give the USB drive time to get ready.  There is a configuration line called "bootcmd" that needs to be edited to add the delay.

 

View your bootcmd settings with the command printenv bootcmd

You'll see one long line, something like:

'fatload usb 0 $loadaddr vmlinux.64;bootoctlinux $loadaddr coremask=0x3 root=/dev/sda2 rootdelay=15 rw rootsqimg=squashfs.img rootsqwdir=w mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@3072k(eeprom)'

Note the apostrophes!

This is from my ERL; yours may look different!  In particular, the 3072k(eeprom) is 1024k(eeprom) on some units.  Don't know what that part is doing, and I've tried my ERL's with both and didn't notice an obvious difference.  Until one night it exploded while trying to read a non-existant part of the eeprom...

 

Edit your bootcmd in a text editior by adding sleep 10;usb reset; to the beginning of the string.

It will now look like:

'sleep 10;usb reset;fatload usb 0 $loadaddr vmlinux.64;bootoctlinux $loadaddr coremask=0x3 root=/dev/sda2 rootdelay=15 rw rootsqimg=squashfs.img rootsqwdir=w mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@3072k(eeprom)'

 

Put it in the ERL using the setenv bootcmd command.  Just paste:

setenv bootcmd 'sleep 10;usb reset;fatload usb 0 $loadaddr vmlinux.64;bootoctlinux $loadaddr coremask=0x3 root=/dev/sda2 rootdelay=15 rw rootsqimg=squashfs.img rootsqwdir=w mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@3072k(eeprom)'

 

Use command save to commit it, followed by a reset to restart everything.

The console output should now show a 10 second pause, then the USB device mounted and available.

 

You can putter with the sleep value if feeling compulsive; it is probably excessive at 10 seconds.

 

Hope this helps!

Emerging Member
Posts: 57
Registered: ‎01-03-2014
Kudos: 17
Solutions: 4

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

Thanks ssisak

Emerging Member
Posts: 51
Registered: ‎01-08-2014
Kudos: 3
Solutions: 1

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

You're welcome!

 

Flash memory is pretty dang robust, esp. if all you are doing is reading it.  It's the writes that are more finite.  I've rarely had flash die in any gadget; this whole mess with the ER's dying seems to be more about a batch of bad drives UBNT used.  In other words, I don't think you will have this problem again.  (He said, hopefully.)

New Member
Posts: 27
Registered: ‎10-28-2014
Kudos: 1

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

For me it was working with a Kingston DataTraveller 16GB G2 model, see picture. Quite easy to open at the rear end (e.g. with a sharp knife)

THX to all for the great contributions to this forum

U_KingstonDataTraveler16GB_G3.jpg
U_5POE_16GB.jpg
New Member
Posts: 27
Registered: ‎10-28-2014
Kudos: 1

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

Kingston DT 16GB G3
New Member
Posts: 6
Registered: ‎02-08-2017

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

thanks for the reponse.  USB is this an internal bus? My device does nto have a USB port.  Anyways I can make it as far as here:

 

Enter EdgeOS image url: ftp://10.91.19.5/pub/ER-e100.v1.2.0.4574253.tar
  % Total    % Received % Xferd  Average Speed   Time    Time     Time  Current
                                 Dload  Upload   Total   Spent    Left  Speed
100 68.3M  100 68.3M    0     0  8319k      0  0:00:08  0:00:08 --:--:-- 6318k

However I think my corporate firewall may be blocking it.  Is there a procedure to write to the flash after I have booted from the RAM?  How can I load any image into the flash?

Regular Member
Posts: 323
Registered: ‎05-21-2014
Kudos: 32
Solutions: 5

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

Yes, it is an internal device. You will need to remove the top of the case to see the USB stick.

Member
Posts: 200
Registered: ‎07-14-2015
Kudos: 12
Solutions: 4

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

Hi

Whenever I try to do this,it will automatically reset and I never get the chance to save and reset....

This is what I entered:
setenv bootcmd sleep10;usb reset;fatload usb 0 $loadaddr vmlinux.64;bootoctlinux $loadaddr coremask=0x3 root=/dev/sda2 rootdelay=15 rw rootsqimg=squashfs.img rootsqwdir=w mtdparts=phys_mapped_flash:512k(boot0),512k(boot1),64k@1024k(eeprom)

Would appreciate your advice?

Cheers

Andy
New Member
Posts: 27
Registered: ‎10-28-2014
Kudos: 1

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

I loaded the usb stick connected to my laptop using PassMark imageUSB software. Then changed the hardware into the Edgerouter POE, see picture above. After that I updated to the latest version 1.9.1 and went back to my settings with my latest saved config settings. See also the earlier posts in this thread. It migh help to read it completely.

New Member
Posts: 6
Registered: ‎02-08-2017

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

My issue was finally solved by using tftp and not ftp
New Member
Posts: 3
Registered: ‎02-06-2017

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

Hi all. Who can clearly explain why I have "counterfeit" error after restore usb. I installed 3 ap's lr, and wanted to buy better router. And after upgrade firmware I have this error. On this forum I only saw that ubnt exchange device if it has warranty. but if this heppend and there is no warrany? I read on some forum that there is a digital sing in firmware. I think that this problem can be solved by flashing bios chip wich present on the board. Does someone have bios firmware for ERL?

New Member
Posts: 6
Registered: ‎02-08-2017

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

Im not sure what you mean by counterfeit error but at the top of this page is a post that describes recovering a bricked ERL.  It contains a link that has a good description of the procedure.  Wtihin that link there is another link to the binary that gets programmed into the Flash memory.  Luckily the Cavium Octeon has a separate NOR flash containing Uboot so this recovery is possible.  It took me a day or two to work  it out......good luck

Emerging Member
Posts: 51
Registered: ‎01-08-2014
Kudos: 3
Solutions: 1

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

The issue is that I and others have un-bricked their ERL's as described above and elsewhere.  They work fine, but the command line then shows an error A13 and the GUI in the system tab does not show a "Genunine Ubiquiti" graphic in the UR corner.  No idea if this impacts actual operation in some way, but it's another reason I won't use their stuff in production settings

New Member
Posts: 27
Registered: ‎10-28-2014
Kudos: 1

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

I also do not exactly understand your issue, internal USB defective? It clearly would help to ready the complete thread, there are links to the binary and descriptions how to do. I would not recommend to all persons. I used imageUSB by PassMark Software to add the image to a Kingston USB stick, then opened the device (EdgeRouter POE) and changed the internal USB stick. Checkout this site also: https://hilo90mhz.com/ubiquiti-edgerouter-lite-erlite-3-internal-usb-storage-fail/
Regular Member
Posts: 504
Registered: ‎03-03-2012
Kudos: 126
Solutions: 11

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

This helped me revive an ERL in the lab that refused to boot with Kernel panic - not syncing: VFS: Unable to mount root fs on unknown-block(8,2).

 

I did a emrk-reinstall so the USB drive would get reformatted.

 

It works for now and I'll have an eye on future boot messages.

New Member
Posts: 1
Registered: ‎03-21-2017

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

A little commentary about the Initialization error A12 I have seen pop up on my router since i swapped its (failed) USB stick with  a different one: 

The original USB stick must have some sort of signature that walidates the router as "authentic". Some sort of file or checksum. I confirmed this by loading version 1.0.2 of the firmware on one of my USB sticks and putting it in to the edgerouter. Where i had an "Initialization error A12" I got a "Counterfeit warning" instead. Moreover, inside the filesystem there is a file called Error-A12 that can be deleted and the system tab of the GUI appears clean, the initial CLI still shows it however. ("Linux Error-A12" blurb) As an editorial comment I would suggest against such a checksum being present in the router, it's unnecessary in my opinion. Just my €.02

New Member
Posts: 20
Registered: ‎01-26-2015
Kudos: 8

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

If it helps, I formatted the drive with Disk Utility on macOS and dropped the image on from there and did not get an "authentic" warning -- was using a SanDisk drive. See my replay many pages back for details.

New Member
Posts: 15
Registered: ‎04-17-2015
Kudos: 3

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

Well, I had to reboot an ERLite due to rewiring power and got this wonderful error.

 

SQUASHFS error: Unable to read data cache entry [47160a]
SQUASHFS error: Unable to read page, block 47160a, size 18173

 

So I'll have fun tomorrow. I have plenty of USB sticks, and since the original is a 4GB stick, I'll probably use something fairly new (I bought 3 SandDisk Ultra USB 3.0 16GB just a couple of days ago),

 

I'll just pop the plastic case off.

 

I believe the ERLite uses USB 2.0, but that shouldn't be a problem. Won't bother. It's almost one hour past midnight so it's too late and bedtime since 3 hours....

 

Member
Posts: 263
Registered: ‎01-15-2011
Kudos: 270
Solutions: 2
Contributions: 2

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

[ Edited ]

Why is all of this complexity necessary?

 

Can't someone (perhaps UBNT) use Win32DiskImager to create an image file from the USB Drive on a working Edgerouter Lite that we can then burn to a new USB Drive using Win32DiskImager?

Other stuff I've written:

Prepaid Wireless FAQ: goo.gl/CkZcf
Straight Talk Wireless FAQ!: goo.gl/Sn0Pk

How to choose the best Wifi channel: goo.gl/0s3Rj

Installing FreePBX and Asterisk: goo.gl/tDs5U
Configuring FreePBX: goo.gl/omJnf
Emerging Member
Posts: 51
Registered: ‎01-08-2014
Kudos: 3
Solutions: 1

Re: EdgeMax rescue kit (now you can reinstall EdgeOS from scratch)

"Why is all of this complexity necessary?" Because Ubiquiti culture is all about doing things the manly way!

But you can see a variation of imaging a USB drive as you propose at the link mentioned earlier: https://hilo90mhz.com/ubiquiti-edgerouter-lite-erlite-3-internal-usb-storage-fail/

The complexity seems to grow from a few different things:

•You can't just download a firmware update and jam it on a USB drive.
•Different USB drives requiring tweaking to work properly.
•Dependent too upon how badly you want to load your backup configuration. That means the latest firmware might be a bad choice in that case.
•Restoring the drive in situ is a popular approach too, but it definitely adds to the complexity.
•In the Ubiquiti way, they let users sort it all out and don't provide support for the resurrection process. Ubiquiti owned up to the problem for a while and replaced dead routers, but they've moved on from that.
•They also won't provide the drive image in a way to facilitate this simply despite their customers desperately trying to fix their beloved routers and essentially helping the brand's reputation & loyal fan base.

Go figure. Stuff like that.
Reply