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, 4 ... 15, 16, 17  Next
Author Message
HockeyFan4Life
DD-WRT User


Joined: 03 Jan 2008
Posts: 230

PostPosted: Sun Jan 18, 2009 19:58    Post subject: Reply with quote
Can anyone who has done this mod please post the modified firmware? I am not good at all with Linux.
_________________

Routers:
E2000 latest BIG
whr-g54s client vpn
wr850g lastest mini
Sponsor
MrAlvin
DD-WRT User


Joined: 07 Jan 2007
Posts: 457
Location: Denmark

PostPosted: Mon Jan 19, 2009 0:08    Post subject: Reply with quote
The two files are available for download at:
http://www.3iii.dk/linux/ddwrt-micro-usb.htm
HockeyFan4Life
DD-WRT User


Joined: 03 Jan 2008
Posts: 230

PostPosted: Mon Jan 19, 2009 0:33    Post subject: Reply with quote
I'm looking for the modified MEGA version. I tried following the instructions on Page 1 of this thread. But I semi bricked my WL-520GU twice today, after trying to complie the modified MEGA version.
_________________

Routers:
E2000 latest BIG
whr-g54s client vpn
wr850g lastest mini
RolF
DD-WRT User


Joined: 28 Sep 2007
Posts: 349
Location: CCCP

PostPosted: Mon Jan 19, 2009 0:43    Post subject: Reply with quote
you must first try to read, then write...

text from link :

Quote:
Download this file: micro_plus_usb_asus520gc.bin - and install as firmware on the router.
Download this file: mega.tar.gz - and unpack on USB drive. The partition must be formatted as ext2, and be the first partition on the USB drive. Partition must be bigger than 15Mb.


R.

_________________
WL-500gP (@300MHz 128Mb RAM + USB_HDD)
WHR-HP-G54 (64 Mb RAM + SD )
MrAlvin
DD-WRT User


Joined: 07 Jan 2007
Posts: 457
Location: Denmark

PostPosted: Mon Jan 19, 2009 1:34    Post subject: Reply with quote
decsan wrote:
Dear Lightix

Could you explain how to install a usb HDD as a bittorrent client data storage and how to access this data from ftp client..


Here is a list of the principles/steps that I think will enable you to run a torent client on your wl-520gC router, with micro-usb firmware and mega.tar.gz unpacked on USB HD. I am assuming the mega.tar.gz file is based on Eko svn11218 - if not please let me know.


Since I assume your root filesystem is all rw-enabled (as it is mounted on the USB drive), you can follow any forum/wiki guide for installing extra software.

Only you do not need to enable jffs beyond issuing the following commands:
    nvram set sys_enable_jffs2=1
    nvram commit
    mkdir -p /jffs/tmp/ipkg



Also you do not need to mount folders /mnt, /mmc or /opt on new partitions. Your /mnt, /mmc and /opt folders are already write-able (again - I assume).


You can now install
-OpenWRT packages to /jffs using ipkg commands start with: ipkg update
-Optware packages, following steps at Wiki: Optware


You may want to consider formatting your HD with three partitions.
    /part1 - 256Mb - ext2 (Mega.tar, Optware and extra software...)
    /part2 - 64-256Mb - linux swap (Swap partition for the router)
    /part3 - the rest - ext2 (NAS data, this is the space that Samba, FTP, NFS will share)


Then install swap-utilities and mount data drive
    ipkg update
    ipkg install swap-utilities
    ipkg install e2fsprogs
    mkdir -p /mnt/data
    mkdir -p /jffs/etc/config/
    mount /dev/discs/disc0/part3 /mnt/data
    /jffs/usr/sbin/mkswap /dev/discs/disc0/part2
    /jffs/usr/sbin/swapon /dev/discs/disc0/part2

Point your torrent system to use /mnt/data as storage space.



You need to enable swap to be able to run a torrent client, as wl-520gC only has 16Mb ram, and that is very unlikely to cut it for a torrent client.

Put the mount and swapon command in a file like /jffs/etc/config/a00mount-data-part.startup
    vi /jffs/etc/config/a00mount-data-part.startup

then press i and type in the following
    #!/bin
    /jffs/usr/sbin/swapon /dev/discs/disc0/part2
    mount /dev/discs/disc0/part3 /mnt/data
then press ESC and type :wq



Specifics for installing a torrent client would be something like:
then follow the guide here Optware: torrent client



Then you could even use the HDsamba2 install script from here, so long as you disable the part of the script that mounts /mnt and /opt, and also disable testing of /part1 on reboot (see file: /jffs/etc/config/init.startup.
Also if you use HDsamba2, you will not need a00mount-data-part.startup, if you already made the file, just rename the extension to something else
    mv a00mount-data-part.startup a00mount-data-part.run



I think this all works. Anyway, I hope this can help you a bit.


Last edited by MrAlvin on Sun Jan 25, 2009 10:43; edited 1 time in total
HockeyFan4Life
DD-WRT User


Joined: 03 Jan 2008
Posts: 230

PostPosted: Mon Jan 19, 2009 2:36    Post subject: Reply with quote
RolF wrote:
you must first try to read, then write...

text from link :

Quote:
Download this file: micro_plus_usb_asus520gc.bin - and install as firmware on the router.
Download this file: mega.tar.gz - and unpack on USB drive. The partition must be formatted as ext2, and be the first partition on the USB drive. Partition must be bigger than 15Mb.


R.
Tried this and it didn't work!
_________________

Routers:
E2000 latest BIG
whr-g54s client vpn
wr850g lastest mini
RolF
DD-WRT User


Joined: 28 Sep 2007
Posts: 349
Location: CCCP

PostPosted: Mon Jan 19, 2009 2:58    Post subject: Reply with quote
HockeyFan4Life wrote:
RolF wrote:
you must first try to read, then write...


R.
Tried this and it didn't work!


:)

didn't work what ?
where you stuck ?
info like "didn't work" is nothing ...

R.

_________________
WL-500gP (@300MHz 128Mb RAM + USB_HDD)
WHR-HP-G54 (64 Mb RAM + SD )
HockeyFan4Life
DD-WRT User


Joined: 03 Jan 2008
Posts: 230

PostPosted: Mon Jan 19, 2009 3:02    Post subject: Reply with quote
I downloaded both files, updated the firmware. And then extracted the tar.gz file to the usb drive. And it didn't boot to the usb drive. It's a 40G HD with a 2gig ext2, and the rest is a linux-swap and a fat32.
_________________

Routers:
E2000 latest BIG
whr-g54s client vpn
wr850g lastest mini
RolF
DD-WRT User


Joined: 28 Sep 2007
Posts: 349
Location: CCCP

PostPosted: Mon Jan 19, 2009 3:29    Post subject: Reply with quote
so your router booted to micro firmware ?
telnet to router ant post "dmesg" output here.

R.

_________________
WL-500gP (@300MHz 128Mb RAM + USB_HDD)
WHR-HP-G54 (64 Mb RAM + SD )
HockeyFan4Life
DD-WRT User


Joined: 03 Jan 2008
Posts: 230

PostPosted: Mon Jan 19, 2009 3:38    Post subject: Reply with quote
DD-WRT v24 micro (c) 2008 NewMedia-NET GmbH
Release: 12/17/08 (SVN revision: 11218)


root@DD-WRT:~# dmesg
usb.c: registered new driver usbdevfs
usb.c: registered new driver hub
usb-ohci.c: USB OHCI at membase 0xb8003000, IRQ 6
usb-ohci.c: usb-00:03.0, PCI device 14e4:471a
usb.c: new USB bus registered, assigned bus number 1
hub.c: USB hub found
hub.c: 2 ports detected
SCSI subsystem driver Revision: 1.00
Initializing USB Mass Storage driver...
usb.c: registered new driver usb-storage
USB Mass Storage support registered.

hub.c: new USB device 00:03.0-1, assigned address 2
scsi0 : SCSI emulation for USB Mass Storage devices
Vendor: WDC WD40 Model: 0BB-23JHA1 Rev: 1C06
Type: Direct-Access ANSI SCSI revision: 02
Attached scsi disk sda at scsi0, channel 0, id 0, lun 0
SCSI device sda: 78156288 512-byte hdwr sectors (40016 MB)
WARNING: USB Mass Storage data integrity not assured
USB Mass Storage device found at 2
root@DD-WRT:~#

Does it matter that it's a wl-520gu?

_________________

Routers:
E2000 latest BIG
whr-g54s client vpn
wr850g lastest mini
decsan
DD-WRT Novice


Joined: 26 Dec 2008
Posts: 14
Location: TURKEY

PostPosted: Mon Jan 19, 2009 12:48    Post subject: Reply with quote
MrAlvin wrote:
decsan wrote:
Dear Lightix

Could you explain how to install a usb HDD as a bittorrent client data storage and how to access this data from ftp client..


Here is a list of the principles/steps that I think will enable you to run a torent client on your wl-520gC router, with micro-usb firmware and mega.tar.gz unpacked on USB HD. I am assuming the mega.tar.gz file is based on Eko svn11218 - if not please let me know.


Since I assume your root filesystem is all rw-enabled (as it is mounted on the USB drive), you can follow any forum/wiki guide for installing extra software.

Only you do not need to enable jffs beyond issuing the following commands:
    nvram set sys_enable_jffs2=1
    nvram commit
    mkdir -p /jffs/tmp/ipkg



Also you do not need to mount folders /mnt, /mmc or /opt on new partitions. Your /mnt, /mmc and /opt folders are already write-able (again - I assume).


You can now install
-OpenWRT packages to /jffs using ipkg commands start with: ipkg update
-Optware packages, following steps at Wiki: Optware


You may want to consider formatting your HD with three partitions.
    /part1 - 256Mb - ext2 (Mega.tar, Optware and extra software...)
    /part2 - 64-256Mb - linux swap (Swap partition for the router)
    /part3 - the rest - ext2 (NAS data, this is the space that Samba, FTP, NFS will share)


Then install swap-utilities and mount data drive
    ipkg update
    ipkg install swap-utilities
    ipkg install e2fsprogs
    mkdir -p /mnt/data
    mkdir -p /jffs/etc/config/
    mount /mnt/data /dev/discs/disc0/part3
    /jffs/usr/sbin/mkswap /dev/discs/disc0/part2
    /jffs/usr/sbin/swapon /dev/discs/disc0/part2

Point your torrent system to use /mnt/data as storage space.



You need to enable swap to be able to run a torrent client, as wl-520gC only has 16Mb ram, and that is very unlikely to cut it for a torrent client.

Put the mount and swapon command in a file like /jffs/etc/config/a00mount-data-part.startup
    vi /jffs/etc/config/a00mount-data-part.startup

then press i and type in the following
    #!/bin
    /jffs/usr/sbin/swapon /dev/discs/disc0/part2
    mount /mnt/data /dev/discs/disc0/part3
then press ESC and type :wq



Specifics for installing a torrent client would be something like:
then follow the guide here Optware: torrent client



Then you could even use the HDsamba2 install script from here, so long as you disable the part of the script that mounts /mnt and /opt, and also disable testing of /part1 on reboot (see file: /jffs/etc/config/init.startup.
Also if you use HDsamba2, you will not need a00mount-data-part.startup, if you already made the file, just rename the extension to something else
    mv a00mount-data-part.startup a00mount-data-part.run



I think this all works. Anyway, I hope this can help you a bit.

Thank you so much.

Best Regarts
Decsan
deaftone
DD-WRT Novice


Joined: 18 May 2007
Posts: 24

PostPosted: Sun Jan 25, 2009 9:43    Post subject: Reply with quote
I want to start by saying THANKS! Great job! I saw this thread a few days ago, then lost power and been searching for it ever since (maybe can be added as sticky or to wiki?). So all went well, after restoring to factory defaults, otherwise it kept kicking me out of the ssh session as soon as the banner dropped, now I'm facing the all time favorite ipkg probs... any chance in being able to use opkg? I installed opkg but it gave me an error about /var/opkg-lists not being a dir, when it is... chmod? Other than that, runs smooth, can't wait for a pivot_root option in std fw releases for usb-enabled routers, everyone should be able to boot off usb Smile Only limits are ram I guess, but even then, if hdparm gives me 45MB/s n 5MB/s as outputs, would that usb drive hold good as both swap and storage? also, when installing with ipkg, there's another error regarding /dev/console. dsniff also crashed dropbear on exec...

Code:
root@phoenix:~# dsniff
dsniff: can't resolve symbol 'getifaddrs'
root@phoenix:~# dsniff -cdmn -i eth1
[ 0 string,

_________________
4xWL520GU kamikaze 8.09-rc1(r13839) //v24-pre2 + 1xWHR-HP-G54 v24-sp1 + 1xAR430W bricked
nema32
DD-WRT Novice


Joined: 23 Jan 2009
Posts: 8

PostPosted: Mon Feb 02, 2009 7:18    Post subject: Excellent, thanks! Reply with quote
Following the firmware mod section of: Your superb instructions, I successfully got dd-wrt.v24-11296_NEWD_mega.bin running on my 520GU. Thanks for your clear instructions.
bskchaos
DD-WRT User


Joined: 07 Feb 2009
Posts: 198

PostPosted: Sat Feb 07, 2009 3:25    Post subject: Reply with quote
HELL YEAH!!!

Running Mega on my ASUS 520gU.

But I have a little doubt, can I use a hub and still be able to boot from my flash drive?
MrAlvin
DD-WRT User


Joined: 07 Jan 2007
Posts: 457
Location: Denmark

PostPosted: Sat Feb 07, 2009 5:11    Post subject: Reply with quote
bskchaos wrote:
But I have a little doubt, can I use a hub and still be able to boot from my flash drive?


I know of one shure way to find out ........... just try it!

Seems to me that if the script that mounts the usb drive can not find the usb drive, then the micro version of the firmware will boot on your router. So I expect "no permanent damage", if the usb drive can not be found, either due to it simply not being there, or due to it not being found on the usb hub.
Goto page Previous  1, 2, 3, 4 ... 15, 16, 17  Next Display posts from previous:    Page 3 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