OpenWRT: Flash Mikrotik RB433: Difference between revisions

From OnnoCenterWiki
Jump to navigationJump to search
Onnowpurbo (talk | contribs)
No edit summary
Onnowpurbo (talk | contribs)
No edit summary
 
(21 intermediate revisions by the same user not shown)
Line 1: Line 1:
Installation overview
Gambaran umum tiga langkah cara instalasi:
Gambaran umum tiga langkah cara instalasi:


* Boot board dengan OpenWrt dari jaringan (netboot): server DHCP dan TFTP dibutuhkan di host.
* Boot board dengan [[OpenWRT]] dari jaringan (netboot): server [[DHCP]] dan [[TFTP]] dibutuhkan di host.
* Instal OpenWrt ke internal flash dengan wget2nand: server HTTP atau FTP dibutuhkan di host.
* Instal [[OpenWRT]] ke internal flash dengan wget2nand: server [[HTTP]] atau [[FTP]] dibutuhkan di host.
* Reboot dengan instalasi baru, lakukan konfigurasi dll.
* Reboot dengan instalasi baru, lakukan konfigurasi dll.


==Netboot==
==Netboot==


bootloader dari RB433 mampu untuk meload image dalam format elf melalui BOOTP ke RAM dan menjalankannya.
bootloader dari RB433 mampu untuk meload image dalam format elf melalui [[BOOTP]] ke [[RAM]] dan menjalankannya.




==Build Image==
==Build Image==


Kita perlu mendownload OpenWrt trunk. Di menuconfig pilih:
Kita perlu mendownload [[OpenWRT]] trunk. Di menuconfig pilih:


* Target System: Atheros AR7xxx/AR9xxx
* Target System: Atheros AR7xxx/AR9xxx
Line 20: Line 18:
* Target Images: ramdisk (juga tar.gz jika kita berencana untuk menginstalasi secara permanen dengan image yang sama).
* Target Images: ramdisk (juga tar.gz jika kita berencana untuk menginstalasi secara permanen dengan image yang sama).


Now build the ram disk version. While it's building create the tftp-root directory if not already done and a symlink to the ram disk image
Buat versi ram disk. Cara membuat binary ramdisk di terangkan di [[OpenWRT: Build Firmware Mikrotik RB433 | Cara Membuat Firmware OpenWRT Mikrotik RB433]].
Jika sudah ada binary-nya copy ke directory tftp-root, misalnya.


  sudo mkdir -p /tftpboot
  sudo mkdir -p /tftpboot
  # sudo ln -sf $(HOME)/openwrt/rb433uah-netboot/bin/ar71xx/openwrt-ar71xx-nand-vmlinux-initramfs.elf /tftpboot/openwrt.elf
  sudo cp openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf /tftpboot/openwrt.elf
sudo chmod -Rf 777 /tftpboot/


cp openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf /tftpboot/openwrt.elf
==Setup Host==
chmod -Rf 777 /tftpboot/


==Setup the Host==
Kita membutuhkan server [[BOOTP]] dan [[TFTP]] di host, yang paling mudah adalah menggunakan dnsmasq, karena dapat memberikan dua layanan tersebut sekaligus. Install menggunakan perintah:
 
You need a BOOTP and a TFTP server on your host machine, we use dnsmasq here, since it can provide both services. Install dnsmasq with:


  sudo apt-get install dnsmasq
  sudo apt-get install dnsmasq


Changes in
Ubah dnsmasq.conf


  vi /etc/dnsmasq.conf
  vi /etc/dnsmasq.conf


only listen on the interface which is directly connected to the RouterBoards WAN (PoE) port. e.g.
Misalnya menggunakan parameter


    interface=eth0
interface=eth0
dhcp-range=192.168.1.50,192.168.1.150,12h
# dhcp-host=00:0C:42:XX:XX:XX,192.168.6.101 # ubah menggunakan MAC board Mikrotik yang kita gunakan
dhcp-host=00:0C:42:72:E0:41,192.168.1.100
enable-tftp
tftp-root=/tftpboot
dhcp-boot=/tftpboot/openwrt.elf,boothost,192.168.1.6


allow a DHCP range, e.g.


dhcp-range=192.168.0.50,192.168.0.150,12h
dhcp-host penting untuk di set. Jika ini tidak diset maka RB433 tidak akan menerima firmware dari laptop.
Masalahnya kita harus mengetahui MAC address RB433 yang kita gunakan.
Paling gampang menggunakan serial


allocate an IP address to the board, e.g.
RouterBOOT booter 3.02
RouterBoard 433AH
CPU frequency: 680 MHz
  Memory size: 128 MiB
    NAND size: 128 MiB
Press any key within 2 seconds to enter setup..


#    dhcp-host=00:0C:42:XX:XX:XX,192.168.6.101
tekan i dua kali
dhcp-host=00:0C:42:72:E0:41,192.168.0.100
(replace the XX with the MAC address of your board!)


enable dnsmasq's built-in TFTP server
your choice: i - board info
 
    enable-tftp
Board Info:
 
set the root directory for files available via FTP.
        Board type: 433AH
 
      Serial number: 3D7701B2CD48
    tftp-root=/tftpboot
  Firmware version: 3.10
 
      CPU frequency: 680 MHz
set filename (produced above) and tftpd server for BOOTP, e. g.
        Memory size: 128 MiB
          NAND size: 128 MiB
        Build time: 2013-09-16 09:35:49
  eth1 MAC address: 00:0C:42:6F:95:FF
  eth2 MAC address: 00:0C:42:6F:95:00
  eth3 MAC address: 00:0C:42:6F:95:01
press any key to continue...


    dhcp-boot=/tftpboot/openwrt.elf,boothost,192.168.0.6


Finally restart dnsmasq
Restart dnsmasq


  /etc/init.d/dnsmasq restart  
  /etc/init.d/dnsmasq restart  


You will probably need to set the IP of the interface manually:
Jika diperlukan kita dapat menset IP dari interface secara manual, misalnya:


  sudo ip addr add 192.168.6.1/24 dev eth0
  sudo ip addr add 192.168.1.6/24 dev eth0
sudo ifconfig eth0 192.168.1.6


==Setup the Target==
==Setup Target==


Install
Install screen untuk komunikasi serial melalui RS232


  apt-get install screen
  apt-get install screen


Cara loginnya
Sambungkan kabel serial RS232 antara laptop / PC ke Mikrotik RB433 . Jalankan di terminal


  screen /dev/ttyUSB0 115200,cs8,-ixon,-ixoff
  screen /dev/ttyUSB0 115200,cs8,-ixon,-ixoff


Langkah yang perlu dilakukan:


* Connect to the serial port with a null modem cable (115200, 8N1).
* Sambungkan ke serial port dengan kabel serial (115200, 8N1).
* Press a key shortly after powering the board.
* Tekan tombol apapun setelah board dinyalakan.
* Press o to change the boot device
* Tekan o to change the boot device
* Press e to boot from ethernet in the future.
* Tekan e to boot from ethernet in the future.
* Press x to leave setup (-o-e-x is needed only once, the boot method is saved in non-volatile memory)
* Tekan x untk keluar dari setup (-o-e-x is needed only once, the boot method is saved in non-volatile memory)
 
* CATATAN: untuk mengembalikan boot ke NAND tekan -o-o-x
 
Untuk memperbaiki
tekan o - o - x
 


Akan keluar


  RouterBOOT booter 3.02
  RouterBOOT booter 3.02
Line 105: Line 120:
  Press any key within 2 seconds to enter setup..
  Press any key within 2 seconds to enter setup..


 
Jika semua benar akan tampak kira-kira seperti:
 
If everything is setup correctly it should look like:
 




  RouterBOOT booter 2.16
  RouterBOOT booter 2.16
 
  RouterBoard 433AH
  RouterBoard 433AH
 
  CPU frequency: 680 MHz
  CPU frequency: 680 MHz
   Memory size: 128 MB
   Memory size: 128 MB
 
  Press any key within 2 seconds to enter setup..
  Press any key within 2 seconds to enter setup..
  trying bootp protocol.......... OK
  trying bootp protocol.......... OK
  Got IP address: 192.168.6.101
  Got IP address: 192.168.1.100
  resolved mac address 4E:80:00:00:00:00
  resolved mac address 00:0C:42:72:E0:41
  Gateway: 192.168.6.1
  Gateway: 192.168.1.6
  transfer started ................................... transfer ok, time=7.16s
  transfer started ................................... transfer ok, time=7.16s
  setting up elf image... OK
  setting up elf image... OK
Line 129: Line 141:
  console [early0] enabled
  console [early0] enabled
  ...
  ...
 
procd: - init complete -
 
[  12.270000] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
 
[  12.270000] device eth1 entered promiscuous mode
  RouterBOOT booter 3.02
[  12.280000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[  12.310000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[  12.460000] eth0: link up (100Mbps/Full duplex)
[  12.460000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[  13.780000] eth1: link up (100Mbps/Full duplex)
[  13.780000] br-lan: port 1(eth1) entered forwarding state
[  13.790000] br-lan: port 1(eth1) entered forwarding state
[  13.790000] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[  13.820000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
  [  15.790000] br-lan: port 1(eth1) entered forwarding state
   
   
  RouterBoard 433AH
  BusyBox v1.19.4 (2013-12-18 06:16:05 WIB) built-in shell (ash)
Enter 'help' for a list of built-in commands.
   
   
CPU frequency: 680 MHz
   _______                    ________        __
   Memory size: 128 MiB
  |      |.-----.-----.-----.|  |  |  |.----.|  |_
    NAND size: 128 MiB
  |  -  ||  _ |  -__|    ||  |  |  ||  _||  _|
  |_______||  __|_____|__|__||________||__| |____|
Press any key within 2 seconds to enter setup..
          |__| W I R E L E S S  F R E E D O M
trying bootp protocol.... OK
  -----------------------------------------------------
  Got IP address: 192.168.0.100
  BARRIER BREAKER (Bleeding Edge, r39125)
  resolved mac address 00:03:0D:E3:DB:76
  -----------------------------------------------------
Gateway: 192.168.0.6
  * 1/2 oz Galliano        Pour all ingredients into
  transfer started  ........................................................................................
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum      with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
  -----------------------------------------------------
  root@OpenWrt:/#


==Permanent Installation==
==Instalasi Permanen==


You need a working netboot first, see above. Please note also that you cannot reflash from a previous OpenWrt installation, you need the netboot in any case.
Untuk melakukan instalasi permanen, kita perlu masuk menggunakan netboot melalui BOOTP & TFTP
seperti di atas.
Kita tidak bisa me-reflash dari instalasi [[OpenWRT]] sebelumnya,
flash hanya bisa dilakukan melalui netboot.


==Target Image==
==Target Image==


If you want to use the same trunk image as the netboot image (cf. above), you need to have the tar.gz target selected in the Target Images menu and rebuild if you didn't select it before. You can also use one of the pre-built images (tested with 12.09-rc2); in the download area, browse the ar71xx/nand/ directory and pick the two following files:
Buat target Image Untuk flash NAND Mikrotik RB433. Pastikan make menuconfig ada
 
Target System > Atheros AR7xxx/AR9xxx
Subtarget > Mikrotik devices with NAND flash
Target Profile > Atheros WiFi (ath5k)
Target Images >
        cpio.gz
        tar.gz
        ext4
        jffs2
        squashfs
        GZip images
 
Cara membuat binary ramdisk di terangkan di [[OpenWRT: Build Firmware Mikrotik RB433 | Cara Membuat Firmware OpenWRT Mikrotik RB433]]. File yang dperlukan untuk me-flash NAND adalah


* openwrt-ar71xx-nand-rootfs.tar.gz
* openwrt-ar71xx-nand-rootfs.tar.gz
* openwrt-ar71xx-nand-vmlinux-lzma.elf
* openwrt-ar71xx-nand-vmlinux-lzma.elf


If you don't have many devices to install and your netbooted system can access the Internet, you can probably pass the download URL directly to wget2nand as well, that will save you the web server configuration step (see below).
Untuk OpenWRT versi baru kemungkinan adalah
 
* openwrt-ar71xx-mikrotik-Ath5k-rootfs.tar.gz
* openwrt-ar71xx-mikrotik-vmlinux-lzma.elf
 
Supaya aman sebaiknya semua file berikut di letakan di web
 
* openwrt-ar71xx-mikrotik-Ath5k-rootfs.tar.gz
* openwrt-ar71xx-mikrotik-root.squashfs
* openwrt-ar71xx-mikrotik-root.squashfs-64k
* openwrt-ar71xx-mikrotik-vmlinux.bin
* openwrt-ar71xx-mikrotik-vmlinux.elf
* openwrt-ar71xx-mikrotik-vmlinux.gz
* openwrt-ar71xx-mikrotik-vmlinux.lzma
* openwrt-ar71xx-mikrotik-vmlinux-lzma.elf


==Save your RouterOS license key==
==Save your RouterOS license key==
Line 178: Line 234:
Then copy-paste the text in a file on your computer. The differences between the obtained key file and a key exported with Winbox are that the SoftwareID line is not present in the latter, and there are no empty lines, so you should probably delete all the empty lines in your file prior to import it for a new installation; the SoftwareID line should not bother the installer (untested).
Then copy-paste the text in a file on your computer. The differences between the obtained key file and a key exported with Winbox are that the SoftwareID line is not present in the latter, and there are no empty lines, so you should probably delete all the empty lines in your file prior to import it for a new installation; the SoftwareID line should not bother the installer (untested).


==Erase the NAND Flash==
==Format NAND Flash==


If you want to install OpenWrt permanently into the NAND flash you once need to erase the NAND flash to get rid of the RouterOS stuff:
Jika kita ingin menginstalasi OpenWRT secara permanen ke NAND flash.
Kita perlu memformat NAND flash untuk membuang semua RouterOS.


* connect via serial line
Caranya:
* press a key shortly after powering the RB433 up
* press e and type yes to format the flash from the bootloader


==Setup the Host==
* Sambung melalui kabel serial.
* Tekan keyboard setelah RB433 nyala.
* Tekan e dan ketik yes untuk memformat flash dari bootloader.


An HTTP web server is required on the host, e.g. mini-httpd in Ubuntu. Install the mini-httpd web server
==Setup Apache Web Server Lokal==


sudo apt-get install mini-httpd
[[Instalasi Apache | Setup Apache Web Server Lokal di laptop / PC]].
Kemudian sebagai user biasa yang mengcompile OpenWRT, lakukan:


In /etc/default/mini-httpd change
rm /var/www/index*
cp ~/openwrt.trunk/trunk/bin/ar71xx/* /var/www
sudo chmod 777 /var/www
mv openwrt-ar71xx-mikrotik-Ath5k-rootfs.tar.gz openwrt-ar71xx-mikrotik-rootfs.tar.gz


    Start daemon
Jika perintah mv di atas tidak dilakukan, maka akan terjadi kesalahan berikut


    START=1
Connecting to 192.168.1.6 (192.168.1.6:80)
kernel              100% |*******************************|  1047k  0:00:00 ETA
Connecting to 192.168.1.6 (192.168.1.6:80)
wget: server returned error: HTTP/1.1 404 Not Found
Unable to download http://192.168.1.6/openwrt-ar71xx-mikrotik-rootfs.tar.gz


In /etc/mini-httpd.conf change


    On which host mini_httpd should bind
==Install OpenWrt ke NAND Flash==


host=192.168.6.1
Lakukan:


    Run in chroot mode
* netboot
* Tekan ENTER Untuk memperoleh shell.
* Lakukan


  chroot
  ping 192.168.1.6


    Where are the web files stored
Pastikan ada sambungan, jika tidak kadang kala bisa di atasi dengan mematikan br-lan


  data_dir=/home/openwrt/rb433uah/bin/ar71xx/
  ifconfig br-lan down


Restart the mini-httpd web server


sudo /etc/init.d/mini-httpd restart
Alternatif lain, pindahkan kabel LAN dari laptop / PC ke LAN RB433 yang bukan PoE. Pastikan ada sambungan ke laptop / PC.


Install OpenWrt into Flash
ping 192.168.1.6


    Start netboot (see above).
Kemudian
    Press ENTER to get a shell prompt.
    Execute:


wget2nand http://192.168.6.1
wget2nand http://192.168.1.6


This script will set an IP address via dhcp on br-lan. The output should look like:
Script ini akan melakukan transfer melalui br-lan, dengan tampilan


  root@OpenWrt:/# wget2nand http://192.168.6.254
 
  Connecting to 192.168.6.254 (192.168.6.254:80)
  root@OpenWrt:/# wget2nand http://192.168.1.6
  Connecting to 192.168.1.6 (192.168.1.6:80)
  kernel              100% |*******************************|  1041k  0:00:00 ETA
  kernel              100% |*******************************|  1041k  0:00:00 ETA
  Connecting to 192.168.6.254 (192.168.6.254:80)
  Connecting to 192.168.1.6 (192.168.1.6:80)
  rootfs.tgz          100% |*******************************|  4243k  0:00:00 ETA
  rootfs.tgz          100% |*******************************|  4243k  0:00:00 ETA
  Erasing filesystem...
  Erasing filesystem...
Line 251: Line 315:
  ./usr/lib/opkg/
  ./usr/lib/opkg/
  …
  …
  ./proc/
  ./bin/vi
  ./sys/
  ./bin/mv
  ./www/
  ./bin/touch
  ./root/
  ./bin/mknod
  ./var
  ./bin/sed
./bin/chmod
./bin/sync
./bin/zcat
./bin/netstat
./bin/lock
./bin/ubus
./bin/sleep
./bin/gunzip
./bin/gzip
  Cleaning up...
  Cleaning up...
  Image written, you can now reboot.  Remember to change the boot source to Boot from Nand
  Image written, you can now reboot.  Remember to change the boot source to Boot from Nand


==Reboot the RB433 and change the boot source to NAND.==
==Ubah Boot Source==


==USB Ports==
* Sambungkan ke serial port dengan kabel serial (115200, 8N1).
 
* Tekan tombol sembarang setelah board RB433 dinyalakan.
To have the USB ports work on the RB433UAH, you need to install the kmod-usb2 package, as explained on the USB Basic Support page. See also the USB Overview page.
* Tekan o ubah boot device
* Tekan o boot dari NAND flash
* Tekan x untk keluar dari setup


==Referensi==
==Referensi==
Line 277: Line 352:
* [[OpenWRT: Source Repository Download]]
* [[OpenWRT: Source Repository Download]]
* [[OpenWRT: Melihat Daftar Package]]
* [[OpenWRT: Melihat Daftar Package]]
* [[OpenWRT: Mengembalikan setting default Config.in]]


===Build Firmware===
===Build Firmware===
Line 295: Line 371:
* [[OpenWRT: Build Firmware Linksys WRT160NL]]
* [[OpenWRT: Build Firmware Linksys WRT160NL]]
* [[OpenWRT: Build Firmware Linksys WRT54GL]]
* [[OpenWRT: Build Firmware Linksys WRT54GL]]
* [[OpenWRT: Build Firmware Mikrotik RB433]]


===APRX===
===APRX===
Line 301: Line 376:


* [[OpenWRT: Build Firmware Buffalo WZRHPG300NH2 untuk APRX]]
* [[OpenWRT: Build Firmware Buffalo WZRHPG300NH2 untuk APRX]]
* [[OpenWRT: Setup APRX]]


===IPv6===
===IPv6===
Line 331: Line 407:
* [[OpenWRT: Setup PPTP VPN Server]]
* [[OpenWRT: Setup PPTP VPN Server]]
* [[OpenWRT: Setup OLSR di UBNT via CLI]] '''RECOMMENDED'''
* [[OpenWRT: Setup OLSR di UBNT via CLI]] '''RECOMMENDED'''
* [[OpenWRT: Mikrotik RB433]]
* [[OpenWRT: Mikrotik RB433]] '''RECOMMENDED'''
* [[OpenWRT: Setup OLSR Sederhana]]
* [[OpenWRT: Setup OLSR Sederhana]]
* [[OpenWRT: Setup OLSR via Web]] '''RECOMMENDED'''
* [[OLSR - di OpenWRT]]
* [[OLSR - di OpenWRT]]
* [[OpenWRT: 3G modem]]
* [[OpenWRT: 3G modem]]
Line 338: Line 415:
* [[OpenWRT: Setup Firewall]]
* [[OpenWRT: Setup Firewall]]
* [[OpenWRT: Konfigurasi UBNT NanoStation2 tanpa WebGUI]]
* [[OpenWRT: Konfigurasi UBNT NanoStation2 tanpa WebGUI]]
* [[OpenWRT: OLSR nameservice plugin]]


===UBNT===
===UBNT===
Line 345: Line 423:
* [[UBNT: Upload Firmware]]
* [[UBNT: Upload Firmware]]
* [[UBNT: Rebuild Firmware]]
* [[UBNT: Rebuild Firmware]]
* [[UBNT: firmware dengan OLSR]]
* [[UBNT: firmware dengan OLSR]]25
* [[UBNT: openwrt]]
* [[UBNT: openwrt]]
* [[UBNT: olsr dengan openwrt]]
* [[UBNT: olsr dengan openwrt]]
* [[UBNT: olsr dengan kamikaze openwrt]]
* [[UBNT: olsr dengan kamikaze openwrt]]
* [[UBNT: olsr dengan backfire openwrt]] '''RECOMMENDED'''
* [[UBNT: olsr dengan backfire openwrt]]
* [[UBNT: UniFi]]
* [[UBNT: UniFi]]
* [[UBNT: UniFi Konfigurasi Awal]]
* [[UBNT: UniFi Konfigurasi Awal]]

Latest revision as of 22:25, 23 January 2014

Gambaran umum tiga langkah cara instalasi:

  • Boot board dengan OpenWRT dari jaringan (netboot): server DHCP dan TFTP dibutuhkan di host.
  • Instal OpenWRT ke internal flash dengan wget2nand: server HTTP atau FTP dibutuhkan di host.
  • Reboot dengan instalasi baru, lakukan konfigurasi dll.

Netboot

bootloader dari RB433 mampu untuk meload image dalam format elf melalui BOOTP ke RAM dan menjalankannya.


Build Image

Kita perlu mendownload OpenWRT trunk. Di menuconfig pilih:

  • Target System: Atheros AR7xxx/AR9xxx
  • Subtarget: Devices with NAND flash (mostly Mikrotik)
  • Target Images: ramdisk (juga tar.gz jika kita berencana untuk menginstalasi secara permanen dengan image yang sama).

Buat versi ram disk. Cara membuat binary ramdisk di terangkan di Cara Membuat Firmware OpenWRT Mikrotik RB433. Jika sudah ada binary-nya copy ke directory tftp-root, misalnya.

sudo mkdir -p /tftpboot
sudo cp openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf /tftpboot/openwrt.elf
sudo chmod -Rf 777 /tftpboot/

Setup Host

Kita membutuhkan server BOOTP dan TFTP di host, yang paling mudah adalah menggunakan dnsmasq, karena dapat memberikan dua layanan tersebut sekaligus. Install menggunakan perintah:

sudo apt-get install dnsmasq

Ubah dnsmasq.conf

vi /etc/dnsmasq.conf

Misalnya menggunakan parameter

interface=eth0
dhcp-range=192.168.1.50,192.168.1.150,12h
# dhcp-host=00:0C:42:XX:XX:XX,192.168.6.101 # ubah menggunakan MAC board Mikrotik yang kita gunakan
dhcp-host=00:0C:42:72:E0:41,192.168.1.100
enable-tftp
tftp-root=/tftpboot
dhcp-boot=/tftpboot/openwrt.elf,boothost,192.168.1.6


dhcp-host penting untuk di set. Jika ini tidak diset maka RB433 tidak akan menerima firmware dari laptop. Masalahnya kita harus mengetahui MAC address RB433 yang kita gunakan. Paling gampang menggunakan serial

RouterBOOT booter 3.02

RouterBoard 433AH

CPU frequency: 680 MHz
  Memory size: 128 MiB
    NAND size: 128 MiB

Press any key within 2 seconds to enter setup..

tekan i dua kali

your choice: i - board info

Board Info:

        Board type: 433AH
     Serial number: 3D7701B2CD48
  Firmware version: 3.10
     CPU frequency: 680 MHz
       Memory size: 128 MiB
         NAND size: 128 MiB
        Build time: 2013-09-16 09:35:49
  eth1 MAC address: 00:0C:42:6F:95:FF
  eth2 MAC address: 00:0C:42:6F:95:00
  eth3 MAC address: 00:0C:42:6F:95:01

press any key to continue...


Restart dnsmasq

/etc/init.d/dnsmasq restart 

Jika diperlukan kita dapat menset IP dari interface secara manual, misalnya:

sudo ip addr add 192.168.1.6/24 dev eth0
sudo ifconfig eth0 192.168.1.6

Setup Target

Install screen untuk komunikasi serial melalui RS232

apt-get install screen

Sambungkan kabel serial RS232 antara laptop / PC ke Mikrotik RB433 . Jalankan di terminal

screen /dev/ttyUSB0 115200,cs8,-ixon,-ixoff

Langkah yang perlu dilakukan:

  • Sambungkan ke serial port dengan kabel serial (115200, 8N1).
  • Tekan tombol apapun setelah board dinyalakan.
  • Tekan o to change the boot device
  • Tekan e to boot from ethernet in the future.
  • Tekan x untk keluar dari setup (-o-e-x is needed only once, the boot method is saved in non-volatile memory)
  • CATATAN: untuk mengembalikan boot ke NAND tekan -o-o-x

Akan keluar

RouterBOOT booter 3.02

RouterBoard 433AH

CPU frequency: 680 MHz
  Memory size: 128 MiB
    NAND size: 128 MiB

Press any key within 2 seconds to enter setup..

Jika semua benar akan tampak kira-kira seperti:


RouterBOOT booter 2.16

RouterBoard 433AH

CPU frequency: 680 MHz
  Memory size: 128 MB

Press any key within 2 seconds to enter setup..
trying bootp protocol.......... OK
Got IP address: 192.168.1.100
resolved mac address 00:0C:42:72:E0:41
Gateway: 192.168.1.6
transfer started ................................... transfer ok, time=7.16s
setting up elf image... OK
jumping to kernel code
Linux version 2.6.26.7 (joerga@thinkpad) (gcc version 4.1.2) #2 Mon Nov 10 11:23:37 CET 2008
console [early0] enabled
...
procd: - init complete -
[   12.270000] IPv6: ADDRCONF(NETDEV_UP): eth1: link is not ready
[   12.270000] device eth1 entered promiscuous mode
[   12.280000] IPv6: ADDRCONF(NETDEV_UP): br-lan: link is not ready
[   12.310000] IPv6: ADDRCONF(NETDEV_UP): eth0: link is not ready
[   12.460000] eth0: link up (100Mbps/Full duplex)
[   12.460000] IPv6: ADDRCONF(NETDEV_CHANGE): eth0: link becomes ready
[   13.780000] eth1: link up (100Mbps/Full duplex)
[   13.780000] br-lan: port 1(eth1) entered forwarding state
[   13.790000] br-lan: port 1(eth1) entered forwarding state
[   13.790000] IPv6: ADDRCONF(NETDEV_CHANGE): eth1: link becomes ready
[   13.820000] IPv6: ADDRCONF(NETDEV_CHANGE): br-lan: link becomes ready
[   15.790000] br-lan: port 1(eth1) entered forwarding state

BusyBox v1.19.4 (2013-12-18 06:16:05 WIB) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 BARRIER BREAKER (Bleeding Edge, r39125)
 -----------------------------------------------------
  * 1/2 oz Galliano         Pour all ingredients into
  * 4 oz cold Coffee        an irish coffee mug filled
  * 1 1/2 oz Dark Rum       with crushed ice. Stir.
  * 2 tsp. Creme de Cacao
 -----------------------------------------------------
root@OpenWrt:/#

Instalasi Permanen

Untuk melakukan instalasi permanen, kita perlu masuk menggunakan netboot melalui BOOTP & TFTP seperti di atas. Kita tidak bisa me-reflash dari instalasi OpenWRT sebelumnya, flash hanya bisa dilakukan melalui netboot.

Target Image

Buat target Image Untuk flash NAND Mikrotik RB433. Pastikan make menuconfig ada

Target System > Atheros AR7xxx/AR9xxx
Subtarget > Mikrotik devices with NAND flash
Target Profile > Atheros WiFi (ath5k) 
Target Images >
       cpio.gz 
       tar.gz
       ext4
       jffs2
       squashfs
       GZip images

Cara membuat binary ramdisk di terangkan di Cara Membuat Firmware OpenWRT Mikrotik RB433. File yang dperlukan untuk me-flash NAND adalah

  • openwrt-ar71xx-nand-rootfs.tar.gz
  • openwrt-ar71xx-nand-vmlinux-lzma.elf

Untuk OpenWRT versi baru kemungkinan adalah

  • openwrt-ar71xx-mikrotik-Ath5k-rootfs.tar.gz
  • openwrt-ar71xx-mikrotik-vmlinux-lzma.elf

Supaya aman sebaiknya semua file berikut di letakan di web

  • openwrt-ar71xx-mikrotik-Ath5k-rootfs.tar.gz
  • openwrt-ar71xx-mikrotik-root.squashfs
  • openwrt-ar71xx-mikrotik-root.squashfs-64k
  • openwrt-ar71xx-mikrotik-vmlinux.bin
  • openwrt-ar71xx-mikrotik-vmlinux.elf
  • openwrt-ar71xx-mikrotik-vmlinux.gz
  • openwrt-ar71xx-mikrotik-vmlinux.lzma
  • openwrt-ar71xx-mikrotik-vmlinux-lzma.elf

Save your RouterOS license key

If you have access to the MikroTik's Winbox software, you can export the license file from System→Licence, as stated on the RouterBoard 411 page.

Otherwise, boot RouterOS and export the key to a file:

/system license output

Then list the files on your device to see which file the .key file was saved:

/file print

On a fresh install, the key file should be #1 (or #0 on a RB433UAH); to open the editor with file #1, type:

/file edit 1 value-name=contents

Then copy-paste the text in a file on your computer. The differences between the obtained key file and a key exported with Winbox are that the SoftwareID line is not present in the latter, and there are no empty lines, so you should probably delete all the empty lines in your file prior to import it for a new installation; the SoftwareID line should not bother the installer (untested).

Format NAND Flash

Jika kita ingin menginstalasi OpenWRT secara permanen ke NAND flash. Kita perlu memformat NAND flash untuk membuang semua RouterOS.

Caranya:

  • Sambung melalui kabel serial.
  • Tekan keyboard setelah RB433 nyala.
  • Tekan e dan ketik yes untuk memformat flash dari bootloader.

Setup Apache Web Server Lokal

Setup Apache Web Server Lokal di laptop / PC. Kemudian sebagai user biasa yang mengcompile OpenWRT, lakukan:

rm /var/www/index*
cp ~/openwrt.trunk/trunk/bin/ar71xx/* /var/www
sudo chmod 777 /var/www
mv openwrt-ar71xx-mikrotik-Ath5k-rootfs.tar.gz openwrt-ar71xx-mikrotik-rootfs.tar.gz

Jika perintah mv di atas tidak dilakukan, maka akan terjadi kesalahan berikut

Connecting to 192.168.1.6 (192.168.1.6:80)
kernel               100% |*******************************|  1047k  0:00:00 ETA
Connecting to 192.168.1.6 (192.168.1.6:80)
wget: server returned error: HTTP/1.1 404 Not Found
Unable to download http://192.168.1.6/openwrt-ar71xx-mikrotik-rootfs.tar.gz


Install OpenWrt ke NAND Flash

Lakukan:

  • netboot
  • Tekan ENTER Untuk memperoleh shell.
  • Lakukan
ping 192.168.1.6

Pastikan ada sambungan, jika tidak kadang kala bisa di atasi dengan mematikan br-lan

ifconfig br-lan down


Alternatif lain, pindahkan kabel LAN dari laptop / PC ke LAN RB433 yang bukan PoE. Pastikan ada sambungan ke laptop / PC.

ping 192.168.1.6

Kemudian

wget2nand http://192.168.1.6

Script ini akan melakukan transfer melalui br-lan, dengan tampilan


root@OpenWrt:/# wget2nand http://192.168.1.6
Connecting to 192.168.1.6 (192.168.1.6:80)
kernel               100% |*******************************|  1041k  0:00:00 ETA
Connecting to 192.168.1.6 (192.168.1.6:80)
rootfs.tgz           100% |*******************************|  4243k  0:00:00 ETA
Erasing filesystem...
[  137.110000] nand_erase_nand: attempt to erase a bad block at page 0x00002240
[  137.140000] nand_erase_nand: attempt to erase a bad block at page 0x00003ac0
[  137.180000] nand_erase_nand: attempt to erase a bad block at page 0x00005d40
[  137.620000] nand_erase_nand: attempt to erase a bad block at page 0x00026a80
[  137.850000] nand_erase_nand: attempt to erase a bad block at page 0x000373c0
[  137.860000] nand_erase_nand: attempt to erase a bad block at page 0x00037440
[  138.000000] yaffs: dev is 32505861 name is "mtdblock5" rw
[  138.000000] yaffs: passed flags ""
[  138.020000] yaffs: dev is 32505862 name is "mtdblock6" rw
[  138.020000] yaffs: passed flags ""
Mounting /dev/mtdblock6 as new root and /dev/mtdblock5 as kernel partition
Copying kernel...
Preparing filesystem...
./
./tmp/
./usr/
./usr/lib/
./usr/lib/opkg/
…
./bin/vi
./bin/mv
./bin/touch
./bin/mknod
./bin/sed
./bin/chmod
./bin/sync
./bin/zcat
./bin/netstat
./bin/lock
./bin/ubus
./bin/sleep
./bin/gunzip
./bin/gzip
Cleaning up...
Image written, you can now reboot.  Remember to change the boot source to Boot from Nand

Ubah Boot Source

  • Sambungkan ke serial port dengan kabel serial (115200, 8N1).
  • Tekan tombol sembarang setelah board RB433 dinyalakan.
  • Tekan o ubah boot device
  • Tekan o boot dari NAND flash
  • Tekan x untk keluar dari setup

Referensi

Pranala Menarik

Build Firmware

APRX

IPv6

Flash Firmware

Misc

UBNT