Daily Archives: 25.4.2010

You are browsing the site archives by date.

DD-WRT Samba3 – Network share – Win7 support

Note: If you have installed one of my mods you don’t need to install samba3 through ipkg. It’s already included!!

If you have read my basic setup instructions on how to prepare your router for some of my packages you are now ready to install your first package. Since samba3 is one of the most requested applications I’ll start with a simple tutorial on how to get samba3 installed using my samba3 package. Actually in the case of samba it is not really worth explaining the installation. Just login to your router using telnet or ssh client and run the following command (don’t forget to first export IPKG_CONF_DIR as explained in my instructions):

ipkg -force-depends install samba3

Once you reboot you should be able to see a public network share served by your router.

If you want need some  advanced configuration with protected shares etc. you just have to edit:

/jffs/etc/samba/smb.conf

/jffs/etc/config/samba.startup

accordingly.

Hint: Since jffs method cannot be used to stop services you need to add a command to shutdown samba on a reboot or shutdown. Otherwise it can happen, that your jffs partition is in unclean state, which will cause a filesystem check. When this happens, the startup scripts will not be executed. Now to make sure you don’t see this, enter:

killall smbd

to Administration->Commands and press Save Shutdown

DD-WRT Optware packages

Before I give a few instructions on how to install and run my set of optware packages especially made for dd-wrt routers. I’m going to give you a short introduction on the design of my packages.  Unlike other optware packages my packages are built and configured to be run only inside /jffs directory. Standard optware packages usually install in /opt directory placing start/stop scripts in /opt/etc/init.d . DD-WRT however allows to place start scripts in /jffs/etc/config with the name yxz.startup. Such scripts will be started automatically at boottime.

To make it very easy for beginners I choose to only make use of /jffs dir. My packages are built using openwrt build environment.

If possible I’ll write a little HowTo for each package I’ll provide.

Now to get you started:

1. Get a removable media e.g. USB Stick, USB Drive etc.

2. Use either some installed linux, a linux bootcd such as knoppix or a windows partition utility to create a single ext3 partition on this drive

3. Connect the drive to the usb port of your dd-wrt router

4. Login to dd-wrt router webinterface , go to Services->USB choose at least

  • Core usb support
  • USB 1 or 2 support depending on the speed of your external drive
  • USB Storage support
  • Ext3 filesystem support
  • Automatic drive mount
  • Disk mount point /jffs

5. Under Administration->Management Enable JFFS2 and option Clean JFFS2.

6. Reboot your router. Now the router will mount the external ext3 partion and create JFFS filestructure. Wait a few minutes until the router completely rebooted.

7. Reboot your router a second time. This is neccessary because the previous boot only wrote JFFS file structure. The second boot now will scan all nodes and you are ready to use your partition.

8. Login to the router using a telnet or ssh client

9. Got to directory /jffs/etc and download my ipkg.conf

cd  /jffs/etc

wget http://www.desipro.de/ipkg.conf .

10. Use my ipkg.conf instead of the shipped ipkg.conf:

export IPKG_CONF_DIR=/jffs/etc/

11. Run ipkg to update your package list

ipkg update

If all went fine you should be able to list my packages:

ipkg list

You have now prepared you router to install my set of packages.

Note if you logout and login again you’ll be back using standard ipkg.conf since your environment  variable IPKG_CONF_DIR is not set again. So make sure to always export IPKG_CONF_DIR before you start to install any package. To avoid this behaviour you’ll be able to install a package called profile. This package will setup a profile for your shell which will set this variable every time you login.

Since all of my packages are going to be installed on the removable you can just disconnect the removable media and you are back to standard firmware functionality. So using these packages is absolutely safe, no firmware changes neccessary.

Let me know if any of the instructions are unclear to you. If possible I’m going to  improve and update my instructions ASAP.