Difference between revisions of "OpenWRT: Flash Mikrotik RB433"
Onnowpurbo (talk | contribs) |
Onnowpurbo (talk | contribs) |
||
Line 120: | Line 120: | ||
==Target Image== | ==Target Image== | ||
− | + | File yang dperlukan untuk me-flas 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 | ||
− | |||
− | |||
==Save your RouterOS license key== | ==Save your RouterOS license key== |
Revision as of 04:29, 19 December 2013
Installation overview
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. Jika sudah ada binary-nya, buat symlink atau copy ke directory tftp-root, misalnya.
sudo mkdir -p /tftpboot # sudo ln -sf $(HOME)/openwrt/rb433uah-netboot/bin/ar71xx/openwrt-ar71xx-nand-vmlinux-initramfs.elf /tftpboot/openwrt.elf cp openwrt-ar71xx-mikrotik-vmlinux-initramfs.elf /tftpboot/openwrt.elf 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.0.50,192.168.0.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.0.100 enable-tftp tftp-root=/tftpboot dhcp-boot=/tftpboot/openwrt.elf,boothost,192.168.0.6
Restart dnsmasq
/etc/init.d/dnsmasq restart
Jika diperlukan kita dapat menset IP dari interface secara manual, misalnya:
sudo ip addr add 192.168.0.1/24 dev eth0 sudo ifconfig eth0 192.168.0.1
Setup Target
Install
apt-get install screen
Sambunkan kabel serial. 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
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.6.101 resolved mac address 4E:80:00:00:00:00 Gateway: 192.168.6.1 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 ...
Instalasi Permanen
Untuk melakukan instalasi permanen, kita perlu masuk menggunakan netboot. Kita tidak bisa me-reflash dari instalasi OpenWRT sebelumnya, flash hanya bisa dilakukan melalui netboot.
Target Image
File yang dperlukan untuk me-flas NAND adalah
- openwrt-ar71xx-nand-rootfs.tar.gz
- openwrt-ar71xx-nand-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).
Erase the NAND Flash
Jika kita ingin menginstalasi OpenWRT secara perman ke NAND flash. Kita perlu memformat NAND flash untuk membuang semua RouterOS.
Caranya:
- Sambung melalui serial.
- Tekan keyboard setelah RB433 nyala.
- Tekan e dan ketik yes untuk memformat flash dari bootloader.
Setup the Host
An HTTP web server is required on the host, e.g. mini-httpd in Ubuntu. Install the mini-httpd web server
sudo apt-get install mini-httpd
In /etc/default/mini-httpd change
Start daemon
START=1
In /etc/mini-httpd.conf change
On which host mini_httpd should bind
host=192.168.6.1
Run in chroot mode
chroot
Where are the web files stored
data_dir=/home/openwrt/rb433uah/bin/ar71xx/
Restart the mini-httpd web server
sudo /etc/init.d/mini-httpd restart
Install OpenWrt into Flash
Start netboot (see above). Press ENTER to get a shell prompt. Execute:
wget2nand http://192.168.6.1
This script will set an IP address via dhcp on br-lan. The output should look like:
root@OpenWrt:/# wget2nand http://192.168.6.254 Connecting to 192.168.6.254 (192.168.6.254:80) kernel 100% |*******************************| 1041k 0:00:00 ETA Connecting to 192.168.6.254 (192.168.6.254: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/ … ./proc/ ./sys/ ./www/ ./root/ ./var Cleaning up... 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.
USB Ports
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.
Referensi
- http://wiki.openwrt.org/toh/mikrotik/rb450g
- http://blog.vodkamelone.de/archives/148-Installing-OpenWrt-on-a-Microtik-Routerboard-RB433.html
- http://wiki.openwrt.org/toh/mikrotik/rb433
Pranala Menarik
- OpenWRT
- OpenWRT: Download Firmware yang sudah jadi
- OpenWRT: Source Repository Download
- OpenWRT: Melihat Daftar Package
Build Firmware
- OpenWRT: Build Firmware
- OpenWRT: Build Firmware Download Source Pendukung
- OpenWRT: Build Firmware Buffalo WZRHPG450H
- OpenWRT: Build Firmware Buffalo WZRHPG300N
- OpenWRT: Build Firmware Buffalo WZRHPG300NH2
- Buffalo
- Buffalo: WZRHPG450H Cara Recovery
- Buffalo: WZRHPG450H OpenWRT mengaktifkan setelah di flash
- Buffalo: WZRHPG450H Membuat Firmware OpenWRT Sendiri RECOMMENDED
- Buffalo: WZRHPG450H OpenWRT instalasi aplikasi Pendukung OLSRD
- OpenWRT: Build Firmware Ubiquiti NanoStation2 RECOMMENDED
- OpenWRT: Build Firmware Ubiquiti NanoStationM2 RECOMMENDED
- OpenWRT: Build Firmware Mikrotik RB433
- OpenWRT: Build Firmware Linksys WRT160NL
- OpenWRT: Build Firmware Linksys WRT54GL
- OpenWRT: Build Firmware Mikrotik RB433
APRX
IPv6
- OpenWRT: IPv6
- OpenWRT IPv6: Build Firmware Linksys WRT160NL
- OpenWRT IPv6: Build Firmware Linksys WRT160NL Tanpa WebGUI
- OpenWRT IPv6: Build Firmware Buffalo WZRHPG450H
- OpenWRT IPv6: Build Firmware Buffalo WZRHPG300NH2
- OpenWRT IPv6: Setup tunnel ke tunnelbroker
- OpenWRT IPv6: Konfigurasi
- OpenWRT IPv6: Konfigurasi WAN6 dengan radvd
Flash Firmware
- OpenWRT: Flash Linksys WRT54GL
- OpenWRT: Flash Linksys WRT160NL
- OpenWRT: Flash Buffalo WZRHP450H RECOMMENDED
- OpenWRT: Flash Buffalo WZRHP300N
- OpenWRT: Flash UBNT NanoStation2 RECOMMENDED
- OpenWRT: Flash UBNT NanoStation M2 RECOMMENDED
- OpenWRT: Flash UBNT NanoStation Loco M2
- OpenWRT: Flash UBNT Bullet M2 RECOMMENDED
- OpenWRT: Flash Mikrotik RB433 RECOMMENDED
- OpenWRT: Flash Mikrotik RB450
Misc
- OpenWRT: Setup WiFi
- OpenWRT: Setup PPTP VPN Server
- OpenWRT: Setup OLSR di UBNT via CLI RECOMMENDED
- OpenWRT: Mikrotik RB433
- OpenWRT: Setup OLSR Sederhana
- OLSR - di OpenWRT
- OpenWRT: 3G modem
- OpenWRT: Build Firmware dengan 3G Modem Support
- OpenWRT: Setup Firewall
- OpenWRT: Konfigurasi UBNT NanoStation2 tanpa WebGUI
UBNT
- UBNT
- UBNT: Teknik Recovery
- UBNT: Upload Firmware
- UBNT: Rebuild Firmware
- UBNT: firmware dengan OLSR
- UBNT: openwrt
- UBNT: olsr dengan openwrt
- UBNT: olsr dengan kamikaze openwrt
- UBNT: olsr dengan backfire openwrt RECOMMENDED
- UBNT: UniFi
- UBNT: UniFi Konfigurasi Awal
- UBNT: UniFi Manajemen HotSpot
- UBNT: OLSR Pembuatan Firmware
- UBNT: OLSR Konfigurasi
- OLSR - di UBNT
- OLSR - di Ubuntu
- OpenWRT
- OLSR: NAT di UBNT dengan OLSR