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.
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:
# 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):
# sh /opt/etc/config/optware.startup
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:
# 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.
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):
# 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).
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.
2. Mount your USB storage on /opt. The file system *must* be either ext2 or ext3; do not use FAT, VFAT, or FAT32.2.
Yes well i thank you for taking the time to tell me that, but:
A. what are you trying to say
B. if you have taken the time to read exactly what i wrote you would see that I I have 1 partiton EXT3 and the rest is in fat32 i loaded samba and everything to the EXT3 partition.
I actually could read\write to the FAT32 partition mounted to /mnt !! but it is very slow + it deform my native characters (hebrew).
I am now at the point i have gave up on this, I flashed back to linksys firmware and i will wait for the brave one that will make this part of the Mega release. built in.
I have had problems using the FAT32 file system with the dd-wrt USB2.0 implementations, especially when writing large files to the FAT32 partition. It could just be that I was using an old flash stick that was having write errors (doubtful, but possible) that FAT32 couldn't handle but ext3 could (ext2 and ext3 are much more resistant to bad media blocks than FAT32).
Don't know why your FAT32 was so slow; read/write speeds to/from FAT32 were about the same as ext3 for me (directly on the router, not via a client over samba), at least while my FAT32 file system was working. I suppose you could try sharing your ext file system and comparing speeds; the problem could be completely unrelated to the file system type.
As I've said in other threads, I'm a Unix/Linux user/programmer/hacker, not a Windows person, so I tend to avoid anything invented by Microsoft (including FAT32) unless I have no choice (like running XP on my wife's PC; too bad Quicken crashes on wine).
I have try this :
1. flash using dd-wrt.v24-101037_NEWD_mini_usb
2. actived usb support almost all except support 2.0
3. using my ipod nano , create partition ext3 1 GB and format using mkfs.ext3 at different computer.
4. the router found /dev/scsi......part1 , i mount to /jffs/opt and mount -o bind /jffs/opt /opt
5. run this step wget http://www.wlan-sat.com/boleo/optware/optware-install-ddwrt.sh -O - | tr -d '\r' > /tmp/optware-install.sh
all working fine
6. install package openvpn using ipkg install openvpn
and openvpn running well
7. install samba2 using ipkg install samba2
but it have problem after finish download ,
when i try tar xvf samba......ipk the router stuck
I try to downlod this samba2.tar.gz , uncompressed to /opt but when try to smbd start it show "bus error"
I'm not sure where the problem is , from the usb disc ? or from firmware ?
it always stuck when uncompressed large files
if i pull out the usb flash , the router respond.
Okay, what model router do you have? I have an Asus WL-520GU.
For my router, I disabled USB 1.1 support (both UHCI and OHCI) and enabled USB 2.0 support (USB 2.0 is working on the 520GU as of 10137; there was a later patch -- 10328 -- for the Asus 500GP/V2). Also enabled USB storage support and ext2/ext3 file system support. I don't know what will happen if you have USB 1.1 and USB 2.0 drivers enabled at the same time; I think only one should be active, since USB 2.0 is compatible with 1.1 devices.
I mounted my USB device on /mnt, not /jffs. If you have jffs2 enabled, I have no idea what happens if you attempt to mount another file system over /jffs, so don't do that for now.
Make sure you clear out the /opt directory structure before attempting to install my samba2.tar.gz package. There are some conflicts from the optware library package with my startup script.
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.
Not the way you want. You can't extend the flash space of the dd-wrt binary download. You can only extend the total storage on your system after dd-wrt boots by mounting the file system on your usb stick. That's why samba is installed as a separate package and isn't part of the dd-wrt base install.