This shows you the differences between two versions of the page.
Next revision | Previous revision | ||
communitycloud:freifunk:openwrt [2012/09/08 05:05] tkilla created |
communitycloud:freifunk:openwrt [2012/09/09 19:04] (current) tkilla [USB storage] |
||
---|---|---|---|
Line 8: | Line 8: | ||
search for your router model in: http:// | search for your router model in: http:// | ||
- | ===== Basic Config ===== | + | |
+ | ===== Config ===== | ||
==== Install LUCI web interface ==== | ==== Install LUCI web interface ==== | ||
Line 17: | Line 18: | ||
/ | / | ||
- | reach the webiface at http://<router IP> | + | reach the webiface at http://router_IP/ |
Line 26: | Line 27: | ||
- | edit /etc/passwd and replace /bin/ash for /bin/bash in the line starting with root | + | edit **/etc/passwd** and replace |
echo ". $HOME/ | echo ". $HOME/ | ||
- | put your custom .bashrc in / | + | put your custom .bashrc in **/ |
==== SSH publickey authentication ==== | ==== SSH publickey authentication ==== | ||
- | you can do this from the webiface or manually: | + | you can do this in the webiface or manually: |
copy your key from your desktop to the router' | copy your key from your desktop to the router' | ||
Line 47: | Line 48: | ||
+ | ==== Reverse SSH publickey authentication - from router to desktop ==== | ||
+ | |||
+ | a private key is autogenerated by dropbear in / | ||
+ | |||
+ | extract id_rsa.pub public key on the router: | ||
+ | dropbearkey -y -f / | ||
+ | |||
+ | add the content of this file to ' | ||
+ | |||
+ | log in with | ||
+ | ssh -i / | ||
+ | |||
+ | |||
+ | ==== USB storage ==== | ||
+ | |||
+ | **USB2.0 kernel module installation: | ||
+ | |||
+ | http:// | ||
+ | |||
+ | opkg update | ||
+ | opkg install kmod-usb2 | ||
+ | insmod ehci-hcd | ||
+ | |||
+ | |||
+ | **package & filesystem modules installation: | ||
+ | |||
+ | http:// | ||
+ | |||
+ | opkg update | ||
+ | opkg install kmod-usb-storage kmod-usb-storage-extras kmod-scsi-generic e2fsprogs kmod-fs-ext4 kmod-fs-vfat | ||
+ | opkg install block-mount block-extroot block-hotplug | ||
+ | |||
+ | |||
+ | **format usb drive:** | ||
+ | |||
+ | FIXME testing ext4 options from https:// | ||
+ | |||
+ | |||
+ | "Ext4 with block size of 4k, without journaling, but with additional parameters to encourage Ext4 to do the right thing with respect to the erasure block:" | ||
+ | |||
+ | mkfs.ext4 -O ^has_journal -E stride=2, | ||
+ | |||
+ | |||
+ | **auto mount on boot:** | ||
+ | |||
+ | http:// | ||
+ | |||
+ | block-mount and block-hotplug will take care of boot and automount. | ||
+ | edit config in / | ||
+ | config global automount | ||
+ | option from_fstab 1 | ||
+ | option anon_mount 1 | ||
+ | | ||
+ | config global autoswap | ||
+ | option from_fstab 1 | ||
+ | option anon_swap 1 | ||
+ | | ||
+ | config mount | ||
+ | option target | ||
+ | option device | ||
+ | option fstype | ||
+ | option options | ||
+ | option enabled | ||
+ | option enabled_fsck 1 | ||
+ | | ||
+ | config swap | ||
+ | option device | ||
+ | option enabled | ||