MikroTik RB5009UG installation

Hello forum,

I have tried to fight my way through this very long forum thread in order to install OpenWRT on my new RB5009UG+S+IN.

I ended up following the instruction given here.

I can boot OpenWRT initramfs fine using TFTP. But then after updating the bootloader and then starting the sysupgrade, the router keeps rebooting endlessly.

I have tried with the image linked in the instructions, but also with the latest one from the openwrt downloads.

Any help on what the latest instructions for installing OpenWRT on this device are is highly appreciated!

Cheers, Christoph

It's unfortunate that thread got automatically closed by a moderator-bot, a lot of knowledgeable people frequented that thread.

That thread has some updated instructions around the Jun 9 2024 mark which might help.

It appears that my RB5009 has a different MTD layout:

root@OpenWrt:~# cat /proc/mtd 
dev:    size   erasesize  name
mtd0: 40000000 00020000 "ubi"
mtd1: 00095c04 00010000 "ATF"
mtd2: 000193fc 00010000 "backup_RouterBOOT"
mtd3: 00001000 00010000 "hard_config"
mtd4: 00010000 00010000 "RouterBOOT"
mtd5: 00010000 00010000 "soft_config"
mtd6: 00010000 00010000 "DTS"
mtd7: 00020000 00010000 "free_space"
mtd8: 00f00000 00010000 "kernel"
mtd9: 00100000 00010000 "first_1M"

It doesn't have a "YAFFS" device. So I am not sure where to install u-boot and which device to ubiformat..

I have reinstalled ROS in between tests in order to recreate the initial partioning.

Your MTD layout is mostly determined by the image you boot…: https://github.com/adron-s/openwrt-rb5009/blob/7c5826afd297d6a0bfbf6685c02a33f1e4f4a73a/target/linux/mvebu/files/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dts#L94


If you want to use the (upstream) OpenWrt image, follow the OpenWrt RB5009 commit message instructions (partitions: https://github.com/openwrt/openwrt/blob/ca325ee516e63ae138cbd5bbf20316139efe882f/target/linux/mvebu/files-6.6/arch/arm64/boot/dts/marvell/armada-7040-rb5009.dts#L128):

Thank you so much! I have managed to install and boot a working snapshot on my RB5009 :slight_smile:

In the end everything works as described in the pull request. You just have to follow everything exactly as written, using the images from the current snapshot folder. u-boot will only load the image from USB stick, booting from network didn't work for me.

Some details for the less knowledgeable people, like I am:

  1. Plug you PC into Port 1. Boot the u-boot.elf via TFTP. I have used this script on linux:
#!/bin/bash
IFNAME=enp0s20f0u4u1u3
/sbin/ip addr replace 192.168.88.2/24 dev $IFNAME
/sbin/ip link set dev $IFNAME up
/usr/sbin/dnsmasq \
--no-daemon \
--listen-address 192.168.88.2 \
--bind-interfaces \
-p0 \
--dhcp-authoritative \
--dhcp-range=192.168.88.100,192.168.88.200 \
--bootp-dynamic \
--dhcp-boot=u-boot.elf \
--log-dhcp \
--enable-tftp \
--tftp-root=$(pwd)

Power up your router while pressing the reset button for 20(!) seconds, until the LED behind the reset button goes off. u-boot will be transferred and booted, which will load the initramfs from the plugged in USB stick.

  1. Plug your PC into any other port than port 1. Follow all instructions from the pull request.

  2. Connect via ssh and install the LuCI web interface

3 Likes