{"id":104,"date":"2020-06-26T22:38:49","date_gmt":"2020-06-26T20:38:49","guid":{"rendered":"http:\/\/tomas.varhaug.net\/?p=104"},"modified":"2020-06-26T22:38:49","modified_gmt":"2020-06-26T20:38:49","slug":"edgerouter-x-firmware-upgrade-fails","status":"publish","type":"post","link":"https:\/\/tomas.varhaug.net\/?p=104","title":{"rendered":"Edgerouter X &#8211; Firmware upgrade fails"},"content":{"rendered":"\n<p>IMPORTANT! Read this BEFORE you attempt to upgrade the FW of your edgerouter.<br><br>There seems to be a faily common issue now that the firmware upgrade fails when done through the webgui and many recommend doing it only through CLI (Command Line Interface).<\/p>\n\n\n\n<p>I had to return a brand new edgerouter with fw 1.7.0 after the upgrade failed using the webgui.<\/p>\n\n\n\n<p><strong>Root cause<\/strong><br>There is not enough free diskspace on the root filesystem for the existing, plus new compressed and uncompressed firmware. The disk will go full during the upgrade and if you are as lucky as me it will BRICK YOUR DEVICE.<br>I tried all the factory resets and TFTP recovery, it was dead.<\/p>\n\n\n\n<p>Trying to upgrade will most likely result in something like this:<br><br>ubnt@erx:~$ add system image ER-e50.v1.10.11.5274269.tar<br>Checking upgrade image\u2026Done<br>Preparing to upgrade\u2026Done<br>Copying upgrade image\u2026Not enough disk space for root file system<\/p>\n\n\n\n<p>ubnt@erx:~$ df -h<br>Filesystem Size Used Available Use% Mounted on<br>ubi0_0 214.9M 137.5M 72.7M 65% \/root.dev<br>aufs 214.9M 137.5M 72.7M 65% \/<\/p>\n\n\n\n<p><strong>Solution<\/strong><br><br>1.  Download the newest firmware from the ubiquiti website:<br><a rel=\"noreferrer noopener\" href=\"https:\/\/www.ui.com\/download\/edgemax\/edgerouter-x\" target=\"_blank\">https:\/\/www.ui.com\/download\/edgemax\/edgerouter-x<\/a><br><br>2.  Copy the firmware from your Linux computer over to the router (replace versions\/IPs\/etc as needed):<br><code>scp ER-e50.v1.10.11.5274269.tar ubnt@192.168.1.1:.<\/code><br>(or if you are on Windows; pull your hair, smash the keyboard a bit and then download Filezilla)<br><br>3.  Login to your edgerouter through ssh like:<br><code>ssh ubnt@192.168.1.1<\/code><br>or if you are still using Windows, pull out the rest of your hair, scream out &#8220;<a rel=\"noreferrer noopener\" href=\"https:\/\/www.youtube.com\/watch?v=q8SWMAQYQf0\" target=\"_blank\">Schpielen!!!<\/a>&#8221; and smash the rest of your keyboard before downloading <a rel=\"noreferrer noopener\" href=\"https:\/\/www.chiark.greenend.org.uk\/~sgtatham\/putty\/latest.html\" target=\"_blank\">PuTTY<\/a><br><br>4.  Here is the clue. Now you move the firmware to the \/tmp directory as it resides on a different partition than your root filesystem:<br><code>ubnt@erx:~$ mv -i ER* \/tmp<\/code><br><br>5.  Now you may start the firmware upgrade with a command that may look something like this:<br><code>ubnt@erx:~$ add system image \/tmp\/ER-e50.v1.10.11.5274269.tar<br>Checking upgrade image\u2026Done<br>Preparing to upgrade\u2026Done<br>Copying upgrade image\u2026Done<br>Removing old image\u2026Done<br>Checking upgrade image\u2026Done<br>Copying config data\u2026Done<br>Finishing upgrade\u2026Done<br>Upgrade completed<br>ubnt@erx:~$<\/code><br><\/p>\n\n\n\n<p><strong>tl;dr<\/strong> root partition goes full during upgrade so move firmware.tar to \/tmp before upgrading.<\/p>\n\n\n\n<p>Hope this helps some other smuck from having to return a dead router to the shop and if nothing else it will serve me as a guide the next time I do an upgrade on one of these myself.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>IMPORTANT! Read this BEFORE you attempt to upgrade the FW of your edgerouter. There seems to be a faily common issue now that the firmware upgrade fails when done through the webgui and many recommend doing it only through CLI (Command Line Interface). I had to return a brand new edgerouter with fw 1.7.0 after &hellip; <\/p>\n<p class=\"link-more\"><a href=\"https:\/\/tomas.varhaug.net\/?p=104\" class=\"more-link\">Continue reading<span class=\"screen-reader-text\"> &#8220;Edgerouter X &#8211; Firmware upgrade fails&#8221;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[12],"tags":[18,19],"class_list":["post-104","post","type-post","status-publish","format-standard","hentry","category-linux","tag-edgerouter","tag-firmware"],"_links":{"self":[{"href":"https:\/\/tomas.varhaug.net\/index.php?rest_route=\/wp\/v2\/posts\/104","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/tomas.varhaug.net\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/tomas.varhaug.net\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/tomas.varhaug.net\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/tomas.varhaug.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=104"}],"version-history":[{"count":1,"href":"https:\/\/tomas.varhaug.net\/index.php?rest_route=\/wp\/v2\/posts\/104\/revisions"}],"predecessor-version":[{"id":105,"href":"https:\/\/tomas.varhaug.net\/index.php?rest_route=\/wp\/v2\/posts\/104\/revisions\/105"}],"wp:attachment":[{"href":"https:\/\/tomas.varhaug.net\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=104"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/tomas.varhaug.net\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=104"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/tomas.varhaug.net\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=104"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}