Table of Contents

Flash OpenWRT onto Mikrotik RB750Gr3

Introduction

You will need

Flash Process

Export the RouterOS License Key

Running WinBox on Ubuntu 20.04

sudo apt-get install wine
#cd to where the winbox64.exe program is
wine winbox64.exe
#Here our LAN interface is enp8s0 
#Use ip a to discover what it is caleld on your machine
sudo ip addr add 192.168.88.10/24 dev enp8s0

Now that we have the license key taken care of we can go to the next step which is to load the RAM based OpenWRT onto the device

Load a RAM based version of OpenWRT

Set up a BOOTP Environment

loader.sh
#!/bin/bash
#HEADS UP substitute with the logged in user's name that you use to create this file e.g. whoami output
USER=system
#HEADS UP THIS MUST MATCH YOUR MACHINE'S LAN INTERFACE
IFNAME=enp8s0
/sbin/ip addr replace 192.168.1.10/24 dev $IFNAME
/sbin/ip link set dev $IFNAME up
/usr/sbin/dnsmasq --user=$USER \
--no-daemon \
--listen-address 192.168.1.10 \
--bind-interfaces \
-p0 \
--dhcp-authoritative \
--dhcp-range=192.168.1.100,192.168.1.200 \
--bootp-dynamic \
--dhcp-boot=openwrt-19.07.6-ramips-mt7621-mikrotik_rb750gr3-initramfs-kernel.bin \
--log-dhcp \
--enable-tftp \
--tftp-root=$(pwd)
#CD to where the RAM image and loader.sh files are
chmod 755 ./loader.sh
sudo ./loader.sh
#WE get the following output
[sudo] password for system: 
dnsmasq: started, version 2.80 DNS disabled
dnsmasq: compile time options: IPv6 GNU-getopt DBus i18n IDN DHCP DHCPv6 no-Lua TFTP conntrack ipset auth nettlehash DNSSEC loop-detect inotify dumpfile
dnsmasq-dhcp: DHCP, IP range 192.168.1.100 -- 192.168.1.200, lease time 1h
dnsmasq-tftp: TFTP root is /home/system/Documents/mt_flash 

Force Mikrotik to use BOOTP

We add a note on setting the Mikrotik up to do BOOTP
Kicking off BOOTP
dnsmasq-dhcp: 274610437 available DHCP range: 192.168.1.100 -- 192.168.1.200
dnsmasq-dhcp: 274610437 vendor class: MMipsBoot
dnsmasq-dhcp: 274610437 tags: bootp, enp8s0
dnsmasq-dhcp: 274610437 BOOTP(enp8s0) 192.168.1.144 48:8f:5a:e3:d4:9c 
dnsmasq-dhcp: 274610437 bootfile name: openwrt-19.07.6-ramips-mt7621-mikrotik_rb750gr3-initramfs-kernel.bin
dnsmasq-dhcp: 274610437 next server: 192.168.1.10
dnsmasq-dhcp: 274610437 sent size:  4 option:  1 netmask  255.255.255.0
dnsmasq-dhcp: 274610437 sent size:  4 option: 28 broadcast  192.168.1.255
dnsmasq-dhcp: 274610437 sent size:  4 option:  3 router  192.168.1.10
dnsmasq-tftp: sent /home/system/Documents/mt_flash/openwrt-19.07.6-ramips-mt7621-mikrotik_rb750gr3-initramfs-kernel.bin to 192.168.1.144
....
dnsmasq-dhcp: 3516861450 available DHCP range: 192.168.1.100 -- 192.168.1.200
dnsmasq-dhcp: 3516861450 vendor class: udhcp 1.30.1
dnsmasq-dhcp: 3516861450 client provides name: OpenWrt
dnsmasq-dhcp: 3516861450 DHCPDISCOVER(enp8s0) 48:8f:5a:e3:d4:9e 
dnsmasq-dhcp: 3516861450 tags: enp8s0
dnsmasq-dhcp: 3516861450 DHCPOFFER(enp8s0) 192.168.1.146 48:8f:5a:e3:d4:9e 
dnsmasq-dhcp: 3516861450 requested options: 1:netmask, 3:router, 6:dns-server, 12:hostname, 
....
 sudo ip addr add 192.168.1.10/24 dev enp8s0

Flash the permanent version of OpenWRT

#Copy the *sysupgrade* file to the /tmp dir on the Mikrotik
scp openwrt-19.07.6-ramips-mt7621-mikrotik_rb750gr3-squashfs-sysupgrade.bin root@192.168.1.1:/tmp
#SSH into the Mikrotik
ssh root@192.168.1.1
#Change directory to /tmp
cd /tmp
#Do a sysupgrade 
sysupgrade openwrt-19.07.6-ramips-mt7621-mikrotik_rb750gr3-squashfs-sysupgrade.bin
#USR LED will flash while it is writing to flash
#After ~2min it will stop and reboot (beeper will beep)