
Lightrouter Documentation Release 1.10 Andreas Trawoeger October 08, 2011 CONTENTS 1 Installation 3 1.1 Flash OpenWrt firmware.........................................3 1.2 Basic Configuration...........................................3 1.3 Storage..................................................4 1.4 UMTS..................................................8 1.5 GPSD................................................... 10 1.6 FixTime................................................. 11 1.7 Statistics................................................. 12 1.8 SSH-Keys................................................ 14 1.9 SSH-Tunnnel............................................... 15 1.10 Lightmeter................................................ 15 1.11 Local Startup............................................... 16 1.12 Scheduled Task.............................................. 16 1.13 Sysupgrade................................................ 17 1.14 Save configuration............................................ 17 1.15 Restore configuration........................................... 17 2 Compiling OpenWrt 19 2.1 First Build................................................ 19 i ii Lightrouter Documentation, Release 1.10 Contents: CONTENTS 1 Lightrouter Documentation, Release 1.10 2 CONTENTS CHAPTER ONE INSTALLATION 1.1 Flash OpenWrt firmware Attach your router and connect via webbrowser at http://192.168.1.1 with user “admin” and password “ad- min”. Go to SystemTools ! Firmware Upgrade and flash with OpenWrt firmware image downloaded from http://lightrouter.googlecode.com/files/openwrt-lightrouter-final-10-factory.bin 1.2 Basic Configuration 1.2.1 Password After reboot set password login via telnet and set password to kuffner12568 (in Windows use Putty): telnet 192.168.1.1 root@OpenWrt:/# passwd Changing password for root New password: Retype password: Password for root changed by root Logout & Login via ssh [email protected] (in Windows use Putty). Login via webbrowser at http://192.168.1.1 with user “root” and password “kuffner12568”. 1.2.2 System Settings Set hostname in System ! System Led configuration System ! LED Configuration 3 Lightrouter Documentation, Release 1.10 Or change /etc/config/system to: config ’system’ option ’hostname’ ’atdurrenstein’ option ’timezone’ ’UTC’ config ’rdate’ option ’interface’ ’wan’ config ’led’ ’wlan_led’ option ’name’ ’WLAN’ option ’default’ ’0’ option ’sysfs’ ’tl-wr1043nd:green:wlan’ option ’trigger’ ’phy0rx’ config ’led’ option ’default’ ’0’ option ’name’ ’Heartbeat’ option ’sysfs’ ’tl-wr1043nd:green:qss’ option ’trigger’ ’heartbeat’ 1.3 Storage Attach USB-Stick and check connection: root@OpenWrt:~# lsusb Bus 001 Device 001: ID1d6b:0002 Linux Foundation 2.0 root hub Bus 001 Device 002: ID 05e3:0608 Genesys Logic, Inc. USB-2.04 -Port HUB Bus 001 Device 004: ID 19d2:0117 ONDA Communication S.p.A. root@OpenWrt:~# dmesg usb-storage: device found at4 usb-storage: waiting for device to settle before scanning scsi1:0:0:0: Direct -Access ZTE MMC Storage 2.31 PQ:0 ANSI:2 usb-storage: device scan complete sd1:0:0:0: [sda] 3866624 512 -byte logical blocks: (1.97GB /1.84 GiB) sd1:0:0:0: [sda] Write Protect is off sd1:0:0:0: [sda] Mode Sense:0f0e 00 00 sd1:0:0:0: [sda] Assuming drive cache: write through sd1:0:0:0: [sda] Assuming drive cache: write through sda: sda1 sd1:0:0:0: [sda] Assuming drive cache: write through sd1:0:0:0: [sda] Attached SCSI removable disk root@OpenWrt:~# fdisk -l Disk /dev/sda: 1979 MB, 1979711488 bytes 1 heads, 62 sectors/track, 62364 cylinders Units = cylinders of 62 * 512 = 31744 bytes Device Boot Start End Blocks Id System /dev/sda1 * 3 62365 1933247+ c Win95 FAT32 (LBA) Create partition: 4 Chapter 1. Installation Lightrouter Documentation, Release 1.10 root@OpenWrt:~# fdisk /dev/sda The number of cylinders for this disk is set to 5139. There is nothing wrong with that, but this is larger than 1024, and could in certain setups cause problems with: 1) software that runs at boot time (e.g., old versions of LILO) 2) booting and partitioning software from other OSs (e.g., DOS FDISK, OS/2 FDISK) Command (m for help): d Selected partition1 Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4):1 First cylinder (1-1322, default1): Using default value1 Last cylinder or +size or +sizeM or +sizeK (1-1322, default 1322): +1G Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4):2 First cylinder (332-1322, default 332): Using default value 332 Last cylinder or +size or +sizeM or +sizeK (332-1322, default 1322): +64M Command (m for help): n Command action e extended p primary partition (1-4) p Partition number (1-4):3 First cylinder (354-1322, default 354): Using default value 354 Last cylinder or +size or +sizeM or +sizeK (354-1322, default 1322): Using default value 1322 Command (m for help): t Partition number (1-4):2 Hex code (type L to list codes): 82 Changed system type of partition2 to 82 (Linux swap) Command (m for help): p Disk /dev/sda: 4004 MB, 4004511744 bytes 116 heads, 51 sectors/track, 1322 cylinders Units = cylinders of 5916 * 512 = 3028992 bytes Device Boot Start End Blocks Id System /dev/sda11 331 979072 + 83 Linux /dev/sda2 332 353 65076 82 Linux swap /dev/sda3 354 1322 2866302 83 Linux Command (m for help): w The partition table has been altered! 1.3. Storage 5 Lightrouter Documentation, Release 1.10 Calling ioctl() to re-read partition table Create Filesystem: root@OpenWrt:~# mkfs.ext4 -L lroot /dev/sda1 mke2fs 1.41.11(14 -Mar-2010) Filesystem label=lroot OS type: Linux Block size=1024(log =0) Fragment size=1024(log =0) Stride=0 blocks, Stripe width=0 blocks 62744 inodes, 250044 blocks 12502 blocks (5.00%) reserved for the super user First data block=1 Maximum filesystem blocks=67371008 31 block groups 8192 blocks per group, 8192 fragments per group 2024 inodes per group Superblock backups stored on blocks: 8193, 24577, 40961, 57345, 73729, 204801, 221185 Writing inode tables: done Creating journal (4096 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 28 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override. root@OpenWrt:~# mkfs.ext4 -L lhome /dev/sda3 mke2fs 1.41.11(14 -Mar-2010) Filesystem label=lhome OS type: Linux Block size=4096(log =2) Fragment size=4096(log =2) Stride=0 blocks, Stripe width=0 blocks 97536 inodes, 389546 blocks 19477 blocks (5.00%) reserved for the super user First data block=0 Maximum filesystem blocks=402653184 12 block groups 32768 blocks per group, 32768 fragments per group 8128 inodes per group Superblock backups stored on blocks: 32768, 98304, 163840, 229376, 294912 Writing inode tables: done Creating journal (8192 blocks): done Writing superblocks and filesystem accounting information: done This filesystem will be automatically checked every 24 mounts or 180 days, whichever comes first. Use tune2fs -c or -i to override.s first. Use tune2fs -c or -i to override. root@OpenWrt:~# mkswap /dev/sda2 Setting up swapspace version1, size = 79609856 bytes UUID=0f10c589-fce3-4f20-9c99-5ec49b4c23f2 root@lightkuffner:~# 6 Chapter 1. Installation Lightrouter Documentation, Release 1.10 Edit mount points in Luci System ! Mountpoints Or change /etc/config/fstab to: config ’global’ ’automount’ option ’from_fstab’ ’1’ option ’anon_mount’ ’1’ config ’global’ ’autoswap’ option ’from_fstab’ ’1’ option ’anon_swap’ ’0’ config ’mount’ option ’device’ ’/dev/sda1’ option ’fstype’ ’ext4’ option ’enabled_fsck’ ’1’ option ’enabled’ ’1’ option ’label’ ’lroot’ option ’options’ ’rw,relatime,barrier=1,data=ordered’ option ’is_rootfs’ ’1’ config ’swap’ option ’device’ ’/dev/sda2’ option ’enabled’ ’1’ config ’mount’ option ’enabled’ ’1’ option ’device’ ’/dev/sda3’ option ’label’ ’lhome’ option ’target’ ’/home’ option ’fstype’ ’ext4’ option ’options’ ’rw,relatime,barrier=1,data=ordered’ Create new root filesystem on usb-stick: umount /dev/sda1 mount /dev/sda1 /mnt rm -rf /mnt/* mkdir /tmp/root mount -o bind//tmp /root 1.3. Storage 7 Lightrouter Documentation, Release 1.10 cp -a /tmp/root/* /mnt umount /tmp/root umount /mnt mkdir /home Reboot System: root@OpenWrt:~# reboot Check mount points: root@atkuffner:/home/light# mount rootfs on / type rootfs (rw) /dev/root on /rom type squashfs (ro,relatime) proc on /proc type proc (rw,relatime) sysfs on /sys type sysfs (rw,relatime) tmpfs on /tmp type tmpfs (rw,nosuid,nodev,relatime) tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755) devpts on /dev/pts type devpts (rw,relatime,mode=600) /dev/sda1 on /overlay type ext4 (rw,relatime,barrier=1,data=ordered) mini_fo:/overlay on / type mini_fo (rw,relatime) debugfs on /sys/kernel/debug type debugfs (rw,relatime) /dev/sda3 on /home type ext4 (rw,relatime,barrier=1,data=ordered) none on /proc/bus/usb type usbfs (rw,relatime) root@atkuffner:/home/light# df -h Filesystem Size Used Available Use% Mounted on /dev/root 6.1M 6.1M0 100% / rom tmpfs 14.4M 296.0K 14.1M2% / tmp tmpfs 512.0K0 512.0K0% / dev /dev/sda1 3.8G 99.7M 3.5G3% / overlay mini_fo:/overlay 6.1M 6.1M 0 100% / /dev/sda3 3.5G 263.6M 3.0G8% / home Create directories: mkdir /home/down 1.4 UMTS Add UMTS Interface in Network ! Interfaces 8 Chapter 1. Installation Lightrouter Documentation, Release 1.10 Or change /etc/config/network to: config ’interface’ ’loopback’ option ’ifname’ ’lo’ option ’proto’ ’static’ option ’ipaddr’ ’127.0.0.1’ option ’netmask’ ’255.0.0.0’ config ’interface’ ’lan’ option ’ifname’ ’eth0.1’ option ’type’ ’bridge’ option
Details
-
File Typepdf
-
Upload Time-
-
Content LanguagesEnglish
-
Upload UserAnonymous/Not logged-in
-
File Pages23 Page
-
File Size-