we luv the 2202 fonera wlan router, because it has a nice usb 2.0 port
Architecture: MIPS Vendor: Accton/FON Bootloader: Redboot System-On-Chip: Atheros AR2315A CPU Speed: 180 Mhz Flash-Chip: MX 5L6405MC-20G Flash size: 8 MiB RAM: 32 MiB Wireless: Atheros AR2315A WiSoC 802.11b/g (integrated) Ethernet: Marvell 88E6060 Fast Ethernet Switch USB: NEC D72010 USB 2.0 Controller (1 Port) Serial: Yes JTAG: No Opening the case
Note: This will void your warranty!
The serial pins are located on the right side of the PCB.
________________________... / [ eth ] [ eth ] [usb] | _________ | | | | | 88E6060 | |[VC] |_________| |[TX] |[RX] ________ |[GD] | | | | AR2315 | | |________| ...
for installing open-wrt we use a little but very nice and simple tool called a….
just open a shell on your router using ssh (e.g. with putty)
opkg update
and yfter we updated our packages, we can start installing
opkg install cryptsetup openvpn screen tcpdump vim
this will install cryptsetup openvpn screen tcpdump and vim on your router
opkg install kmod-scsi-core kmod-usb-core kmod-usb2 kmod-usb-storage opkg install cfdisk e2fsprogs swap-utils
now plug in your usb drive and reboot
reboot
after a reboot, we should now find our thumbdrive
cat /proc/partitions
and mount it
mkdir -p /mnt/root mount /dev/sda2 /mnt/root
Copy all fs into new mounted partition.
tar cvO -C / bin/ etc/ root/ lib/ sbin/ usr/ www/ var/ | tar x -C /mnt/root mkdir -p /mnt/root/tmp && mkdir -p /mnt/root/dev && mkdir -p /mnt/root/proc && mkdir -p /mnt/root/jffs && mkdir -p /mnt/root/mnt/openwrt && mkdir -p /mnt/root/sys
Use the new partition as root partition
Here comes the interesting part. Create a new script in init.d to mount the usb drive at startup.
cat > /etc/init.d/mountusb << EOF
#!/bin/sh /etc/rc.common
EXTERNAL_PARTITION=/dev/discs/disc0/part1
START=06
start () {
echo "loading USB and ext3 modules"
for module in usbcore usb-ohci uhci ehci-hcd scsi_mod sd_mod usb-storage jbd ext3; do
insmod $module
done
sleep 2s
[ "$FAILSAFE" != "true" ] && [ -b $EXTERNAL_PARTITION ] && {
mount $EXTERNAL_PARTITION /mnt/root
[ -x /mnt/root/sbin/init ] && {
mount -o move /proc /mnt/root/proc && \
pivot_root /mnt/root /mnt/root/mnt/openwrt && {
mount -o move /mnt/openwrt/dev /dev
mount -o move /mnt/openwrt/tmp /tmp
}
}
}
}
EOF
chmod +x /etc/init.d/mountusb cd /etc/rc.d/ && ln -s ../init.d/mountusb S06mountusb
We may also need some swap just in case the router runs out of memory
mkswap /dev/sda4 swapon /dev/sda4