First time OpenWrt install on Mikrotik RB750r2 (hEX lite)

Hi all,

I'm interested to give OpenWRT a go so I bought a Mikrotik RB750r2 (hEX lite) and I've tried with TFTP and Tiny PXE methods but to no avail.

With both Tiny PXE and TFTP it seems to load to the Mikrotik but after that the LED's flash, then die and never come back. I've tried 18.06.4 and 18.06.3.

I've tried this only from a Windows 10 Laptop running Tiny PXE and TFTP as admin and tried turning firewall off as well.
Not sure what I'm doing wrong so if anyone wouldn't mind assisting. The router still starts up after a power cycle so I have to redo the "Try ethernet once then NAND" every time, but it still doesn't seems to work. I've not tried the 2017 LEDE links as I would have liked to have the latest version, but if the latest doesn't start up then it must be something I'm doing wrong.

1 Like

Firstly, welcome!
Tbh, I wasn’t able to follow the wiki page for this device very well.. there was this note at the beginning for method 2 that implies the pxe route isn’t working.

Method 2 (TFTP with Telnet)
Please note that the aforementioned mechanism is not properly working on some boards. Don't worry, boot up the mikrotik board, connect your DHCP client to port 1. An address from 192.168.88.0/24 must be obtained. You can now telnet to the board, and configure it for TFTPboot.

With many tftp methods, the window to connect and transfer the image (sometimes only 2 seconds) is fairly short. It’s often recommended to put a switch in between the device you’re putting openwrt on and your PC/laptop you’re flashing it from. This is due to a lag on the PC/laptop side bringing the link up since the far side (potential openwrt) is initially off therefore has no link. Any ordinary 4 port switch will do.

When trying tftp did you set these details on your windows PC? And was it plugged into port 1 / labeled internet ?

192.168.1.2  (Keep this to 192.168.1.2 or tftpd wont work **IMPORTANT**)
 255.255.255.0 (**IMPORTANT**)
 192.168.1.1 (**IMPORTANT**)

If that’s still not working, you could try the pxe route using the old images, and then try upgrading it to a later version once you have lede or an earlier 18.x version installed.

Edit: I just read a note at bottom of that wiki page that the factory boot loader needs to be replaced with uboot to fix “some unnamed problem loading the kernel”, or to use the serial console. However the uboot flash procedure was labeled optional. Probably hold off doing this until your sure you won’t be going back to factory, but drawing your attention of another potential hurdle.

1 Like

Thanks for the help, I was indeed able to connect to the router now with your help, but something is still not right. Let me explain the procedure.

I got a switch like you suggested and connected the laptop to the switch. I then connected the switch to the Mikrotik's eth2 port. Powered on the Mikrotik and did the "Try ethernet once then NAND" and then shutdown. Disconnected the Mikrotik's power and then connected the switch to Mikrotik Eth1.

Then I changed my Laptop IP to static 192.168.1.2 as normal and started the Tiny PXE server and set the Boot File to the initramfs.bin file of 18.06.0. Also made sure Tiny PXE was set to the 192.168.1.2 on option 54 and clicked Online.

After that I powered up the Mikrotik and this time the LED's did nothing, but just taking a shot I opened Firefox and connected to http://192.168.1.1/ and it worked.

Now comes the problem.

  1. I'm still connected to the eth1 port while connected to the OpenWrt on the Mikrotik. Is this ok? Or should I technically be on Eth2-5?
  2. When trying to Flash the new firmware it gives the following error. (Note I did untick "Keep settings: " before trying to flash.)

"The Uploaded image file does not contain a supported format. Make sure that you choose the generic image format for you platform."

Now, the file I used in Tiny PXE was the following.
openwrt-18.06.0-ar71xx-mikrotik-rb-nor-flash-16M-initramfs-kernel.bin

The Firmware file I tried to flash when I get the error is the following
openwrt-18.06.0-ar71xx-mikrotik-rb-nor-flash-16M-squashfs-sysupgrade.bin

Am I using the incorrect sysupgrade?

1 Like

Good to hear! I can’t be sure but two possible reasons for that error are that

  1. your device is that actually a different model to the one you thought it was (retail packaging/marketing by oem vendors is sometimes changed) . These are the other models mentioning “750” in their model name on openwrt wiki (other models may exist that don’t have a page yet) :
    Few different 750 models

  2. Your device might one of the “boards that method 1 doesn’t work on” mentioned on wiki, which could mean a different hardware version/revision. Sometimes a hw revision is so different they are almost treated as a separate device with their own image for openwrt. On others hw changes are very minimal and there is a single image that applies over all hw revisions just fine. The bad news and giving you full warning is that IF your board is in case one , applying the wrong image may brick/destroy your device - usually by overwriting the boot loader or bootloader environment config, or firmware for controlling WiFi radios. Proceed at your own risk :wink:

From a quick search just now I wasn’t able to find any info for verifying different hw revisions for this device unfortunately.

Last option, trying to tell if it’s ‘safe’ to use the sysupgrade image you’ve got ready . Can you paste contents of following commands within a separate code

block

cat /proc/devices
cat /proc/partitions
cat /proc/cpuinfo
cat /proc/meminfo
dmesg

I have the very same issue. I have taken the OpenWRT dmesg log from the wiki and compared it to my dmesg log. These are the differences:

< = wiki dmesg
> = my dmesg

<  Linux version 4.9.109 (buildbot@slashdirt-02) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7270-c49ae68) ) #0 Mon Jun 18 21:23:30 2018
---
>  Linux version 4.9.184 (buildbot@c2c312384f99) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7808-ef686b7292) ) #0 Thu Jun 27 12:18:52 2019
<  free_area_init_node: node 0, pgdat 804d9674, node_mem_map 81000020
---
>  free_area_init_node: node 0, pgdat 8047fbb4, node_mem_map 81000020
<  Kernel command line: no-uart no-nand parts=1 boot_part_size=16777216 gpio=0 HZ=425000000 mem=64M kmac=XX:XX:XX:XX:XX:XX board=750-hb board=750-hb ver=3.36 hw_opt=00084001 boot=1 mlc=10 console=ttyS0,115200 rootfstype=squashfs noinitrd
---
>  Kernel command line: console=ttyS0,115200 no-buzzer no-nand parts=1 boot_part_size=16777216 gpio=5760 HZ=325000000 mem=64M kmac=XX:XX:XX:XX:XX:XX board=750-hb board=750-hb ver=6.42.10 hw_opt=00084000 boot=1 mlc=11 console=ttyS0,115200 rootfstype=squashfs noinitrd

Notice both are the same "board=750-hb" but "ver=" differs.

<  Memory: 59508K/65536K available (3583K kernel code, 156K rwdata, 844K rodata, 208K init, 217K bss, 6028K reserved, 0K cma-reserved)
---
>  Memory: 57724K/65536K available (3608K kernel code, 163K rwdata, 456K rodata, 2356K init, 209K bss, 7812K reserved, 0K cma-reserved)
<  Clocks: CPU:850.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
---
>  Clocks: CPU:650.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
<  MIPS: machine is MikroTik RouterBOARD 750 r2
---
>  MIPS: machine is MikroTik RouterBOARD RB750r2
<  m25p80 spi0.0: found w25q128, expected m25p80
---
>  m25p80 spi0.0: found w25q128jv, expected m25p80
<  2 minor-fw partitions found on MTD device firmware
<  0x000000020000-0x0000001b0000 : "kernel"
<  0x0000001b0000-0x000001000000 : "rootfs"
<  mtd: device 7 (rootfs) set to be root filesystem
<  1 squashfs-split partitions found on MTD device rootfs
<  0x0000003a0000-0x000001000000 : "rootfs_data"
<  VFS: Mounted root (squashfs filesystem) readonly on device 31:7.

I'm assuming kernel and rootfs are created when OpenWRT is installed. I have only booted OpenWRT over PXE for now, so those partitions missing I believe is expected.

I'll provide the results of those other commands too when I have access to it again.

1 Like

Here's the results

/proc/cpuinfo
system type		: Qualcomm Atheros QCA9533 ver 2 rev 0
machine			: MikroTik RouterBOARD RB750r2
processor		: 0
cpu model		: MIPS 24Kc V7.4
BogoMIPS		: 432.53
wait instruction	: yes
microsecond timers	: yes
tlb_entries		: 16
extra interrupt vector	: yes
hardware watchpoint	: yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa			: mips1 mips2 mips32r1 mips32r2
ASEs implemented	: mips16
shadow register sets	: 1
kscratch registers	: 0
package			: 0
core			: 0
VCED exceptions		: not available
VCEI exceptions		: not available

/proc/devices
Character devices:
  1 mem
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
 10 misc
 90 mtd
108 ppp
128 ptm
136 pts
253 watchdog
254 gpiochip

Block devices:
259 blkext
 31 mtdblock
254 ubiblock
/proc/meminfo
MemTotal:          60080 kB
MemFree:           40912 kB
MemAvailable:      34320 kB
Buffers:               0 kB
Cached:            10820 kB
SwapCached:            0 kB
Active:             4800 kB
Inactive:           7236 kB
Active(anon):       1708 kB
Inactive(anon):       64 kB
Active(file):       3092 kB
Inactive(file):     7172 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          1224 kB
Mapped:             1740 kB
Shmem:               556 kB
Slab:               3240 kB
SReclaimable:       1124 kB
SUnreclaim:         2116 kB
KernelStack:         320 kB
PageTables:          204 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       30040 kB
Committed_AS:       4124 kB
VmallocTotal:    1048372 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB
/proc/partitions
major minor  #blocks  name

  31        0         56 mtdblock0
  31        1          4 mtdblock1
  31        2          4 mtdblock2
  31        3         60 mtdblock3
  31        4          4 mtdblock4
  31        5      16256 mtdblock5

I did try to force the flash but it didn't seem to work. After awhile I pulled the power plug and reconnected it. Tried to reach the router, tried a DHCP client, but this didn't work. I then pulled the power plug again and reconnected it. Then it booted from PXE again. It was after this I ran the above commands.

My apologies for the late reply.

I got the following details after I SSH'd to the Mikrotik.

cat /proc/devices

Character devices:
  1 mem
  4 ttyS
  5 /dev/tty
  5 /dev/console
  5 /dev/ptmx
 10 misc
 90 mtd
108 ppp
128 ptm
136 pts
253 watchdog
254 gpiochip

Block devices:
259 blkext
 31 mtdblock
254 ubiblock

cat /proc/partitions

root@OpenWrt:~# cat /proc/partitions
root@OpenWrt:~# 

cat /proc/cpuinfo

system type             : Qualcomm Atheros QCA9533 ver 2 rev 0
machine                 : MikroTik RouterBOARD RB750r2
processor               : 0
cpu model               : MIPS 24Kc V7.4
BogoMIPS                : 432.53
wait instruction        : yes
microsecond timers      : yes
tlb_entries             : 16
extra interrupt vector  : yes
hardware watchpoint     : yes, count: 4, address/irw mask: [0x0ffc, 0x0ffc, 0x0ffb, 0x0ffb]
isa                     : mips1 mips2 mips32r1 mips32r2
ASEs implemented        : mips16
shadow register sets    : 1
kscratch registers      : 0
package                 : 0
core                    : 0
VCED exceptions         : not available
VCEI exceptions         : not available

cat /proc/meminfo

MemTotal:          60116 kB
MemFree:           41376 kB
MemAvailable:      34724 kB
Buffers:               0 kB
Cached:            10780 kB
SwapCached:            0 kB
Active:             4616 kB
Inactive:           7292 kB
Active(anon):       1596 kB
Inactive(anon):       60 kB
Active(file):       3020 kB
Inactive(file):     7232 kB
Unevictable:           0 kB
Mlocked:               0 kB
SwapTotal:             0 kB
SwapFree:              0 kB
Dirty:                 0 kB
Writeback:             0 kB
AnonPages:          1136 kB
Mapped:             1712 kB
Shmem:               528 kB
Slab:               2992 kB
SReclaimable:       1012 kB
SUnreclaim:         1980 kB
KernelStack:         256 kB
PageTables:          200 kB
NFS_Unstable:          0 kB
Bounce:                0 kB
WritebackTmp:          0 kB
CommitLimit:       30056 kB
Committed_AS:       3984 kB
VmallocTotal:    1048372 kB
VmallocUsed:           0 kB
VmallocChunk:          0 kB

dmesg

[    0.000000] Linux version 4.9.111 (buildbot@builds-03.infra.lede-project.org) (gcc version 7.3.0 (OpenWrt GCC 7.3.0 r7101-a63e38b) ) #0 Mon Jul 30 16:25:17 2018
[    0.000000] bootconsole [early0] enabled
[    0.000000] CPU0 revision is: 00019374 (MIPS 24Kc)
[    0.000000] SoC: Qualcomm Atheros QCA9533 ver 2 rev 0
[    0.000000] Determined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] User-defined physical RAM map:
[    0.000000]  memory: 04000000 @ 00000000 (usable)
[    0.000000] Initrd not found or empty - disabling initrd
[    0.000000] Primary instruction cache 64kB, VIPT, 4-way, linesize 32 bytes.
[    0.000000] Primary data cache 32kB, 4-way, VIPT, cache aliases, linesize 32 bytes
[    0.000000] Zone ranges:
[    0.000000]   Normal   [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Movable zone start for each node
[    0.000000] Early memory node ranges
[    0.000000]   node   0: [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] Initmem setup node 0 [mem 0x0000000000000000-0x0000000003ffffff]
[    0.000000] On node 0 totalpages: 16384
[    0.000000] free_area_init_node: node 0, pgdat 80475674, node_mem_map 81000020
[    0.000000]   Normal zone: 128 pages used for memmap
[    0.000000]   Normal zone: 0 pages reserved
[    0.000000]   Normal zone: 16384 pages, LIFO batch:3
[    0.000000] pcpu-alloc: s0 r0 d32768 u32768 alloc=1*32768
[    0.000000] pcpu-alloc: [0] 0
[    0.000000] Built 1 zonelists in Zone order, mobility grouping on.  Total pages: 16256
[    0.000000] Kernel command line: console=ttyS0,115200 no-buzzer no-nand parts=1 boot_part_size=16777216 gpio=5760 HZ=325000000 mem=64M kmac=B8:69:F4:F3:5A:EE board=750-hb board=750-hb ver=6.43.5 bver=6.42.8 hw_opt=00084000 boot=1 mlc=11 console=ttyS0,115200 rootfstype=squashfs noinitrd
[    0.000000] PID hash table entries: 256 (order: -2, 1024 bytes)
[    0.000000] Dentry cache hash table entries: 8192 (order: 3, 32768 bytes)
[    0.000000] Inode-cache hash table entries: 4096 (order: 2, 16384 bytes)
[    0.000000] Writing ErrCtl register=00000000
[    0.000000] Readback ErrCtl register=00000000
[    0.000000] Memory: 57716K/65536K available (3575K kernel code, 156K rwdata, 452K rodata, 2400K init, 217K bss, 7820K reserved, 0K cma-reserved)
[    0.000000] SLUB: HWalign=32, Order=0-3, MinObjects=0, CPUs=1, Nodes=1
[    0.000000] NR_IRQS:51
[    0.000000] Clocks: CPU:650.000MHz, DDR:400.000MHz, AHB:200.000MHz, Ref:25.000MHz
[    0.000000] clocksource: MIPS: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 5880801374 ns
[    0.000010] sched_clock: 32 bits at 325MHz, resolution 3ns, wraps every 6607641598ns
[    0.008889] Calibrating delay loop... 432.53 BogoMIPS (lpj=2162688)
[    0.071955] pid_max: default: 32768 minimum: 301
[    0.077314] Mount-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.084827] Mountpoint-cache hash table entries: 1024 (order: 0, 4096 bytes)
[    0.095902] clocksource: jiffies: mask: 0xffffffff max_cycles: 0xffffffff, max_idle_ns: 19112604462750000 ns
[    0.107118] futex hash table entries: 256 (order: -1, 3072 bytes)
[    0.115362] NET: Registered protocol family 16
[    0.125314] MIPS: machine is MikroTik RouterBOARD RB750r2
[    0.612028] Can't analyze schedule() prologue at 803da504
[    0.630997] clocksource: Switched to clocksource MIPS
[    0.637954] NET: Registered protocol family 2
[    0.643922] TCP established hash table entries: 1024 (order: 0, 4096 bytes)
[    0.651906] TCP bind hash table entries: 1024 (order: 0, 4096 bytes)
[    0.659127] TCP: Hash tables configured (established 1024 bind 1024)
[    0.666467] UDP hash table entries: 256 (order: 0, 4096 bytes)
[    0.673146] UDP-Lite hash table entries: 256 (order: 0, 4096 bytes)
[    0.680561] NET: Registered protocol family 1
[    0.685589] PCI: CLS 0 bytes, default 32
[    2.571007] random: fast init done
[    3.237467] Crashlog allocated RAM at address 0x3f00000
[    3.244591] workingset: timestamp_bits=30 max_order=14 bucket_order=0
[    3.259257] squashfs: version 4.0 (2009/01/31) Phillip Lougher
[    3.265921] jffs2: version 2.2 (NAND) (SUMMARY) (LZMA) (RTIME) (CMODE_PRIORITY) (c) 2001-2006 Red Hat, Inc.
[    3.375323] io scheduler noop registered
[    3.379782] io scheduler deadline registered (default)
[    3.386138] Serial: 8250/16550 driver, 16 ports, IRQ sharing enabled
[    3.396132] console [ttyS0] disabled
[    3.420333] serial8250.0: ttyS0 at MMIO 0x18020000 (irq = 11, base_baud = 1562500) is a 16550A
[    3.430141] console [ttyS0] enabled
[    3.437692] bootconsole [early0] disabled
[    3.452967] m25p80 spi0.0: unrecognized JEDEC id bytes: ef, 70, 18
[    3.460416] libphy: Fixed MDIO Bus: probed
[    3.594513] libphy: ag71xx_mdio: probed
[    4.223622] ag71xx ag71xx.0: connected to PHY at ag71xx-mdio.1:04 [uid=004dd042, driver=Generic PHY]
[    4.233816] eth0: Atheros AG71xx at 0xb9000000, irq 4, mode:MII
[    4.863549] ag71xx-mdio.1: Found an AR934X built-in switch
[    4.916926] eth1: Atheros AG71xx at 0xba000000, irq 5, mode:GMII
[    4.927159] NET: Registered protocol family 10
[    4.935100] NET: Registered protocol family 17
[    4.939763] bridge: filtering via arp/ip/ip6tables is no longer available by default. Update your scripts to load br_netfilter if you need this.
[    4.953205] 8021q: 802.1Q VLAN Support v1.8
[    4.977619] Freeing unused kernel memory: 2400K
[    4.982336] This architecture does not have kernel memory protection.
[    5.004035] init: Console is alive
[    5.007821] init: - watchdog -
[    5.034041] kmodloader: loading kernel modules from /etc/modules-boot.d/*
[    5.043701] kmodloader: done loading kernel modules from /etc/modules-boot.d/*
[    5.052479] init: - preinit -
[    5.220555] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[    7.304576] eth0: link up (100Mbps/Full duplex)
[    7.310462] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[    8.397213] eth0: link down
[    8.412919] procd: - early -
[    8.416016] procd: - watchdog -
[    8.968601] procd: - watchdog -
[    8.972217] procd: - ubus -
[    8.983490] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.026573] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.033715] random: ubusd: uninitialized urandom read (4 bytes read)
[    9.041417] procd: - init -
[    9.226374] kmodloader: loading kernel modules from /etc/modules.d/*
[    9.237142] ip6_tables: (C) 2000-2006 Netfilter Core Team
[    9.253563] Loading modules backported from Linux version wt-2017-11-01-0-gfe248fc2c180
[    9.261906] Backport generated by backports.git v4.14-rc2-1-31-g86cf0e5d
[    9.271981] ip_tables: (C) 2000-2006 Netfilter Core Team
[    9.286147] nf_conntrack version 0.5.0 (1024 buckets, 4096 max)
[    9.348974] xt_time: kernel timezone is -0000
[    9.410111] PPP generic driver version 2.4.2
[    9.417198] NET: Registered protocol family 24
[    9.459411] kmodloader: done loading kernel modules from /etc/modules.d/*
[   10.578728] urandom_read: 5 callbacks suppressed
[   10.578738] random: jshn: uninitialized urandom read (4 bytes read)
[   10.648636] random: jshn: uninitialized urandom read (4 bytes read)
[   20.208600] br-lan: port 1(eth0) entered blocking state
[   20.214091] br-lan: port 1(eth0) entered disabled state
[   20.219896] device eth0 entered promiscuous mode
[   20.281342] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   20.419605] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   22.264640] eth0: link up (100Mbps/Full duplex)
[   22.269399] br-lan: port 1(eth0) entered blocking state
[   22.274848] br-lan: port 1(eth0) entered forwarding state
[   22.321481] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[  121.041047] random: crng init done

Hey @angelicmew, it seems the issue you're experiencing is the same as I am. I tracked down the bug to this commit:

Machine name in new version of MikroTik RouterBOARD devices add "RB" before model name:

Old machine name: MikroTik RouterBOARD 951Ui-2nD
New: MikroTik RouterBOARD RB951Ui-2nD

As you can see in your dmesg the machine name is:

MIPS: machine is MikroTik RouterBOARD RB750r2

This fix is not yet in 18.06.4, so you have to use the OpenWRT snapshot image

Thanks for the reply Slask.

I was downloading the snapshot and checked the https://openwrt.org/releases/snapshot description and I would rather wait for a stable release update.
This is going to be used as my main switch at home so I'd like a stable install. But still thanks alot for the update.

How will I know where to check when that patch has been implemented into the stable build?

Hey @angelicmew, 19.07 was released as stable since march this year, so now you should be able to run it.

https://openwrt.org/releases/19.07/start