OpenWrt is an open-source router firmware solution based off of the Linux kernel. There are many reasons to use OpenWrt. I finally replaced the default RouterOS installation on my MikroTik RB750r2 (hEX lite) router with OpenWrt. Unfortunately, this took longer than it should have because of the difficulty I had finding the right install locations on the OpenWrt website. The website is a bit cluttered with odds and ends of installation instructions throughout. This article documents all of the necessary steps to install OpenWrt 19.07.1 on a MikroTik RB750r2 router from a laptop running Xubuntu 19.10.
The installation instructions are largely based on the OpenWrt instructions provided here.
-
Download the OpenWrt Firmware
First, download the OpenWrt firmware for the RB750r2. Go to the OpenWrt downloads page. Click on the latest release, 19.07.1 at this time. The RB750r2 uses the
ar71xx
firmware, so click that link. Then, select mikrotik. From this page, download the vmlinux-initramfs-lzma.elf and the rb-nor-flash-16M-squashfs-sysupgrade.bin. The RouterBoard will boot this.elf
file from the network and the sysupgrade.bin
file will be flashed, i.e. installed, on to the RouterBoard.Download withcurl
curl https://downloads.openwrt.org/releases/19.07.1/targets/ar71xx/mikrotik/openwrt-19.07.1-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf curl https://downloads.openwrt.org/releases/19.07.1/targets/ar71xx/mikrotik/openwrt-19.07.1-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin
🔥It is important to verify the integrity of the downloaded files before proceeding. OpenWrt documents this here. Verify the Checksumcat 9af1a143c64db0bbd901b1a8a513c56daf3f2b0aaf408e8b12017c93dbb9cb8a > openwrt-19.07.1-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin.SHA256 # (1) sha256sum -c openwrt-19.07.1-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf.SHA256 openwrt-19.07.1-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf # (2) cat 112aeb3fafb4d791c41f5347b08f88282d0f052a2ac7a9f3b665e5c532b87d13 > openwrt-19.07.1-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin.SHA256 sha256sum -c openwrt-19.07.1-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin.SHA256 openwrt-19.07.1-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin
-
Place the SHA256 checksum corresponding to the downloaded file from the webpage in a file.
-
Check that the SHA256 checksum of the downloaded file matches the SHA256 checksum from the website.
-
-
Setup the NetBoot Directory
ln -s openwrt-19.07.1-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf # (1) mkdir -p ~/mikrotik/trunk/bin/ar71xx/ cp openwrt-ar71xx-mikrotik-vmlinux-initramfs-lzma.elf ~/mikrotik/trunk/bin/ar71xx/ # (2)
-
Symlink the versioned initramfs file to a non-versioned form so that you don’t have to worry about the specific version anymore.
-
Place the initframfs file in a dedicated boot directory.
I found the easiest one-off solution for booting off the network to be dnsmasq on Ubuntu 19.10.
The dnsmasq-base
package was already installed on my system, making the dnsmasq
command available with no extra setup required.
-
Run NetBoot
ifconfig eth0 192.168.1.10 up # (1)
sudo dnsmasq -i eth0 --dhcp-range=192.168.1.100,192.168.1.200 \
--dhcp-boot=openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf \
--enable-tftp --tftp-root=~/mikrotik/trunk/bin/ar71xx/ -d -u $USER -p0 -K --log-dhcp --bootp-dynamic
-
Set the static IP address for your ethernet interface to 192.168.1.10.
-
Start the DHCP boot server.
💡
|
Finding Your Ethernet Interface
In the commands above, ip link show # (1)
Ethernet interfaces should start with the letter |
-
NetBoot the RouterBoard
-
Configure RouterOS to boot from ethernet. Using your favorite web browser, log in to the RouterOS web console of your router, likely at address
192.168.88.1
. Under theSettings
-
Plug
-
Flash OpenWrt Access the LuCI web interface to OpenWrt through
192.168.1.1
. The username is "root" and the password should be left blank. Click login.
-
Update Packages
This work is licensed under a Creative Commons Attribution-ShareAlike 4.0 International License.