wikiroute

networking recipes

User Tools

Site Tools


mr3020_with_openwrt

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
mr3020_with_openwrt [2013/01/10 00:58] – created samermr3020_with_openwrt [2014/01/11 05:28] (current) – external edit 127.0.0.1
Line 10: Line 10:
 With OpenWRT the default IP address of the router is 192.168.1.1. Connect to the router via Ethernet cable using telnet or web GUI. The router should now be configured to connect to the Internet. The following example supposes that the MR-3020 router is connected to a gateway configured with 192.168.1.1. With OpenWRT the default IP address of the router is 192.168.1.1. Connect to the router via Ethernet cable using telnet or web GUI. The router should now be configured to connect to the Internet. The following example supposes that the MR-3020 router is connected to a gateway configured with 192.168.1.1.
  
-<code autoconf+<code> 
-# vi /etc/config/network+root@OpenWrt:~# vi /etc/config/network
 config interface 'lan' config interface 'lan'
         option ifname 'eth0'         option ifname 'eth0'
Line 22: Line 22:
         list dns '8.8.8.8'         list dns '8.8.8.8'
  
-#vi /etc/config/wireless+root@OpenWrt:~#vi /etc/config/wireless
 config wifi-device 'radio0' config wifi-device 'radio0'
         option type 'mac80211'         option type 'mac80211'
Line 47: Line 47:
  
 Reboot the routeur by typing ''reboot'' or simply unplugging the USB cable. Connect via SSH at 192.168.1.66 and verify that the internet connection is active. Reboot the routeur by typing ''reboot'' or simply unplugging the USB cable. Connect via SSH at 192.168.1.66 and verify that the internet connection is active.
 +
 +===== Upgrading from a previous version =====
 +
 +If you are upgrading from a previous version of OpenWRT, you can follow this [[http://wiki.openwrt.org/doc/howto/generic.sysupgrade | tutorial]]. If something goes wrong, do not forget that a failsafe mode exists for the MR3020. Start by powering on the TL-MR3020. When the WPS Button starts to blink , push it until it blinks faster. The device is now in Failsafe-Mode. You may access it by using telnet 192.168.1.1. Then, clean up any installed packages:  
 +<code>
 +root@OpenWrt:~# mount_root
 +root@OpenWrt:~# firstboot
 +</code>
  
 ====== Extroot configuration ====== ====== Extroot configuration ======
 +
 +Start by removing the luci graphical interface in order to free some space for future package updates. Type the following command multiple times in order to remove all dependencies.
 +
 +<code>
 +root@OpenWrt:~# opkg remove luci*
 +</code>
  
 Update the packages and install the necessary tools to migrate rootfs on external storage  Update the packages and install the necessary tools to migrate rootfs on external storage 
  
-<code autoconf+<code> 
-opkg update && opkg install kmod-usb-core kmod-usb2 kmod-usb-storage kmod-fs-ext4 block-mount kmod-usb-uhci kmod-usb-ohci+root@OpenWrt:~# opkg update && opkg install kmod-usb-core kmod-usb2 kmod-usb-storage kmod-fs-ext4 block-mount kmod-usb-uhci kmod-usb-ohci
 </code>  </code> 
  
-On a linux machine, plug a usb external drive or a memory stick. Start by wiping existing partition table from USB memory stick. In order to identify the name of the corresponding device, take a look at ''/var/log/syslog''. Type''dd if=/dev/zero of=/dev/sda bs=64k count=1'' +On a linux machine, plug a usb external drive or a memory stick. Start by wiping existing partition table from USB memory stick. In order to identify the name of the corresponding device, take a look at ''/var/log/syslog''. Type ''dd if=/dev/zero of=/dev/sda bs=64k count=1'' 
  
 Partition USB memory stick with 64M swap, 256M root and rest as third partition Partition USB memory stick with 64M swap, 256M root and rest as third partition
Line 71: Line 85:
 p p
 2 2
 +
 +256M +256M
 n n
 p p
 3 3
 +
  
 w w
Line 98: Line 114:
  
 Create swap and filesystems, also set unique label in addition to automatically generated uuid Create swap and filesystems, also set unique label in addition to automatically generated uuid
 +
 <code> <code>
-mkswap /dev/sda1 -L ow_swap_`dd if=/dev/urandom bs=1k count=1|tr -dc "a-f0-9"|cut -c1-6` 
 mkfs.ext3 /dev/sda2 -L ow_root_`dd if=/dev/urandom bs=1k count=1|tr -dc "a-f0-9"|cut -c1-6` mkfs.ext3 /dev/sda2 -L ow_root_`dd if=/dev/urandom bs=1k count=1|tr -dc "a-f0-9"|cut -c1-6`
 mkfs.ext3 /dev/sda3 -L ow_data_`dd if=/dev/urandom bs=1k count=1|tr -dc "a-f0-9"|cut -c1-6` mkfs.ext3 /dev/sda3 -L ow_data_`dd if=/dev/urandom bs=1k count=1|tr -dc "a-f0-9"|cut -c1-6`
 +</code>
 +
 +Get back to your router and activate swap:
 +<code>
 +root@OpenWrt:~# mkswap /dev/sda1 -L ow_swap_`dd if=/dev/urandom bs=1k count=1|tr -dc "a-f0-9"|cut -c1-6`
 </code> </code>
  
mr3020_with_openwrt.1357775890.txt.gz · Last modified: 2014/01/11 05:25 (external edit)