got it to work finally!!!
http://wiki.openwrt.org/oldwiki/usbstoragehowto
Try to read, and understand, and follow with precision.
this is another good link i used
http://www.yorkspace.com/2009/03/134
my issue was the modules, i wasnt calling the right ones...seems i was missing out the usb 2 module "insmod ehci-hcd" because my hub apparently needed it (i wasted sooo much time on this!)
The awesome thing is that, if you pluck out the usb, then it just boots from the routers flash.
You can now boot from usb flash drive with OpenWRT on the asus WL-520gU
here is my pivotroot file
vi /etc/init.d/pivotroot
#!/bin/sh
# change this to your boot partition
boot_dev="/dev/scsi/host0/bus0/target0/lun0/part1"
# install needed modules for usb and the ext3 filesystem
# **NOTE** for usb2.0 replace "uhci" with "ehci_hcd"
# **NOTE** for ohci chipsets replace "uhci" with "usb-ohci"
for module in usbcore ehci-hcd usb-ohci scsi_mod sd_mod usb-storage jbd ext2 ext3 ; do {
insmod $module
}; done
# this may need to be higher if your disk is slow to initialize
sleep 12s
# mount the usb stick
mount "$boot_dev" /mnt
# if everything looks ok, do the pivot root
[ -x /mnt/sbin/init ] && {
mount -o move /proc /mnt/proc && \
pivot_root /mnt /mnt/mnt && {
mount -o move /mnt/dev /dev
mount -o move /mnt/tmp /tmp
mount -o move /mnt/jffs2 /jffs2 2>&-
mount -o move /mnt/sys /sys 2>&-
}
}
here is my rcS file
vi /etc/init.d/rcS
#!/bin/sh
# Copyright (C) 2006 OpenWrt.org
if test $2 == "boot" ; then
/etc/init.d/pivotroot
fi
{
for i in /etc/rc.d/$1*; do
$i $2 2>&1
done
} | logger -s -p 6 -t '' &
vi /etc/modules.d/60-usb-storage
scsi_mod max_scsi_luns=8
sd_mod
usb-storage
_------------_____________------------------_______________-----------------__________----------------_________-----------------____-----
here is some proof
BusyBox v1.11.2 (2009-12-02 06:19:32 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.
_______ ________ __
| |.-----.-----.-----.| | | |.----.| |_
| - || _ | -__| || | | || _|| _|
|_______|| __|_____|__|__||________||__| |____|
|__| W I R E L E S S F R E E D O M
KAMIKAZE (8.09.2, r18961) -------------------------
* 10 oz Vodka Shake well with ice and strain
* 10 oz Triple sec mixture into 10 shot glasses.
* 10 oz lime juice Salute!
---------------------------------------------------
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 949.6M 25.0M 876.4M 3% /
/dev/root 1.6M 1.6M 0 100% /mnt/rom
tmpfs 7.0M 48.0k 6.9M 1% /tmp
/dev/mtdblock/4 1.8M 1.1M 756.0k 59% /mnt/jffs
mini_fo:/jffs 1.6M 1.6M 0 100% /mnt
/dev/scsi/host0/bus0/target0/lun0/part1
949.6M 25.0M 876.4M 3% /
root@OpenWrt:~# opkg update
Downloading
http://downloads.openwrt.org/kamikaze/8 ... ackages.gz
Connecting to downloads.openwrt.org (78.24.191.177:80)
Packages.gz 100% |************************************************************************************************************| 130k 00:00:00 ETA
Inflating
http://downloads.openwrt.org/kamikaze/8 ... ackages.gz
Updated list of available packages in /var/opkg-lists/snapshots
root@OpenWrt:~# opkg install nano
Installing nano (2.0.7-1) to root...
Downloading
http://downloads.openwrt.org/kamikaze/8 ... mipsel.ipk
Connecting to downloads.openwrt.org (78.24.191.177:80)
nano_2.0.7-1_mipsel. 100% |************************************************************************************************************| 32604 00:00:00 ETA
Installing libncurses (5.6-1) to root...
Downloading
http://downloads.openwrt.org/kamikaze/8 ... mipsel.ipk
Connecting to downloads.openwrt.org (78.24.191.177:80)
libncurses_5.6-1_mip 100% |************************************************************************************************************| 139k 00:00:00 ETA
Configuring libncurses
Configuring nano
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 949.6M 25.5M 875.9M 3% /
/dev/root 1.6M 1.6M 0 100% /mnt/rom
tmpfs 7.0M 700.0k 6.3M 10% /tmp
/dev/mtdblock/4 1.8M 1.1M 756.0k 59% /mnt/jffs
mini_fo:/jffs 1.6M 1.6M 0 100% /mnt
/dev/scsi/host0/bus0/target0/lun0/part1
949.6M 25.5M 875.9M 3% /
root@OpenWrt:~# opkg install rtorrent
Installing rtorrent (0.8.2-1.1) to root...
Downloading
http://downloads.openwrt.org/kamikaze/8 ... mipsel.ipk
Connecting to downloads.openwrt.org (78.24.191.177:80)
rtorrent_0.8.2-1.1_m 100% |************************************************************************************************************| 448k 00:00:00 ETA
Installing libcurl (7.17.1-1.2) to root...
Downloading
http://downloads.openwrt.org/kamikaze/8 ... mipsel.ipk
Connecting to downloads.openwrt.org (78.24.191.177:80)
libcurl_7.17.1-1.2_m 100% |************************************************************************************************************| 96349 00:00:00 ETA
Installing libopenssl (0.9.8i-3.2) to root...
Downloading
http://downloads.openwrt.org/kamikaze/8 ... mipsel.ipk
Connecting to downloads.openwrt.org (78.24.191.177:80)
libopenssl_0.9.8i-3. 100% |************************************************************************************************************| 472k 00:00:00 ETA
Installing zlib (1.2.3-5) to root...
Downloading
http://downloads.openwrt.org/kamikaze/8 ... mipsel.ipk
Connecting to downloads.openwrt.org (78.24.191.177:80)
zlib_1.2.3-5_mipsel. 100% |************************************************************************************************************| 35671 --:--:-- ETA
Installing libtorrent (0.12.4-1.1) to root...
Downloading
http://downloads.openwrt.org/kamikaze/8 ... mipsel.ipk
Connecting to downloads.openwrt.org (78.24.191.177:80)
libtorrent_0.12.4-1. 100% |************************************************************************************************************| 459k 00:00:00 ETA 459k 00:00:00 ETA
Installing libsigcxx (2.2.3-1.1) to root...
Downloading
http://downloads.openwrt.org/kamikaze/8 ... mipsel.ipk
Connecting to downloads.openwrt.org (78.24.191.177:80)
wget: no response from server
Configuring libcurl
Configuring libopenssl
Configuring libtorrent
Configuring zlib
Collected errors:
* opkg_download: ERROR: Command failed with return value 1: `wget --passive-ftp -P /tmp/opkg-YruoGL
http://downloads.openwrt.org/kamikaze/8 ... mipsel.ipk'
* Failed to download libsigcxx. Perhaps you need to run 'opkg update'?
root@OpenWrt:~# opkg install rtorrent
Installing rtorrent (0.8.2-1.1) to root...
Downloading
http://downloads.openwrt.org/kamikaze/8 ... mipsel.ipk
Connecting to downloads.openwrt.org (78.24.191.177:80)
rtorrent_0.8.2-1.1_m 100% |************************************************************************************************************| 448k 00:00:00 ETA
Installing libsigcxx (2.2.3-1.1) to root...
Downloading
http://downloads.openwrt.org/kamikaze/8 ... mipsel.ipk
Connecting to downloads.openwrt.org (78.24.191.177:80)
libsigcxx_2.2.3-1.1_ 100% |************************************************************************************************************| 10235 --:--:-- ETA
Installing libstdcpp (3.4.6-14.3) to root...
Downloading
http://downloads.openwrt.org/kamikaze/8 ... mipsel.ipk
Connecting to downloads.openwrt.org (78.24.191.177:80)
libstdcpp_3.4.6-14.3 100% |************************************************************************************************************| 148k 00:00:00 ETA
Configuring libsigcxx
Configuring libstdcpp
Configuring rtorrent
root@OpenWrt:~# opkg install screen
Installing screen (4.0.3-1) to root...
Downloading
http://downloads.openwrt.org/kamikaze/8 ... mipsel.ipk
Connecting to downloads.openwrt.org (78.24.191.177:80)
screen_4.0.3-1_mipse 100% |************************************************************************************************************| 158k 00:00:00 ETA
Configuring screen
root@OpenWrt:~# df -h
Filesystem Size Used Available Use% Mounted on
rootfs 949.6M 31.6M 869.7M 4% /
/dev/root 1.6M 1.6M 0 100% /mnt/rom
tmpfs 7.0M 700.0k 6.3M 10% /tmp
/dev/mtdblock/4 1.8M 1.1M 756.0k 59% /mnt/jffs
mini_fo:/jffs 1.6M 1.6M 0 100% /mnt
/dev/scsi/host0/bus0/target0/lun0/part1
949.6M 31.6M 869.7M 4% /
root@OpenWrt:~#