Ir para o conteúdo
Mostrar cesto Esconder cesto
Voltar a Blog
Tela cheia

Install OpenWrt on Mikrotik SXT Lite 5

17 de Janeiro de 2015, 9:06 , por Bráulio Bhavamitra - 0sem comentários ainda | Ninguém está seguindo este artigo ainda.
Visualizado 5916 vezes

Proprietary stuff, what a bad choice! RouterOS has many features and SXT has pretty powerful hardware, but with level 3 licence you can't even work as a AP! Shame on you Mikrotik!

Start by installing some tools on your machine to setup a TFTP and DHCP server:

sudo apt-get install isc-dhcp-server atftpd wireshark

Write to /etc/default/atftpd

USE_INETD=false
OPTIONS="--bind-address 192.168.1.3 --tftpd-timeout 300 --retry-timeout 5 --mcast-port 1758 --mcast-addr 239.239.239.0-255 --mcast-ttl 1 --maxthread 100 --verbose=5 /srv/tftp"

And to /etc/dhcp/dhcpd.conf 

authoritative;
allow booting;
allow bootp;
one-lease-per-client true;

## any host
subnet 192.168.1.0 netmask 255.255.255.0 {
  filename "openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf";
  next-server 192.168.1.3;
  range dynamic-bootp 192.168.1.10 192.168.1.100;
}

## host specific
#subnet 192.168.1.0 netmask 255.255.255.0 {
#  option routers 192.168.1.254;
#  option subnet-mask 255.255.255.0;
#  option broadcast-address 192.168.1.255;
#  ignore client-updates;
#}
#group {
#  host routerboard {
#    hardware ethernet 4C:5E:0C:7B:6D:98;
#    next-server 192.168.1.3;
#    fixed-address 192.168.1.99;
#    filename "openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf";
#  }
#}

Then

cd /srv/tftp; sudo wget http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/mikrotik/openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf
sudo chmod -R 777 /srv
sudo service network-manager stop
sudo ifconfig eth0 192.168.1.3
sudo service atftpd restart
sudo service isc-dhcp-server restart

The manual is at http://i.mt.lv/routerboard/files/SXTug.pdf. There you have a Button Index where you can see that if you hold the Reset button for more than 20 seconds (10 seconds after blinking stops) then Etherboot will be triggered.

Do this while watching Wireshark and /var/log/syslog

If things has gone correctly, you should be able to access the Luci web interface at http://192.168.1.1

Now you'll need a local webserver for wget2nand to download the kernel and the rootfs:

sudo apt-get install apache2
cd /var/www/html && sudo wget http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/mikrotik/openwrt-ar71xx-mikrotik-vmlinux-lzma.elf
cd /var/www/html && sudo wget http://downloads.openwrt.org/barrier_breaker/14.07/ar71xx/mikrotik/openwrt-ar71xx-mikrotik-DefaultNoWifi-rootfs.tar.gz
cd /var/www/html && sudo ln -sf openwrt-ar71xx-mikrotik-DefaultNoWifi-rootfs.tar.gz openwrt-ar71xx-mikrotik-rootfs.tar.gz

Now flash!

telnet 192.168.1.1
wget2nand 192.168.1.3

If you want to flash multiple devices, setup one with the packages (I've installed rsync ppp-mod-pptp luci-app-qos) and configuration you want and package a new rootfs (replace IP of the template device):

mkdir -p rootfs/{dev,proc,sys}
rsync -avP --exclude 'dev' --exclude 'proc' --exclude 'sys' [email protected]:/ rootfs tar -C rootfs -zcvf openwrt-ar71xx-mikrotik-rootfs.tar.gz .

Inspired by http://www.ericconrad.com/2012/05/installing-openwrt-on-routerboard-750gl.html and https://blog.poettner.de/2011/05/27/openwrt-trunk-on-mikrotik-routerboard-411750 


0sem comentários ainda

    Enviar um comentário

    Os campos são obrigatórios.

    Se você é um usuário registrado, pode se identificar e ser reconhecido automaticamente.

    Cancelar