| Both sides previous revision Previous revision Next revision | Previous revision Next revisionBoth sides next revision |
| toh:mikrotik:common [2023/01/29 11:06] – [Detailed Steps] moved later in the page bikepunk | toh:mikrotik:common [2023/09/25 21:57] – [Common Procedures for MikroTik RouterBoard Products] 532910 |
|---|
| |
| <WRAP alert> | <WRAP alert> |
| OpenWrt is not compatible with the bootloader of RouterOS **v7**. Do NOT upgrade your device to RouterOS v7 or, if you did, downgrade to RouterOS **v6** before installing OpenWrt. | OpenWrt is not compatible with the bootloader of RouterOS **v7** or **v6.46** or above. Do NOT upgrade the firmware on your device past RouterOS **v6.45.8** or, if you did, downgrade to RouterOS Firmware **v6.45.8** or earlier before installing OpenWrt. |
| | |
| | This isn't fully true, while the first part looks correct: v7 RouterBoot doesn't work with OpenWrt, the second is not: my SXTsq 5 ac has v6.47.10 factory firmware, RouterOS doesn't allow to downgrade main firmware below factory, but openwrt boots and works fine with it! |
| </WRAP> | </WRAP> |
| |
| ===== Step-By-Step OpenWrt Installation Processes on Routerboard ===== | ===== Step-By-Step OpenWrt Installation Processes on Routerboard ===== |
| ==== With a Linux and other unix-like OS ==== | ==== With a Linux and other unix-like OS ==== |
| * [[#saving_mikrotik_routerboard_license_key_without_using_winbox|Save the license key.]] | * Plug an ethernet cable between the router port 2 and your computer. |
| | * [[#saving_mikrotik_routerboard_license_key_without_using_winbox|Save the license key.]] (optional) |
| * [[#downloading_openwrt_images_for_mikrotik_routerboards|Download OpenWrt images]] (initramfs and sysupgrade) | * [[#downloading_openwrt_images_for_mikrotik_routerboards|Download OpenWrt images]] (initramfs and sysupgrade) |
| * Connect to web interface http://192.168.88.1 | * Connect to web interface http://192.168.88.1 |
| * Create the following script using a text editor such as vi: vi ~/tftp/loader.sh | * Create the following script using a text editor such as vi: vi ~/tftp/loader.sh |
| |
| Note: Don't forget to change USER, IFNAME, IP/DHCP IP-range and file name/folder path for your needs and replace openwrt-19.07-*-initramfs-* with the appropriate filename. | Note: Don't forget to change USER, IFNAME, IP/DHCP IP-range and file name/folder path for your needs and replace openwrt-22.03-*-initramfs-* with the appropriate filename. |
| |
| #!/bin/bash | #!/bin/bash |
| --tftp-root=$(pwd) | --tftp-root=$(pwd) |
| |
| * Copy openwrt-19.07-*-initramfs-* file to the folder where the script is located. | * Copy openwrt-22.03-*-initramfs-* file to the folder where the script is located. |
| * Make the script executable | * Make the script executable |
| |
| - **You Are Almost There: OpenWrt is Now Running From RAM**\\ Now you have OpenWrt running in RAM on your RouterBoard. You can try it out by running the next two steps, then poke around and decide if you like it. Since it is only in RAM, if you reboot the RouterBoard without performing the flash (the final step here), this initramfs RAM-based version of OpenWrt will vanish. | - **You Are Almost There: OpenWrt is Now Running From RAM**\\ Now you have OpenWrt running in RAM on your RouterBoard. You can try it out by running the next two steps, then poke around and decide if you like it. Since it is only in RAM, if you reboot the RouterBoard without performing the flash (the final step here), this initramfs RAM-based version of OpenWrt will vanish. |
| - **Connect to RouterBoard ether2**\\ Unplug your Ethernet cable from ether1 and plug in to a LAN port on your RouterBoard such as ether2. Some RouterBoards do not enable all LAN ports, so you may need to experiment here. | - **Connect to RouterBoard ether2**\\ Unplug your Ethernet cable from ether1 and plug in to a LAN port on your RouterBoard such as ether2. Some RouterBoards do not enable all LAN ports, so you may need to experiment here. |
| - **Login to OpenWrt LuCI Web Interface or via SSH**\\ Use a web browser to open the OpenWrt LuCI web interface at 192.168.1.1. Login is admin, no password. It may take a minute or more for OpenWrt to fully boot -- wait until the lights on the LAN port indicate activity. If you can't reach the LuCI web interface the initramfs image might be without LuCI. You need SSH in that case. Username is root and there is no password. | - **Login to OpenWrt LuCI Web Interface or via SSH**\\ Use a web browser to open the OpenWrt LuCI web interface at 192.168.1.1. Login is admin, no password. It may take a minute or more for OpenWrt to fully boot -- wait until the lights on the LAN port indicate activity. If you can't reach the LuCI web interface the initramfs image might be without LuCI. [[:toh:mikrotik:common#using_ssh_instead_of_luci | You need SSH in that case.]] Username is root and there is no password. |
| - **Flash sysupgrade.bin Into RouterBoard**\\ Go to System->Backup/Flash Firmware in LuCI. Select 'Choose file' under 'Flash new firmware image'. Select the sysupgrade.bin file you previously downloaded to your PC. Press 'Flash image' to permanently install OpenWrt on your RouterBoard.\\ The flash process may take a minute or more to complete, then your RouterBoard will automatically reboot.\\ **Congratulations!** You now have OpenWrt running and flashed into your RouterBoard. Subsequent upgrades of OpenWrt are as simple as running this step alone (a noted improvement from previous versions of OpenWrt). If you used SSH in the previous step you can flash the RouterBoard with the ''sysupgrade'' command. | - **Flash sysupgrade.bin Into RouterBoard**\\ Go to System->Backup/Flash Firmware in LuCI. Select 'Choose file' under 'Flash new firmware image'. Select the sysupgrade.bin file you previously downloaded to your PC. Press 'Flash image' to permanently install OpenWrt on your RouterBoard.\\ The flash process may take a minute or more to complete, then your RouterBoard will automatically reboot.\\ **Congratulations!** You now have OpenWrt running and flashed into your RouterBoard. Subsequent upgrades of OpenWrt are as simple as running this step alone (a noted improvement from previous versions of OpenWrt). If you used SSH in the previous step you can flash the RouterBoard with the ''sysupgrade'' command. |
| |