Reply
Regular Member
Posts: 402
Registered: ‎07-02-2016
Kudos: 105
Solutions: 7

EdgeRouter X/X-SFP check bootloader version

I was trying to find a way to check the current bootloader version of an EdgeRouter X or X-SFP before applying the patch here: http://community.ubnt.com/t5/EdgeMAX-Updates-Blog/EdgeMAX-EdgeRouter-X-X-SFP-bootloader-update/ba-p/....  I wanted an easy way to tell if the bootloader update was already applied or not before updating it.

 

I think I found a way... compute the md5 hash of the flash memory where the bootloader is stored:

 

ubnt@ubnt:~$ sudo md5sum /dev/mtdblock2

 

Before I flashed an EdgeRouter X to the updated bootloader, the hash was:

 

dbce6273c8740383f84040e33f7fffe7  mtdblock2

 

After I flashed the update, the hash was:

 

7580ebd7ce9303243292f586ab7c6daf  /dev/mtdblock2

 

 

This is also useful if you purchase a new unit and aren't sure whether the updated bootloader made it to the factory or not before the unit was manufactured.

Ubiquiti Employee
Posts: 2,953
Registered: ‎10-05-2015
Kudos: 1140
Solutions: 232

Re: EdgeRouter X/X-SFP check bootloader version

Thanks for sharing @cbfs

Veteran Member
Posts: 5,785
Registered: ‎07-03-2008
Kudos: 1826
Solutions: 138

Re: EdgeRouter X/X-SFP check bootloader version

I'm assuming this is streamlined into newer ER-X hardware.  Could Ubiquiti provide a test date so we can tell by looking at the boxes?

 

Thanks~

New Member
Posts: 28
Registered: ‎04-09-2016
Kudos: 6
Solutions: 1

Re: EdgeRouter X/X-SFP check bootloader version

@UBNT-Jordan hello we are planning to buy a in the following months a big amount of ER-X-SFP something like 200 per month we are expecting to buy in total more than 2000 then I really need to have an easyway way to know if it's needed to update or not the bootloader and if you can help me to find a easy and fast way to do the upgrade one by one as soon as I open the box before doing any configuration some ideas pls 

BR

Mario

Ubiquiti Employee
Posts: 2,953
Registered: ‎10-05-2015
Kudos: 1140
Solutions: 232

Re: EdgeRouter X/X-SFP check bootloader version

@MarioAguado I will double check to see when this was implemented and let you know.

New Member
Posts: 28
Registered: ‎04-09-2016
Kudos: 6
Solutions: 1

Re: EdgeRouter X/X-SFP check bootloader version

@UBNT-Jordan Hello this is great, appreciated, could you contact me by private message pls I have some questions since we are planning to start using a considerable amount of ubiquiti equipment ER-X-SFP, tough switch 8

Pro, picostation M2 and ES-Lite 24.

 

Mario

Ubiquiti Employee
Posts: 2,953
Registered: ‎10-05-2015
Kudos: 1140
Solutions: 232

Re: EdgeRouter X/X-SFP check bootloader version

@MarioAguado As it turns out, I do not have a date that the new bootloader started shipping on the ER-X models. You could create a script to run on these new units and check, then upload the new bootloader if needed.

Emerging Member
Posts: 62
Registered: ‎08-03-2016
Kudos: 20
Solutions: 1

Re: EdgeRouter X/X-SFP check bootloader version

I got my first ER-X and a

First I downloaded v1.8.5.4884695 and opgraded with UI System Menu.

After using a wizard and use Eth4 as WAN and Eth0 as LAN, I notice that the router is a switch at a small point during boot. So, my computer is connected to Eth0 and Internet is at Eth4. When booting ER-X I received a public WAN-IP to my computer and lost it agein. Then I received a LAN-IP.

 

My MD5SUM of /dev/mtdblock2 is fdb9059dce69d9902303c15c5870ee05

 

~$ sudo md5sum /dev/mtdblock2
fdb9059dce69d9902303c15c5870ee05 /dev/mtdblock2

When I try the script, I get this error:

 

~$ curl -O https://dl.ubnt.com/firmware/edgemax/v1.8.0/update-boot.sh
% Total % Received % Xferd Av Time Timerage Speed e Time Currenth
Dload Upload Total Spent Left Speed
100 10996 100 10996 0 0 26564 0 --:--:-- --:--:-- --:--:-- 28710
~$ sudo bash update-boot.sh
update-boot.sh: line 1: syntax error near unexpected token `newline'
update-boot.sh: line 1: `<!DOCTYPE html>'
Before posting this message, I did another reboot of the ER-X and managed to do the update.
But the MD5 is still not the same as @cbfs got.

~$ date
Wed Aug  3 21:44:34 CEST 2016
~$ sudo md5sum /dev/mtdblock2
fdb9059dce69d9902303c15c5870ee05  /dev/mtdblock2
~$ curl -O https://dl.ubnt.com/firmwares/edgemax/v1.8.0/update-boot.sh
  % Total    % Recerd  Averaeived % Xfime    Timge Speed   TCurrent
   e     Time                         Upload           Dload t    Left  Total   Sp
  0     0 Speed
100  165k  100  165k    0     0   173k      0 --:--:-- --:--:-- --:--:--  209k
~$ sudo bash update-boot.sh
243+1 records in
243+1 records out
Done.
~$ sudo md5sum /dev/mtdblock2
7580ebd7ce9303243292f586ab7c6daf /dev/mtdblock2
Now the MD5 is the same.
I also checked what IP I got during boot, and now it is just the self assigned IP and then the LAN-IP.
So I gues it worked in the end.
It would be very helpfull if boot loader version was visable in UI and if it was a way to update through UI.
Veteran Member
Posts: 5,417
Registered: ‎03-12-2011
Kudos: 2711
Solutions: 128

Re: EdgeRouter X/X-SFP check bootloader version

Previous Employee
Posts: 13,551
Registered: ‎06-10-2011
Kudos: 5465
Solutions: 1656
Contributions: 2

Re: EdgeRouter X/X-SFP check bootloader version

Yeah that's missing an "s" in "firmwares" Icon Smile

Member
Posts: 104
Registered: ‎11-13-2015
Kudos: 2

Re: EdgeRouter X/X-SFP check bootloader version

fdb9059dce69d9902303c15c5870ee05 /dev/mtdblock2

 

does anybody know what version of bootloader this is?

Veteran Member
Posts: 4,030
Registered: ‎05-15-2014
Kudos: 1481
Solutions: 275

Re: EdgeRouter X/X-SFP check bootloader version

Member
Posts: 104
Registered: ‎11-13-2015
Kudos: 2

Re: EdgeRouter X/X-SFP check bootloader version

1. So how does the upgrade process work actually?

2. Doesn't the latest firmware include the latest bootlaoder? Or must they be applied separately?

3. Also, the latest bootloader is v1.8 while firmware is v1.9.0, is this correct?

4. Should we apply latest firmware first, or latest bootlaoder first?

Veteran Member
Posts: 5,785
Registered: ‎07-03-2008
Kudos: 1826
Solutions: 138

Re: EdgeRouter X/X-SFP check bootloader version

In short:

 

  1. You pull (or copy) a shell script to the router.  You run the script, and about 5 seconds later the bootloader is updated.
  2. Firmware is firmware.  The bootloader is a separate thing unto itself.  Updates should be rather rare
  3. Those are firmware version numbers.
  4. Given the nature of the fixes in this bootloader update there should be no impact from either path. 

 

The blog announcement actually covers this pretty well.

 

Member
Posts: 104
Registered: ‎11-13-2015
Kudos: 2

Re: EdgeRouter X/X-SFP check bootloader version

[ Edited ]

You're right. Interestingly the bootloader script URL categorizes the bootloader under "firmwares".

New Member
Posts: 20
Registered: ‎08-19-2016
Kudos: 19
Solutions: 1

Re: EdgeRouter X/X-SFP check bootloader version

I bought an ERX from Amazon on August 2nd, 2016 and it came with the older bootloader. It caused a problem with my university's DHCP/authentication server (detailed: https://community.ubnt.com/t5/EdgeMAX/ER-X-and-Unifi-UAP-AC-LITE-want-to-delay-AP-startup/m-p/165438...) that's now fixed with the patch.

 

 

New Member
Posts: 6
Registered: ‎01-15-2017

Re: EdgeRouter X/X-SFP check bootloader version

thanks to the OP for this.

 

I will note that this thread shows two hashes: one prior to the bootloader flash, and one subsequent the bootloader flash.  I had already upgraded to firmware 1.9.1, then checked the hash, and got the same result as the OP prior to the flash.  I then ran the script and checked the hash and it matched the OP's result after flash.

 

The only issue is that there's an amazon reviewer post that indicates a third hash value (prior to flashing using the script).  See here:

 

https://www.amazon.com/Ubiquiti-EdgeRouter-Advanced-Gigabit-Ethernet/product-reviews/B00YFJT29C

(search page for "bootloader")

 

So, that means that either the reviewer did something wrong, or there are at least three different bootloader versions for the edgerouter x.  This seems to go against the comment in the official ubiquiti thread that the bootloader won't be updated often... but there we go.  My hash now matches the amazon reviewer's and the OP's, post flash.

 

Have there been any further updates, or has a 3rd party validation been performed indicating that the unsecured switch mode during boot issue is now completely resolved?

 

Thanks.  Posting partly for updated information, and partly to have a reasonably findable explanation online of something that confused me when updating the bootloader (that there might be three different versions of the bootloader in the wild).

New Member
Posts: 2
Registered: ‎12-21-2014

Re: EdgeRouter X/X-SFP check bootloader version

[ Edited ]

Bump.

@ubntstaff - Any confirmation on a QC date where (from that point forward) the updated bootloader is onboard from the factory? Or are we still in limbo here...?

Thanks!
- Trip

Regular Member
Posts: 757
Registered: ‎04-17-2013
Kudos: 337
Solutions: 36

Re: EdgeRouter X/X-SFP check bootloader version

an ERX with Test Date 10/19/16 still has the old firmware.

 

Linux / Network / ISP / Virtualization Geek for Hire
Emerging Member
Posts: 55
Registered: ‎04-01-2017
Kudos: 5

Re: EdgeRouter X/X-SFP check bootloader version

This post should be sticky. Every new unit i bought had to be flashed to the latest bootloader version!

1x UAP-AC-LR
1x ER-X
Reply