User Tools

Site Tools


toh:mikrotik:rb951g_2hnd

MikroTik RouterBOARD 951G 2HnD

TFTP Boot OpenWrt manually

  1. boot the RouterOS Image and connect to one of ports 2-5
  2. acquire DHCP IP and telnet to the router (192.168.88.1 for me) user is "admin" password empty (hit enter)
  3. Set RouterOS to boot from DHCP once
    /system routerboard settings set boot-device=try-ethernet-once-then-nand
  4. switch to port 1
  5. configure and start DHCP and TFTP daemons (dnsmasq see next topic)
  6. reboot router (router should download and boot OpenWrt by TFTP)
  7. plug your PC to one of ports 2-5 again and ask for DHCP
  8. telnet to 192.168.1.1
  9. enable SSH by changing root password (run passwd)

manually start dnsmasq as DHCP and TFTP server only

Give yourself an IP within the range subnet 192.168.1.0/24, then start dnsmasq:

dnsmasq -i eth0 --dhcp-range=192.168.1.100,192.168.1.200 \
--dhcp-boot=openwrt-ar71xx-nand-vmlinux-initramfs.elf \
--enable-tftp --tftp-root=/tftp/ -d -u test -p0 -K --log-dhcp --bootp-dynamic

Create images for flashing

$ mkdir /home/user/mikrotik/
$ cd /home/user/mikrotik/
$ svn co -r 40867 svn://svn.openwrt.org/openwrt/trunk/
$ cd trunk/
$ ./scripts/feeds update -a
$ ./scripts/feeds install luci
$ make menuconfig
Subtarget (Mikrotik devices with NAND flash)  --->  (X) Mikrotik devices with NAND flash
Target Profile (Default Profile (no WiFi)) ---> (X) Default Profile (no WiFi) ----- dont worry, WIFI WORKS OK even if you select this option
Target Images  ---> [*] tar.gz (all other targets deselect)
Global build settings  ---> [*] Select all packages by default
exit -> save config
warning: if you want openvpn, go into Network  ---> VPN  ---> <M> openvpn-openssl
$ make -j 4

Result images:

 kernel ----> bin/ar71xx/openwrt-ar71xx-mikrotik-vmlinux-lzma.elf
 rootfs ----> bin/ar71xx/openwrt-ar71xx-mikrotik-DefaultNoWifi-rootfs.tar.gz

SCP images to 192.168.1.1:/tmp

$ scp bin/ar71xx/openwrt-ar71xx-mikrotik-vmlinux-lzma.elf root@192.168.1.1:/tmp
$ scp bin/ar71xx/openwrt-ar71xx-mikrotik-DefaultNoWifi-rootfs.tar.gz root@192.168.1.1:/tmp

Flash kernel & rootfs

root@OpenWrt:/# mtd erase /dev/mtd1
root@OpenWrt:/# mtd erase /dev/mtd2
root@OpenWrt:/# mkdir /mnt/kernel
root@OpenWrt:/# mkdir /mnt/rootfs
root@OpenWrt:/# mount /dev/mtdblock1 /mnt/kernel
root@OpenWrt:/# mount /dev/mtdblock2 /mnt/rootfs
root@OpenWrt:/# mv /tmp/openwrt-ar71xx-mikrotik-vmlinux-lzma.elf /mnt/kernel/kernel
root@OpenWrt:/# chmod +x /mnt/kernel/kernel
root@OpenWrt:/# umount /mnt/kernel
root@OpenWrt:/# cd /mnt/rootfs
root@OpenWrt:/# tar -xvzf /tmp/openwrt-ar71xx-mikrotik-DefaultNoWifi-rootfs.tar.gz
root@OpenWrt:/# cd /
root@OpenWrt:/# umount /mnt/rootfs

reboot and it should boot correctly

Board Layout Images

toh/mikrotik/rb951g_2hnd.txt · Last modified: 2014/07/01 23:08 by intellijean