USB External HD is supported ?

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2  Next
Author Message
predatorftp
DD-WRT Novice


Joined: 26 Sep 2008
Posts: 41

PostPosted: Tue Sep 30, 2008 21:57    Post subject: USB External HD is supported ? Reply with quote
Hi,

great job,thanks.

does the build contain better support for external HD connected using the USB port ?
(like samba preloaded and such...)

thanks
Sponsor
malmo
DD-WRT User


Joined: 13 May 2008
Posts: 138

PostPosted: Tue Sep 30, 2008 22:20    Post subject: no Samba Reply with quote
There is no image with samba pre loaded, and HD need external power supply. I would like such image to...
_________________
wrt54gs v1.0 BS build 14289 mini
wrt600n v11 eko build 14853 mega...
Fonera FON2200
Motorola WR850G v2 BS build 14289 mini
rmcrys
DD-WRT Novice


Joined: 20 Oct 2006
Posts: 19

PostPosted: Wed Oct 01, 2008 0:13    Post subject: Reply with quote
I also would like WL500GP image with Samba support too for external HDD usb but it seems noone is able to do it
patwood
DD-WRT User


Joined: 29 Jul 2008
Posts: 118
Location: NJ, USA

PostPosted: Wed Oct 01, 2008 4:09    Post subject: Reply with quote
The problem is that there simply isn't enough room to store all the samba stuff in a dd-wrt build, even one targeted for an 8MB (or even 16MB, if there is such a thing) router. The samba2 install package is > 7MB compressed. The optware uclibc libraries are > 10MB compressed. Won't fit. Period.

Pat
predatorftp
DD-WRT Novice


Joined: 26 Sep 2008
Posts: 41

PostPosted: Wed Oct 01, 2008 6:17    Post subject: Reply with quote
patwood wrote:
The problem is that there simply isn't enough room to store all the samba stuff in a dd-wrt build, even one targeted for an 8MB (or even 16MB, if there is such a thing) router. The samba2 install package is > 7MB compressed. The optware uclibc libraries are > 10MB compressed. Won't fit. Period.

Pat


Don't want to sound rood, but how come the linksys firmware supports it, out of the box ?
there has to be some kind of a solution for that !
more and more users have a USB capable devices.
I just think that the ddwrt firmware will never be complete as long as there isn't a solution for this issue.

thanks
switch
DD-WRT Guru


Joined: 30 Apr 2008
Posts: 967
Location: Romania

PostPosted: Wed Oct 01, 2008 6:54    Post subject: Reply with quote
Because that firmware doesn't use samba. It uses a heavily stripped down application that is similar to samba.
_________________
Q: How do I do ...? A: Read the tutorials or Search forums
predatorftp
DD-WRT Novice


Joined: 26 Sep 2008
Posts: 41

PostPosted: Wed Oct 01, 2008 7:05    Post subject: Reply with quote
switch wrote:
Because that firmware doesn't use samba. It uses a heavily stripped down application that is similar to samba.


that can't be done in our case ?
patwood
DD-WRT User


Joined: 29 Jul 2008
Posts: 118
Location: NJ, USA

PostPosted: Wed Oct 01, 2008 19:51    Post subject: Reply with quote
Well, there are a few different issues here.

1. The optware packages are compiled with a different version of the uclibc library than dd-wrt. That means you need a separate copy of this library for any optware programs, which means extra space. Samba only needs a couple of the libraries that are installed with the optware library package, but because of the separate install procedures, when you download the optware libraries, you get a bunch of stuff samba doesn't need (e.g., C++ libraries).

2. The samba2 package, while much smaller than the samba3 package, contains a lot of support programs that you don't really need to simply run a samba server. The only programs you really need are smbd and nmbd; the others are for maintenance, but add to the package size. You don't even need xinetd to run samba2.

3. The web interface for samba2 adds even more file system overhead. For a simple samba setup with smb.conf, a lot of files could be removed.

A quick experiment showed me that a basic samba2 installation could be stored in a 1.4MB compressed tar archive.

Pat
predatorftp
DD-WRT Novice


Joined: 26 Sep 2008
Posts: 41

PostPosted: Wed Oct 01, 2008 19:55    Post subject: Reply with quote
patwood wrote:
Well, there are a few different issues here.

1. The optware packages are compiled with a different version of the uclibc library than dd-wrt. That means you need a separate copy of this library for any optware programs, which means extra space. Samba only needs a couple of the libraries that are installed with the optware library package, but because of the separate install procedures, when you download the optware libraries, you get a bunch of stuff samba doesn't need (e.g., C++ libraries).

2. The samba2 package, while much smaller than the samba3 package, contains a lot of support programs that you don't really need to simply run a samba server. The only programs you really need are smbd and nmbd; the others are for maintenance, but add to the package size. You don't even need xinetd to run samba2.

3. The web interface for samba2 adds even more file system overhead. For a simple samba setup with smb.conf, a lot of files could be removed.

A quick experiment showed me that a basic samba2 installation could be stored in a 1.4MB compressed tar archive.

Pat


can you make a version that will let me work the USB HD right out of the box ? I have wrt350n device, with 8mb of memory. could it be done ?

I have with no success tried over and over to do it my self but i lack the linux and ddwrt experience and knowledge.

Thanks.
rmcrys
DD-WRT Novice


Joined: 20 Oct 2006
Posts: 19

PostPosted: Wed Oct 01, 2008 23:50    Post subject: Reply with quote
patwood: you do seem to understand well how this work, is it difficult to make a dd-wrt v24 (standard or even mini) with samba support for Asus WL500GP?

I do think you are a guy who could fit samba on the Asus WL500GP v24 Standard and put it available for tons of guys like me that need that stuff and don´t have your know-how...
patwood
DD-WRT User


Joined: 29 Jul 2008
Posts: 118
Location: NJ, USA

PostPosted: Thu Oct 02, 2008 3:16    Post subject: Reply with quote
Unfortunately, my dd-wrt box is an Asus 520-GU, which only has 4MB of flash, not enough for me to make a single dd-wrt build with USB and samba support. I will put together a single file you can download and install on your USB drive. That's really a better place for all this stuff, anyway, as you need to have plenty of storage in order to need to bother with samba at all.

I'll only work on Broadcom-based routers (i.e., MIPS binaries), but that seems to include a large group of the non-X86 routers.

Pat
patwood
DD-WRT User


Joined: 29 Jul 2008
Posts: 118
Location: NJ, USA

PostPosted: Thu Oct 02, 2008 4:25    Post subject: Reply with quote
Okay, here's the samba install. There are a few caveats:

1. I'm not a samba expert. The only reason I run it is because I have a mixed Windows/Linux environment; otherwise, I'd probably be running nfs.

2. This will only work on MIPS-based routers (Broadcom is a MIPS chip). This includes the Asus, Linksys, and Buffalo routers supported by dd-wrt.

3. I have only tested it on an Asus WL520-GU router under dd-wrt version dd-wrt.v24-101037_NEWD_mini_usb.

Instructions:

1. Don't bother with JFFS; you can enable if you plan on using for other stuff, but it's not big enoungh for all this when uncompressed.

2. Mount your USB storage on /opt. The file system *must* be either ext2 or ext3; do not use FAT, VFAT, or FAT32. If you want, you can mount your device elsewhere and use "mount --bind /foo/bar/blah/blah /opt". If you don't know how to use mount --bind, don't bother with it until you are sure this install is working properly. Mount the file system you want to share to /mnt. Make sure any directories you want client machines to have write access to are writable by all users (e.g., chmod 777 /mnt).

3. Download the package (samba2.tar.gz) to /opt.

4. Install the package:
Code:
# cd /opt
# tar xvzf samba2.tar.gz
... lots of files listed here as they're extracted
#


5. Start up samba (this is to test that it's working):
Code:
# sh /opt/etc/config/optware.startup
Starting smbd:
Starting nmbd:
#


You should now be able to mount the samba share using the user name "nobody" and the password "nobody".

6. If your network IP address doesn't start with 192.168.xxx.xxx, you'll need to edit the "hosts allow = 192.168." line in /opt/etc/samba/smb.conf to specify your network address range. Any part of the IP address range that's omitted is assumed to be all allowed (so my configuration allows access from any hosts with IP addresses that start with 192.168).

7. Take a look at my rc_startup nvram code (example is in /opt/etc/rc_startup). Change it to mount your partition in the correct place(s). If you are not using a USB flash memory stick, you can delete the "-o noatime" part from the mount command; this prevents excessive writes to the flash device, reducing memory wear.

8. Install your own startup code in the rc_startup nvram variable:

Code:
# nvram set rc_startup=`cat your_rc_startup_file`
# nvram get rc_startup
... should list the contents of your rc_startup file
#


Note the use of *back quotes* above; not regular single quotes. This is a very important distinction for the Unix shell -- the back qoutes (found under the ~ symbol on most PC keyboards) are replaced by the shell with the *output* of the command listed inside them. So in this case, the contents of your_rc_startup_file replaces the `cat your_rc_startup_file` in the assignment.

Now reboot and verify that samba starts up properly.

Pat



samba2.tar.gz
 Description:

Download
 Filename:  samba2.tar.gz
 Filesize:  1.35 MB
 Downloaded:  1812 Time(s)

patwood
DD-WRT User


Joined: 29 Jul 2008
Posts: 118
Location: NJ, USA

PostPosted: Thu Oct 02, 2008 13:53    Post subject: Reply with quote
Oh, and my download doesn't contain any codepage files. This is only a problem if you are using non-US ASCII file names (e.g., umlaut, kanji file names). If your file systems contain file names with non-US characters in them, they may display incorrectly in GUI file browsers. You can wget the samba2_2.12-1_mipsel.ipk file and extract the codepage files as follows (assumes downloading the file to /opt):

Code:
# cd /opt
# tar xvzf samba2_2.12-1_mipsel.ipk
... list of files extracted by tar ...
# cd /
# tar xvzf data.tar.gz ./opt/lib/codepages
... list of codepages files
#


Note the "cd /" between the two tar extractions; this is required, or the codepages files will go into the wrong place (/opt/opt instead of /opt).

Pat
predatorftp
DD-WRT Novice


Joined: 26 Sep 2008
Posts: 41

PostPosted: Thu Oct 02, 2008 18:18    Post subject: Reply with quote
I followed the steps you described and with no gr8 success.

I can see the 2nd partition (FAT32) that I mounted to /mnt but it's very slow and gets stuck reading and writing from it.

how could i speed it up ?
herman
DD-WRT Novice


Joined: 09 Sep 2008
Posts: 40
Location: Germany

PostPosted: Thu Oct 02, 2008 19:11    Post subject: Reply with quote
predatorftp wrote:
I followed the steps you described and with no gr8 success.

I can see the 2nd partition (FAT32) that I mounted to /mnt but it's very slow and gets stuck reading and writing from it.

how could i speed it up ?


well read again the second step > where we were told not to use FAT at all.

try this
Code:
2. Mount your USB storage on /opt. The file system *must* be either ext2 or ext3; do not use FAT, VFAT, or FAT32.2.


herman
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum 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