Boot router from usb flash drive

Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Broadcom SoC based Hardware
Goto page Previous  1, 2, 3 ... , 15, 16, 17  Next
Author Message
SiliconWarrior
DD-WRT User


Joined: 19 Nov 2009
Posts: 63

PostPosted: Wed Jan 27, 2010 21:19    Post subject: Reply with quote
swj123 wrote:
Yes I am using the usb drive to boot. Kind of new at the nas thing. Not sure how to access my fat32 drive from the network. I have a 500gb drive with ext2 to boot and fat32 for storage. Thanks


I installed Optware via Frater's Script: http://www.dd-wrt.com/wiki/index.php/Optware%2C_the_Right_Way

You need to mount the partition of the USB drive that you want to share as /mnt and the Optware script sets up a preconfigured Samba share.

I'm not familiar with your router, but in my case mine was pretty much unusable after installing the optware script until I disabled Twonky.
Sponsor
ScApi
DD-WRT Novice


Joined: 03 Dec 2009
Posts: 4

PostPosted: Wed Jan 27, 2010 21:23    Post subject: Reply with quote
About Jtag - 520GC/GU the same PCB, There are no obvious JTAG pins on PCB, maybe like on couple of asus router there are on some testpoints
swj123
DD-WRT Novice


Joined: 27 Jan 2010
Posts: 9

PostPosted: Fri Jan 29, 2010 20:49    Post subject: Reply with quote
I am still stuck with this project. I have done the USB hardware mod on my WL-520GC and its booting fine on the ext2 partition of a 500gb drive. The rest is fat32. I would like to know if someone that is doing this could please point me in the right direction. I want to use the fat32 partition as a nas but have no idea how to access it from the network. Thanks in advance. I have spent a lot of time on this and hate to quit now.
SiliconWarrior
DD-WRT User


Joined: 19 Nov 2009
Posts: 63

PostPosted: Fri Jan 29, 2010 21:39    Post subject: Reply with quote
swj123 wrote:
I am still stuck with this project. I have done the USB hardware mod on my WL-520GC and its booting fine on the ext2 partition of a 500gb drive. The rest is fat32. I would like to know if someone that is doing this could please point me in the right direction. I want to use the fat32 partition as a nas but have no idea how to access it from the network. Thanks in advance. I have spent a lot of time on this and hate to quit now.


I think the best way to do that is to install Samba with Optware. As I mentioned, I used Frater's script (wiki link above, forum thread here: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=59668 )

There is also a project called HDSamba that might be more targeted to what you're trying to do: http://www.dd-wrt.com/phpBB2/viewtopic.php?t=58935

I recently found SlimSamba on the Wiki and I think I might try it on my USR5461 and try to eliminate some of the bloat of the larger packages (hopefully): http://www.dd-wrt.com/wiki/index.php/Slim_samba2
swj123
DD-WRT Novice


Joined: 27 Jan 2010
Posts: 9

PostPosted: Sat Jan 30, 2010 3:44    Post subject: Reply with quote
Thanks SiliconWarrier. I will spend some time looking at those links. I have spent a lot of time modding the GC with the usb mod and would the mega sw is working great. First tried with a thumbdrive and then a 500gb with ext2 and fat32 for my storage. Just want to make a decent NAS. Thanks again and I will look into that info.
ossuskeeper
DD-WRT Novice


Joined: 06 Mar 2010
Posts: 2

PostPosted: Sat Mar 06, 2010 19:09    Post subject: ??? Reply with quote
Isnt it easier to connect the usb device to the network port (lan1) and use a n usb-eth converter and directing the linux device to the eth adapter or use some kind of pseudo device or such to reach the usb device over ethernet?
organetic
DD-WRT Novice


Joined: 28 Jul 2006
Posts: 17

PostPosted: Wed Jun 02, 2010 1:08    Post subject: latest rootfs MEGA dd-wrt Reply with quote
I'm loooking for the unpacked rootfs of the latest MEGA dd-wrt for using on a wl-520gu router.

My idea is to take advantage of the 3g modem support.
Maybe we could use one of the huawei or zte usb modems that has integrated card reader...

Anyone can help me on this??

Also, Is there any problem in using a usb hub for connecting a flash drive and a 3g modem?

cheers!
bskchaos
DD-WRT User


Joined: 07 Feb 2009
Posts: 198

PostPosted: Sat Jul 03, 2010 15:44    Post subject: Re: latest rootfs MEGA dd-wrt Reply with quote
organetic wrote:
I'm loooking for the unpacked rootfs of the latest MEGA dd-wrt for using on a wl-520gu router.

My idea is to take advantage of the 3g modem support.
Maybe we could use one of the huawei or zte usb modems that has integrated card reader...

Anyone can help me on this??

Also, Is there any problem in using a usb hub for connecting a flash drive and a 3g modem?

cheers!


Just use a powered USB hub. Some usb 3g modems drains a lot of power.
ossuskeeper
DD-WRT Novice


Joined: 06 Mar 2010
Posts: 2

PostPosted: Thu Aug 05, 2010 17:15    Post subject: Re: latest rootfs MEGA dd-wrt Reply with quote
bskchaos wrote:
organetic wrote:
I'm loooking for the unpacked rootfs of the latest MEGA dd-wrt for using on a wl-520gu router.

My idea is to take advantage of the 3g modem support.
Maybe we could use one of the huawei or zte usb modems that has integrated card reader...

Anyone can help me on this??

Also, Is there any problem in using a usb hub for connecting a flash drive and a 3g modem?

cheers!


Just use a powered USB hub. Some usb 3g modems drains a lot of power.



Yea! i have similar plans,i have the same router and a vodafone standard huawei stick with micro sdhc reader, i need only the modem function, but , it wont recognise it, i will try it on mega too , but i read before, mega dont support 3g on the build i use (11xxx) , so i need a very new build , because i not sure, it will recognise the device if i download some packages and/or insert kernel modules like acm.o , option.o and such into the current mega (11xxx) .

Whats more , someone told in a thread , usb mega wont work if i use with different version firmware in the router memory , and can even brick it ! Someone please confirm .

Further more: i searched for micro and mega pairs but i cant find any except the older ones link on this page:

http://www.3iii.dk/linux/dd-wrt/micro_plus_usb_asus520gc.bin

so ... Is this functionality built in all builds after the first ones? and i can use any one? i need a 14xxx or newer Razz
decsan
DD-WRT Novice


Joined: 26 Dec 2008
Posts: 14
Location: TURKEY

PostPosted: Sun Oct 10, 2010 18:14    Post subject: Reply with quote
I need it too..
decsan
DD-WRT Novice


Joined: 26 Dec 2008
Posts: 14
Location: TURKEY

PostPosted: Sat Nov 06, 2010 20:28    Post subject: Reply with quote
I spent a lot of time to update firmware..
I did it what lightix write..
Router does't boot up.
Can someone help me about extract, change and rebuild firmware?
prdufresne
DD-WRT User


Joined: 19 Dec 2010
Posts: 62

PostPosted: Sun Jan 09, 2011 5:40    Post subject: Trouble booting firmware from MMC Reply with quote
Using the instructions in the thread below, I've attempted to get my WRT54G v5 to boot from firmware on the MMC card.

http://www.dd-wrt.com/phpBB2/viewtopic.php?t=44448

I had to modify the init script to install the mmc and ext2 modules instead of the ones for usb, but otherwise, I used his script so that it looks like this:

Code:

#!/bin/sh
if [ $1 == "noinitrd" ] ; then
    insmod /lib/modules/`uname -r`/mmc.o
    insmod /lib/modules/`uname -r`/ext2.o
    sleep 8s
    mount -t proc none /proc
    mount -t ext2 -o noatime,nodiratime /dev/mmc/disc0/part3 /mnt
    if [ -x /mnt/sbin/init ] ; then
        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/jffs /jffs
            exec /sbin/init $*
        }

    else
        exec /usr/sbin/init $*
    fi
else
    exec /usr/sbin/init $*
fi


It certainly seems to be trying. When I boot the router, without an SD card installed, it boots normally from the flash. When I install an SD card, I can see it attempt to load the firmware from the SD card by way of the white and amber LED blinking however it never successfully boots.

I've loaded dd-wrt.v24-15943_NEWD_mini onto the SD card as it was a small firmware that was too large to fit in flash.

I suspect 3 possibilities for the firmware not running as planned:

1. There simply isn't enough RAM (8MB) to run even mini on the device.

2. The firmware is trying to initialize but is unable load the correct parameters from the compressed CFE.

3. The init string isn't mapping the folders to mmc correctly for this thing to boot.

Does anyone have any suggestions on what the issue might be or where to start troubleshooting?

I'm planning on upgrading the routers RAM to 32MB, but wanted to confirm I can run firmware from an SD card before starting to swap chips.

ThanX.

_________________
Running dd-wrt on Linksys E2000, WRT54G2 v1, WRT54G v2.2, and testing SD/MMC on a WRT54G v5
prdufresne
DD-WRT User


Joined: 19 Dec 2010
Posts: 62

PostPosted: Mon Jan 10, 2011 5:37    Post subject: Reply with quote
I have come to the conclusion that there's a problem with the init script, but I don't know what it is.

I was able to get the mini firmware running from the SD card by telneting into the router and executing the mount, mount moves and pivot_root manually (as one command separated by &&).

I use the same commands in the script, but I think it's hanging while running the init string after pivoting.

Code:


#!/bin/sh
if [ $1 == "noinitrd" ] ; then
    insmod /lib/modules/`uname -r`/mmc.o
    insmod /lib/modules/`uname -r`/ext2.o
    sleep 8s
    mount -t proc none /proc
    mount -t ext2 -o noatime,nodiratime /dev/mmc/disc0/part3 /mmc
    if [ -x /mmc/sbin/init ] ; then
        mount -o move /proc /mmc/proc && \
        pivot_root /mmc /mmc/mnt && {
            mount -o move /mnt/dev /dev
            mount -o move /mnt/tmp /tmp
            mount -o move /mnt/jffs /jffs
            exec /sbin/init $*
        }

    else
        exec /usr/sbin/init $*
    fi
else
    exec /usr/sbin/init $*
fi


Any ideas? When I rant this at the command line, I did it as one command with each mount/pivot statement separated by &&, so I'm wondering what's different between the init string and the manual process.

A simple pause before running init perhaps?

ThanX![/code]

_________________
Running dd-wrt on Linksys E2000, WRT54G2 v1, WRT54G v2.2, and testing SD/MMC on a WRT54G v5
prdufresne
DD-WRT User


Joined: 19 Dec 2010
Posts: 62

PostPosted: Mon Jan 10, 2011 14:50    Post subject: Reply with quote
I modified my script to give me some visual feedback, and here's what I have used:

Code:

#!/bin/sh
if [ $1 == "noinitrd" ] ; then
    insmod /lib/modules/`uname -r`/mmc.o
    insmod /lib/modules/`uname -r`/ext2.o
    gpio disable 0
    gpio disable 7
    sleep 1s
    gpio enable 0
    gpio enable 7
    sleep 1s
    gpio disable 0
    gpio disable 7
    sleep 1s
    gpio enable 0
    gpio enable 7
    sleep 1s
    gpio disable 0
    gpio disable 7
    sleep 1s
    gpio enable 0
    gpio enable 7
    sleep 1s
    mount -t proc none /proc
    mount -t ext2 -o noatime,nodiratime /dev/mmc/disc0/part3 /mmc
    gpio disable 0
    sleep 1s
    gpio enable 0
    sleep 1s
    gpio disable 0
    sleep 1s
    gpio enable 0
    if [ -x /mmc/sbin/init ] ; then
        mount -o move /proc /mmc/proc && \
        pivot_root /mmc /mmc/mnt && {
            mount -o move /mnt/dev /dev
            mount -o move /mnt/tmp /tmp
            mount -o move /mnt/jffs /jffs

       gpio disable 0
       sleep 2s
       gpio enable 0
       sleep 2s
       gpio disable 0
       sleep 1s
       gpio enable 0

            exec /sbin/init $*
        }

    gpio disable 0
    sleep 1s
    gpio enable 0
    sleep 1s
    gpio disable 0
    sleep 1s
    gpio enable 0


    else
        exec /usr/sbin/init $*
    fi
else
    exec /usr/sbin/init $*
fi


I can confirm that it's doing what I expect during the boot process until it starts running the init script. It's at this point that it seems to be failing. Also, the last two flashes in the script happen very fast, not with 1 second durations like the others, so either I'm seeing two unrelated flashes, or something is affecting the timing somehow.

Anyway, the script is good, it seems to be the init from the flash that's causing it to lock-up. Strange, since it works fine when I do it manually.

_________________
Running dd-wrt on Linksys E2000, WRT54G2 v1, WRT54G v2.2, and testing SD/MMC on a WRT54G v5
prdufresne
DD-WRT User


Joined: 19 Dec 2010
Posts: 62

PostPosted: Tue Jan 11, 2011 16:52    Post subject: Reply with quote
As a point of clarification on my last post. The init script that I store on the FLASH is running as expected. I get all my blinking light feedback from the script above except the ones following where I call the init script from the swapped root (or from the SD card).

On my last boot attempt, I observed the triple flash of DMZ and WLAN indicating that the the two modules were loaded followed by double flash of WLAN showing me that it had mounted the partition and observed the two long flashes confirming that it had executed the pivot_root and remounted /dev, /temp and /jffs.

I can then see the DMZ and SES light flashing like mad as the router begins to load the firmware from the SD card indicating that it's doing something.

Eventually, the power LED stops flashing and stays on steady suggesting that it finished booting, but router won't respond to a ping, telnet or GUI access.

It never shows me the flashes following the call to the init on the SD card.

Can anyone tell me at what stage the router sets the power LED back to solid?

Am I simply running out of RAM? Can mini not operate in 8Mb of ram?

_________________
Running dd-wrt on Linksys E2000, WRT54G2 v1, WRT54G v2.2, and testing SD/MMC on a WRT54G v5
Goto page Previous  1, 2, 3 ... , 15, 16, 17  Next Display posts from previous:    Page 16 of 17
Post new topic   This topic is locked: you cannot edit posts or make replies.    DD-WRT Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum