12-28-2016 11:42 AM
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.
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)
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)
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)
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!
12-28-2016 12:24 PM
Thanks ssisak and haef for the instructions re the sleep command, great stuff. I've already recovered my ERL with a brand new SanDisk Cruzer Fit flash drive so I now have a working backup router again. I expect that the flash in my current ERL will go bad as well within a few months so I have another flash drive standing by.
12-28-2016 01:21 PM
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.)
01-27-2017 03:06 AM
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
02-10-2017 03:38 PM
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.v188.8.131.5274253.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?
02-10-2017 11:42 PM
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)
Would appreciate your advice?
02-11-2017 05:04 AM
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.
a week ago
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?
a week ago
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
a week ago
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
a week ago
a week ago
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.