Home » Questions » Computers [ Ask a new question ]

How can I compile the CIFS filesystem for a DLINK DNS-323 box?

How can I compile the CIFS filesystem for a DLINK DNS-323 box?

How can I find/compile/install the CIFS filesystem for a DLINK DNS-323 box?

Asked by: Guest | Views: 192
Total answers/comments: 1
Guest [Entry]

"So the question is ""how do I enable CIFS/mount these remote CIFS shares on my DNS-323"", and the device is running a micro-linux system.

Here's a basic primer on using CIFS in general Unix clients. CIFS is included in the linux kernel as a driver, and can be built as a module or compiled into the kernel itself.

You can try finding or compiling a module for your existing kernel, or building your own kernel to install by reflashing the device. The first is much safer, so I'd try that unless you're experienced at this sort of thing.

Here's one forum post discussing module compilation for that device; it links to a directory of prebuild modules. The one you want depends on your firmware, but there is a CIFS module for the 1.03 firmware. You also want the SMBFS module as a fallback (it's an older driver and may work if the CIFS driver fails).
Here's how to put together a cross-compiling environment for recompiling the kernel and building your own modules. If you can't find modules built for your firmware version, this is the next-easiest route to take.
Here's some material on replacing the stock firmware with your own Debian-based system. This is the one that can brick your device if you aren't careful, so if CIFS is all you need, try the module approach first.

Update: There's some indication that modules compiled for firmware 1.03 will work with firmware 1.07. I linked to the firmware 1.03 module earlier.

In fact, this thread includes CIFS modules compiled against the 1.06 firmware, so those modules are probably preferable. Another thread specifically states the cifs.1.50.ko module (direct link) works with the 1.07 firmware.

Here's the process:

# insert the module you've downloaded and copied to an accessible filesystem
insmod /path/to/cifs.1.50.ko

# make your mountpoint
mkdir /mnt/sharename

# mount -- use /bin/mount for detailed messages
/bin/mount -t cifs //server/sharename /mnt/sharename -o username=username,password=password

This assumes an already-working telnet or SSH interface, such as that provided by the Fonz Fun Plug scripts.

If this works, you'll need to modify your startup scripts to insert the module at boot time. You can then add the mount to /etc/fstab if you want them to always be automatically mounted."