What's new

Setting up Transmission through Entware

  • SNBForums Code of Conduct

    SNBForums is a community for everyone, no matter what their level of experience.

    Please be tolerant and patient of others, especially newcomers. We are all here to share and learn!

    The rules are simple: Be patient, be nice, be helpful or be gone!

Status
Not open for further replies.
I installed transmission for entware on my AC66U a couple months ago and I use it regularly, but not for big torrent files of let's say larger than 10gig. Whenever I start a large download, the router becomes unresponsive. I can't log into the router's web GUI or the transmission web GUI or even use putty to telnet in. Browsing the internet is still possible, but that's it. Canceling the download isn't possible either.

I know that when a torrent is started, the file has to be allocated on the USB drive and that can take up to an hour or longer depending on the size of the download. But during the allocation there's no way to see what transmission is doing, because the web GUI just doesn't respond. I've tried to download a couple of those large torrents, but had to reboot the router manually every time, because it stops downloading and freezes up the router's web server.

Smaller downloads of say 3 GB work great, but I really want to be able to download those bigger torrents when my computer is switched off. Is there a setting or script that I don't know of, that can fix this for me? Or is this a transmission for entware limitation?

You could renice Transmission to lower its priority so it won't impact your router's general performance as much.

Code:
renice 20 -p pid

Where pid is the ProcessID of Transmission

As for file allocation, you need sparse file support. No idea if Transmission supports it. If using NTFS, try enabling it under USB Applications -> Server Centers -> Misc Settings.
 
You could renice Transmission to lower its priority so it won't impact your router's general performance as much.

Code:
renice 20 -p pid

Where pid is the ProcessID of Transmission

As for file allocation, you need sparse file support. No idea if Transmission supports it. If using NTFS, try enabling it under USB Applications -> Server Centers -> Misc Settings.

I tried the sparse file support first and that fixed it for me. The unresponsiveness is gone and the download starts almost immediately. Tried smaller downloads first and then tried the bigger downloads. Even the 40GB torrent starts immediately now with no problems.

I've had seen that sparse files support switch before, but never made that connection with torrent files. Oné's never too old to learn.

I'm keeping the renice program in my mind for other problems that might pop up.

Thx for the help.
 
hello,

have an issue with my N66U , with your latest firmware 3.0.0.4.374.33

Made a clean install of this firmware then installed entware, nano and transmission following your guide , having the exact folder configurations and partions labels

now after a week i checked the torrents status form web page and then closed it. after a couple of hours i tried adding a new torrent to download but i could not acces the web page. i thought the trasmision server died on me, so i logged via putty and issued /opt/etc/init.d/S88transmission start command

ASUSWRT-Merlin RT-N66U_3.0.0.4 Thu Oct 3 04:36:05 UTC 2013
admin@RT-N66U:/tmp/home/root# /opt/etc/init.d/S88transmission start
-sh: /opt/etc/init.d/S88transmission: not found
admin@RT-N66U:/tmp/home/root#
admin@RT-N66U:/tmp/home/root# admin@RT-N66U:/tmp/home/root#
-sh: admin@RT-N66U:/tmp/home/root#: not found
admin@RT-N66U:/tmp/home/root# opkg install transmission-daemon
-sh: opkg: not found
admin@RT-N66U:/tmp/home/root# opkg install transmission-web
-sh: opkg: not found
admin@RT-N66U:/tmp/home/root#



Looks like my whole /opt folder is gone......:( what could cause this? how do i get it back ?

after 3-4 reboots my external HDD is mounted now as sdb1 instead of the sda1 as it was.
 

Attachments

  • opt.jpg
    opt.jpg
    27.1 KB · Views: 465
I think your jffs partition is erased on reboot, please check.

Sent from my HTC One S using Tapatalk 4
 
hi Liviu

Enable JFFS partition option is YES and the folder /jffs/scripts is present and has the scripts inside

the router was rebooted 2-3 times during last week without issues .... this happened out of the blue today.

do you have any suggestions? will all may torrents be deleted ?
 
hi Liviu

Enable JFFS partition option is YES and the folder /jffs/scripts is present and has the scripts inside

the router was rebooted 2-3 times during last week without issues .... this happened out of the blue today.

do you have any suggestions? will all may torrents be deleted ?

First I'd check the filesystem for consistenccy. If it's linux ext 2 or 3 the command is e2fsck, check the help or this forum for the options to force the check even if no errors are reported and to setup a verbose reply (if you have a large disk you may have to setup a swap partition to have the command complete the check).
If everything is ok, unmount the disk, uplug it and power off/on the router, then, once initialized, plug in again your disk. This time it should mount as sda. To ave optware initialized correctly, unmount the disk and then power cycle your router.
I don't know why, but with the latest firmwares I noticed that just rebooting the router often causes the disk to be not mounted or mounted as sdb. If this happens then the only way to have it mounted as sda is to power-cycle the router.
 
First off:

/opt is a link (I think symlink) to /tmp/opt, because the root file system is read-only.

Then if I recall correct the entware partition is automatically mounted as /mnt/<label> (where <label> is the label of the partition).

So, the missing point is to symlink /mnt/<label> to /tmp/opt

ln -s /mnt/<label> /tmp/opt

You need to substitute the label to what you have.

In my setup /jffs/scripts/post-mount contains:
[ ! -e /tmp/opt ] && [ -e /mnt/optware ] && ln -s /mnt/optware /tmp/opt

That line work like "if /tmp/opt does not exist and /mnt/optware does exist, symlink /mnt/optware to /tmp/opt".


(Note that /mnt is the same as /tmp/mnt, it's linked the same way as /opt due to the read-only root.)
 
you are right , /opt is just a link but opt is missing from /tmp , /opt is a dead link

Code:
ASUSWRT-Merlin RT-N66U_3.0.0.4 Thu Oct  3 04:36:05 UTC 2013
admin@RT-N66U:/tmp/home/root# ls -s /mnt
     0 /mnt
admin@RT-N66U:/tmp/home/root# ls -s /mnt/sda1/tmp/opt
ls: /mnt/sda1/tmp/opt: No such file or directory
admin@RT-N66U:/tmp/home/root# ls -s /mnt/sdb1/tmp/opt
ls: /mnt/sdb1/tmp/opt: No such file or directory
admin@RT-N66U:/tmp/home/root# cd /tmp
admin@RT-N66U:/tmp# ls
Beceem_firmware      mnt                  share
ddns.cache           nat_rules            syslog.log
etc                  nat_rules_ppp0_eth0  udhcpc
filter.default       notify               udhcpc0.expires
filter_rules         ppp                  usb.log
home                 redirect_rules       var
lighttpd             resolv.conf          wpa_cli
lighttpd.conf        settings             zcip
admin@RT-N66U:/tmp#
 
I had the same thing happen to me and no matter what I did I could not get entware and the scripts to work correctly. I just gave up and backed up the completed folder for transmission. I disabled the jffs partition on the router and rebooted. Attached the USB drive to a Linux live cd and partitioned the drive with 2gig ext3 and the remainder ntfs....reattached the drive to the router and rebooted and made sure the drive was seen. Then I setup the jffs partition with the format on reboot option in the GUI....rebooted the router one more time and then proceeded to run the script for entware again. This then was the key for me...after the script for entware completed successfully I rebooted the router one more time to ensure that entware and the jffs partition were working ok. I read in the manual setup of entware that you might need to do that...I then followed the remaining steps and setup transmission to point to my sda2 ntfs partition....stopped transmission and copied all the data back to the correct completed folder...started transmission found the .torrent files and reupped to transmission...didn't take long since all it did was a data check and off I went...have rebooted a number of times with no issues. Can't say what I did had any bearing but it worked for me. Good luck.
 
you are right , /opt is just a link but opt is missing from /tmp , /opt is a dead link

As I said, you will need to symlink /mnt/<label> to /tmp/opt. I don't think Asuswrt does that automatically, because it can not know the label of your opt/entware drive.

The script I have I did have to write myself.
 
In my setup /jffs/scripts/post-mount contains:
[ ! -e /tmp/opt ] && [ -e /mnt/optware ] && ln -s /mnt/optware /tmp/opt

That line work like "if /tmp/opt does not exist and /mnt/optware does exist, symlink /mnt/optware to /tmp/opt".
As I said, you will need to symlink /mnt/<label> to /tmp/opt. I don't think Asuswrt does that automatically, because it can not know the label of your opt/entware drive.

The script I have I did have to write myself.


tmp/opt does not exist in my case ...... how can i symlink it?
i understand that your commands might not work but please post a generic one for lets say a /dev/sda1 label

in /jffs/scripts/ i dont have a post mount file , should i create it?
 
tmp/opt does not exist in my case ...... how can i symlink it?
i understand that your commands might not work but please post a generic one for lets say a /dev/sda1 label

in /jffs/scripts/ i dont have a post mount file , should i create it?

Code:
# cat /jffs/scripts/post-mount
#!/bin/sh

logger -t $(basename $0) "started [$@]"

if [ $1 = "/tmp/mnt/OPT" ]
then
  ln -sf $1 /tmp/opt
  # Wait up to 15 seconds to make sure STORAGE partition is mounted
  i=0
  while [ $i -le 15 ]
  do
    if [ -d /tmp/mnt/STORAGE]
    then
      logger -t $(basename $0) "USB drives mounted, starting Entware services"
      break
    fi
    sleep 1
    i=`expr $i + 1`
  done
  /opt/etc/init.d/rc.unslung start
fi

This script expects OPT and STORAGE partitions to be mounted and prevents starting Entware services before torrent content storage becomes ready. Please, edit partition labels (OPT, STORAGE) according your config.
 
Last edited:
Hi! Is there an option to disable transmission daemon's log entries in the system log? Thanks!
 
Hi! Is there an option to disable transmission daemon's log entries in the system log? Thanks!
Hi,

Google should become your best friend for such questions: Searching for "transmission config" points you to: Transmission - Editing Configuration Files. :eek:

There you find details on how to set message-level to zero (0) for no messages. :rolleyes:

With kind regards
Joe :cool:
 
thanks for the inputs guys.... for now i cleared the nvram and reformated the HDD.., before that i made a back-up of transmission files.

i added the script provided by ryzhov_al to my post mount ..... and now all seams to work fine for now

question: in the post scripts there was already a scrip (bolded part ) , i just added as below, is that correct?

Code:
#!/bin/sh

[B]if [ $1 = "/tmp/mnt/sda1" ]
then
  ln -sf $1/entware /tmp/opt
fi
[/B]
logger -t $(basename $0) "started [$@]"

if [ $1 = "/tmp/mnt/opt" ]
then
  ln -sf $1 /tmp/opt
  # Wait up to 15 seconds to make sure STORAGE partition is mounted
  i=0
  while [ $i -le 15 ]
  do
    if [ -d /tmp/mnt/sda1]
    then
      logger -t $(basename $0) "USB drives mounted, starting Entware services"
      break
    fi
    sleep 1
    i=`expr $i + 1`
  done
  /opt/etc/init.d/rc.unslung start
fi
 
question: in the post scripts there was already a scrip (bolded part ) , i just added as below, is that correct?
If "/entware" is a folder of ext2/ext3 partition named "sda1" then all seems good.
Except one thing: why you do "ln -sf … /tmp/opt" twice? Before and after "logger" string.
 
Last edited:
i dont know :) i just added your script to the previous one that was there by default (the one in BOLD)
 
I need to install an older version of transmission. Is there a way to do that through opkg or can i compile my own from source and install it like that?
 
Status
Not open for further replies.

Latest threads

Sign Up For SNBForums Daily Digest

Get an update of what's new every day delivered to your mailbox. Sign up here!
Top