• Stars
    star
    179
  • Rank 214,039 (Top 5 %)
  • Language
    Shell
  • Created about 8 years ago
  • Updated almost 2 years ago

Reviews

There are no reviews yet. Be the first to send feedback to the community and the maintainers!

Repository Details

Make a Ubiquiti EdgeOS image from a system tarball

mkeosimg

Your EdgeRouter's internal USB drive died, and you don't have a spare couple hours to figure out how TFTP works. Run this script instead on your nearest Linux machine and generate a .img that you can dd straight to a new USB drive.

If you want to create a USB boot drive directly, use ./mkeosdrive instead.

Usage

  • sudo ./mkeosimg ER-e100.v1.xxxxxxx.tar (you downloaded that file from the Ubiquiti site. Pick the latest system update for your router).

  • If you have a backup config file that you'd like to include, such as edgeos_routername_NNNNNNNN.tar.gz, just provide the path to it as the second parameter.

  • If you want to use more of the available space on a larger flash drive, you can enter the total image size in GB as the third parameter. If you don't want to provide a config file, but still want to have a larger image, use "-" (without the quotes) as the second parameter. If no drive size is specified, the script will default to 2 GB.

  • Download the resulting .img if you built this elsewhere (such as on a Google Compute Engine instance that you spun up just for this project). You should have gzipped it because that'll make it around 20x smaller.

  • sudo dd if=ER-e100.v1.xxxxxxx.img of=/dev/path/to/usb/drive bs=1M (adapt to your OS of choice) to write the image to your USB drive.

  • If you want, you can directly create a USB drive without creating an image file first. Use ./mkeosdrive instead, and supply the target device as the first parameter. All other parameters are shifted by one position accordingly.

    sudo ./mkeosdrive /dev/path/to/usb/drive ER-e100.v1.xxxxxxx.tar

  • Insert the new USB drive into your router and boot it up. If you included your backup config in the first step, then your router will start shuttling around packets on your network just like it used to; otherwise you'll have to set it up as a brand-new device.

Troubleshooting

  • Did everything, but router's still not booting? Your USB drive might be on the slow side. See issue #7 for more detail, and thanks @kosta for filing the issue.

Credits and Miscellaneous

Inspired by https://github.com/vyos/emrk/blob/master/bin/emrk-reinstall. Some parts of the code were stolen from there as well.

Beware! There are lots of things out there that call themselves "EMRK" and succeed to varying degrees in helping with EdgeRouter unbricking.

More Repositories

1

weblight

WebUSB LED. Hardware, software, and firmware.
C
187
star
2

JTAGWhisperer

Yes, your Arduino can replace an expensive JTAG cable!
C
148
star
3

G35Arduino

An Arduino library for GE Color Effects G-35 holiday lights.
C++
64
star
4

WT32-SC01-Demo

A hello world sketch for the WT32-SC01 ESP32 Development board
C
28
star
5

cold-wallet-generator

Given one or more Bitcoin addresses with private keys, generates a TeX file suitable for printing and putting into cold storage.
Python
23
star
6

happynine

A BIP 0032 HD wallet for Bitcoin, implemented as a Chrome App.
JavaScript
18
star
7

smart-usb-switch

An ESP8266-based smart USB type-A switch
XSLT
16
star
8

mkwgconf

Generates Wireguard configuration files
Python
15
star
9

TribeDuino

A proof of concept that uses an Arduino to read a Korg monotribe firmware file in m4a audio format.
Arduino
14
star
10

archer-c9-back-to-stock

A DD-WRT-web-flashable image to take your DD-WRT Archer C9 back to stock firmware.
14
star
11

avr-programmer

A compact AVR programmer that doesn't require ugly cables.
14
star
12

scanqr-app

A Chrome Packaged App that scans QR codes.
JavaScript
13
star
13

groove

A digital audio workstation (DAW) engine.
Rust
13
star
14

b39tools

Tools for working with BIP-39 assets
Python
10
star
15

op-1-tools

Research about the Teenage Engineering OP-1
10
star
16

paSSSphrase

Split a strong passphrase among friends using Shamir's secret sharing, then etch it into metal so it'll last longer than you will.
Ruby
10
star
17

quaid

A single-page webapp that decrypts text using only client-side JavaScript
JavaScript
8
star
18

esp32-ble-button

Allows an ESP32 to read inexpensive "anti-lost" Bluetooth Low Energy buttons (a.k.a. iTAG)
C++
7
star
19

ok-wake

A device that tells pre-literate kids that it's OK to get out of bed.
C
6
star
20

rpio

RPio: A Raspberry Pi Breakout Board
5
star
21

SimpleECDSA

Found at http://jonasfj.dk/blog/2007/12/simpleecdsa-a-simple-implementation-of-ecdsa-in-c/
C
5
star
22

like-a-g35

An alternate driver for GE Christmas lights.
4
star
23

sm16716

An Arduino controller for SM16716-based LED strings.
Arduino
4
star
24

ChromeLeft4kDead

Notch's Left4kDead as a Chrome App.
JavaScript
4
star
25

audrey

A circa-2001 project to open up the 3Com Ergo Audrey internet appliance.
HTML
4
star
26

keycad

Generates various CAD files for custom keyboards
Python
4
star
27

cinemagraph-maker

Erlang
3
star
28

blur-facebook

Helps blot out names in comments when you want to post a funny screenshot to Reddit.
JavaScript
3
star
29

hypnagogo

The Hypna Go Go: Hypnagogic Goggles
C
3
star
30

td-base

A starting point for Tower Defense-style games.
Python
2
star
31

rpi_breakout

The project now known as rpio.
2
star
32

pub

Public documents that are freely available but hard to find or subject to bitrot
2
star
33

nanowrimo-meter

JavaScript
1
star
34

sowbug.github.com

HTML
1
star
35

hsk-mock-exams-pinyin

HSK mock exams with Pinyin versions of listening phrases
1
star
36

psychic-bassoon

A JavaScript passphrase generator
1
star
37

ld14

Entry to Ludum Dare 14
Python
1
star
38

Left4kDeadEdu

A refactored and annotated version of Notch's Left 4k Dead.
Java
1
star
39

sudoku-app

A Chrome Packaged App for playing the puzzle game Sudoku.
JavaScript
1
star
40

8821

Building a Williams arcade machine from scratch
C
1
star
41

trhid

JavaScript
1
star
42

beach

A small PyGame game written in about six hours.
Python
1
star
43

neje_laser_upgrade

How to upgrade your NEJE Master laser engraver to stock GRBL with Laser Mode ($32)
1
star
44

smart-light

Alexa-compatible light controller for ESP8266 and ESP32.
C++
1
star
45

paste-itc-password

A Chrome extension that allows pasting of passwords into the login page of iTunes Connect.
JavaScript
1
star
46

tqw

The Quoting, Whirled: A Burning Man Art Project from August 2002.
C
1
star