Setup guide, optware and USB disk safe unmounting (in Italian for now)

17 posts / 0 new
Last post
Lestat
Lestat's picture
Setup guide, optware and USB disk safe unmounting (in Italian for now)

Hello all,

I have written a detailed guide in Italian for installing and configuring dd-wrt (kong mod) with Samba and DLNA on our WNR3500L. It is a semi-beginner guide: I detailed all the steps of installing and configuring dd-wrt but I omitted "basic" steps such as remove/modify the IP settings in Windows.

The link is:

DD-WRT come Home Server – Parte 1 – Introduzione e installazione

Also, I just published the second part, about the installation of the Transmission BitTorrent daemon (it is more of an "advanced" guide).

Also in this part my scripts for automatic safe unmounting of the usb disk.

The guide is in Italian but I will try to translate it to English soon:

DD-WRT come Home Server – Parte 2 – Client BitTorrent

Please let me know if you need support or if you find any errors.

P.S. I hope I am not spamming. I asked the admins quite a while ago if I could put the links to my site here but I didn't receive any answer. If the admins don't want the links just let me know or remove them directly, I don't want to spam!

Iqbal
Iqbal's picture
Sounds promising. I don't

Sounds promising. I don't read italian, but I used google translator to read your guide and it seems doable, even for a linux newbie like me. I'm going to give it a try and see how it goes.

Iqbal
Iqbal's picture
Lestat,

Lestat,

It worked!!   I got my external hdd partitioned the way I wanted it, with an ext3 for the optware and an ntfs for all the files.  This way it's easy for me to reconnect to my laptop and move files around.

Minidlna, samba, transmission are all up and running.  Transmission is remote controlled from my Android phone using Torrent-fu.  Services start and stop appropriately when i connect the external hdd or press the WPS button.

I am a total linux newbie, but this was still a doable project.  I literally jumped for joy when I got this working!!!  My wife loves it too because now we don't have to have the computer connected to the PS3 when we want to watch a movie - just turn it on and go.

I did have a couple of problems though:

1.  For some reason, any edits I made to /opt/etc/transmission-daemon/settings.json didn't want to stick.. every time I re-started transmission, the file would get reset back to defaults.  I think the fix is to call "killall transmission-daemon" at least twice to make sure transmission is completely stopped.

2. Part 2 - Page 5: AFter mkdir /opt/etc/config, I could not wget anything into the newly created folder.  I had to enable write flag (chmod a+w /opt/etc/config) so that I could wget your scripts in.

3.  I edited the minidlna.conf file to point db_dir to /mnt/minidlnadb.  This way the database is saved between reboots

4.  I edited your usb.startup script to remove the '&' after calling each startup script.  For some reason, minidlna was not starting automatically (even though everything else was) and removing the '&' (to enforce sequential execution) seemed to fix it.

5.  There were some minor translation issues using Google Translate, but those were to be expected and nothing I couldn't work around.  I'd be happy to help with an english translation.

I'm super happy with the results.  Thanks for a well written guide with good explanations for what's going on.

Iqbal.

fantoma
fantoma's picture
I am having problem wget the

I am having problem wget the installation file in section 5. I entered

wget http://www.luminaria.cc/files/scripts/ddwrt/usb.startup -O /opt/usb.startup

and yet when I check ls /opt, I don't have the usb.startup file. The same thing for all other files.startup. Perhap it is in the google translation, but I need help. Thanks.

Lestat
Lestat's picture
Hi Iqbal,

Hi Iqbal,
thanks for the feedback, it is always nice when your work is appreciated.

In regards to your problems:
1) You need to stop the Transmission daemon before attempting to modify the config file, otherwise the settings will not be kept.

2) That is strange... Did you do everything as root?

3) That is a great catch. In fact this problem was pointed out by another user and I need to update the guide, unfortunately I have very little spare time lately. By the way, this fix is also essential if you have a very large database.

4) This is strange too. I never had this problem, I will had this to the list of things I need to check/modify.

5) If you would like to help with the translation I would appreciate it very much. I meant to do that but I think it might that a looong time :)

Cheers,
Francesco
;)

Lestat
Lestat's picture
fantoma said: I am having

fantoma said: I am having problem wget the installation file in section 5. I entered wget http://www.luminaria.cc/files/scripts/ddwrt/usb.startup -O /opt/usb.startup and yet when I check ls /opt, I don't have the usb.startup file. The same thing for all other files.startup. Perhap it is in the google translation, but I need help. Thanks.

Hi fantoma,

this is strange. Are you logged as the "root" user?

Can the router reach the site? If you try to ping the site does it work?

Do you have write permissions to the /opt folder?

Please let me know!

Iqbal
Iqbal's picture
fantoma said: I am having

fantoma said: I am having problem wget the installation file in section 5. I entered wget http://www.luminaria.cc/files/scripts/ddwrt/usb.startup -O /opt/usb.startup and yet when I check ls /opt, I don't have the usb.startup file. The same thing for all other files.startup. Perhap it is in the google translation, but I need help. Thanks.

fantoma,

I assume that you are logging into the router as root.

I had a similar problem, but in a different directory. (see above)  You should examine permissions on /opt using the "ls -l" command (do a google search on how to use it).  If you find that you don't have write access to /opt, then you will need to change permissions on it using the chmod command.

(I'm at work right now or I would log into my router and get you the exact commands)

This is my first linux project, so I'm still learning.  From what I understand, logging in as root should give you access to do whatever you want, but for whatever reason it didn't work for me until I did a chmod on the directory I was trying to wget into.

Iqbal.

fantoma
fantoma's picture
Hello, Yes, I did log in as

Hello, Yes, I did log in as root. I haven't try to ping the site from router, but I can reach the site thru the browser. I read the note from Iqbal and try to use chmod command to ensure the write access to /opt. I will try iqbal suggestion to use ls -l command to check permission. I am not good at using linux command. I haven't use the command since the DOS days so I am not good at command with switch. I will try and report back.

under /opt, when I did ls -l, I got mostly

drwxr_xr_x

I tried to make directory under /opt/etc/config and can not do that either.

 

fantoma
fantoma's picture
I tried to do chmod 777 when

I tried to do chmod 777 when I am under /opt and nothing change.

Iqbal
Iqbal's picture
 

 

fantoma said: I tried to do chmod 777 when I am under /opt and nothing change.

try chmod a+w /opt

 

Lestat
Lestat's picture
Hello fantoma,

Hello fantoma,
did the "chmod" suggested by Iqbal work?

fantoma
fantoma's picture
I did that too but it didn't

I did that too but it didn't work either. I can not do much in /opt partition.

Lestat
Lestat's picture
fantoma said: I did that too

fantoma said: I did that too but it didn't work either. I can not do much in /opt partition.

Are you sure the partition is properly mounted? Did you set-up the automount of "/opt" in dd-wrt web-gui?

Please check by issuing the "mount" command:

/dev/discs/disc0/part1 on /opt type ext3 (rw,data=ordered)

If you followed my guide and are using a WNR3500L, you should have this line in the output.

Please let me know if the partition is ok.

fantoma
fantoma's picture
I removed the hard drive and

I removed the hard drive and connect to my Ubuntu netbook and log in a root, change all the permission to read/write, download all the file and set up everything as instructed and reconnected to the router. The WPS button now works as expected. I can unmount as expected and mount fine. However, now it is time to try to use the NTFS partition. I use MAC so I went to connect to the server, using smb://[email protected] to connect. The drive showed up and the folder called data. Under data, I got what seems to be the corrected empty space on my NTFS drive. However, I can't seem to be able to save file to it or use it in anyway. What should I do to diagnose what is wrong with the set up? Thanks.

fantoma
fantoma's picture
I ran mount and got this

I ran mount and got this

root@DD-WRT:~# mount
rootfs on / type rootfs (rw)
/dev/root on / type squashfs (ro)
none on /dev type devfs (rw)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
ramfs on /tmp type ramfs (rw)
devpts on /dev/pts type devpts (rw)
devpts on /proc/bus/usb type usbfs (rw)
/dev/discs/disc0/part1 on /opt type ext3 (rw,data=ordered)
/dev/scsi/host0/bus0/target0/lun0/part2 on /mnt type fuseblk (rw,user_id=0,group_id=0,allow_other)

fantoma
fantoma's picture
The strangest thing, even I

The strangest thing, even I got read/write, I still can not use the drive at all. I can not make new directory, etc.

root@DD-WRT:/# ls -l
drwxr-xr-x 2 root root 517 Nov 19 23:45 bin
drwxr-xr-x 1 root root 0 Jan 1 1970 dev
drwxr-xr-x 6 root root 456 Nov 19 23:45 etc
drwxr-xr-x 2 root root 3 Nov 19 23:45 jffs
drwxr-xr-x 3 root root 226 Nov 19 23:45 lib
drwxr-xr-x 2 root root 3 Nov 19 23:45 mmc
drwxrwxrwx 1 root root 4096 Jan 10 22:01 mnt
drwxrwxrwx 12 root root 4096 Jan 21 02:46 opt
dr-xr-xr-x 54 root root 0 Jan 1 2000 proc
drwxr-xr-x 2 root root 942 Nov 19 23:45 sbin
drwxr-xr-x 10 root root 0 Jan 1 2000 sys
drwxrwxrwx 10 root root 0 Jan 25 23:59 tmp
drwxr-xr-x 7 root root 67 Nov 19 23:45 usr
lrwxrwxrwx 1 root root 7 Nov 19 23:45 var -> tmp/var
drwxr-xr-x 3 root root 63 Nov 19 23:45 www
root@DD-WRT:/# mkdir /mnt/images
root@DD-WRT:/# ls /mnt
root@DD-WRT:/# cd /mnt
root@DD-WRT:/mnt# ls
root@DD-WRT:/mnt#

Lestat
Lestat's picture
Hello Fantoma,unfortunately I

Hello Fantoma,
unfortunately I am not sure about the problem you might have with not being able to write on the disk.
Maybe you should try not to use NTFS. I suggested the use of it only if you use Windows, but if you use a mac I don't think you will be able to read it anyway.

Also, I have made some changed to the scripts and translated the guide to English, so if you have the time you could try to reinstall the system and see if you are luckier!

http://www.luminaria.cc/en/dd-wrt-home-server-part-2-bittorrent-client-and-safe-unmount/