Page 1 of 2 12 LastLast
Results 1 to 15 of 24

Thread: Kamikaze - tranmission and other stuff

  1. #1

    Post Kamikaze - tranmission and other stuff

    Hello

    Id like to get a complete info about howto get transmission to work on kamikaze.
    After I will get mine to work stable I will try to get a noob howto for all this.

    As I am at very early stage of doing stuff I can 'log' all what Ive done here and with others here maybe we can get my router to work and get a noob howto for kamikaze with transmission.

    At the moment Ive managed to flash it to kamikaze install Xwrt,qos,nano,install USB/ext2 stuff,ipkg-opt,transmission,gnuplot.
    The 3 things that come in handy. As for QoS I havent configured everything nicely to filter traffic but my goal will be working VOIP while leeching torrents.

    Kamikaze is a very nice system. As for me I had stock/oleg/Whiterussian/ and kamikaze is the most 'logical' one there is. Im pretty much a noob so everything I do is with howtos/tutorials/forums with the uber tool known as 'SEARCH'.
    What you need to know before you get your hands on putty and start messing is:
    A - The startup system is diffrent and messing with it too much may result with a softly bricked router. There is no flash bla bla thing here just plain and easy script files that do/set the stuff.This means if you overdo stuff in /etc/init.d/ or /etc/rc.d you might end up with serial connecting the router to save it.
    Therefore I suggest fallowing a retarded rule to 1st get proper scripts into init.d and testing with start/stop/restart commands if everything is working like a charm.
    How it works is 1st you need to put a your script in proper kamikaze format to
    /etc/init.d - this doesnt mean that unplugging/restarting the router (accident?wife?power failure? anything...) just after you placed your BAD script into init.d will leave you with a lot of trouble and waste of time to get it back to default state. It wont start up these scripts unless you tell it to with '/etc/init.d/scriptname enable'.
    To test simply issue '/etc/init.d/scriptname start' then change 'start' option to 'stop' and 'restart'. After you review your kernel log with Xwrt and be sure that everything works like a charm and for example your HDD is mounting/unmounting properly you can finally enable the script with the mentioned above '/etc/init.d/scriptname enable'
    How should a startup script look like ?
    Take a look with vi/nano at other scripts in init.d.
    Basicly you kinda need all the lines till STOP=XX line.
    START means when the script is started. Important if you have some stuff on your HDD and want it to run at boot. You have to remember when your HDD gets mounted so the stuff is available when your application script starts.
    Stop is the other way around (as I understand ^^) at shutdown/reboot I guess. Also it is important to fallow the scheme of start() {..} stop() {..} etc.
    For specific scripts that you want you can try to use SEARCH.
    Also post it here with info what you wanted to do and how you did it. Will help spread the knowledge.


    1. For getting kamikaze up it was easy for me as I already had WhiteRussian.
    Fallow http://wiki.openwrt.org/OpenWrtDocs/...ht=%28wl500%29
    To get it to work with kamikaze and have qos,wifi,usbhdd.
    (If u havent put stuff inside your router you need the brcm2.4 thing)

    More information on usb howto ( a little outdated but it wont hurt you to read)
    http://wiki.openwrt.org/UsbStorageHo...ight=%28usb%29

    2. To get a webif fallow manual installation section here
    http://wiki.x-wrt.org/index.php/Kami...X-Wrt_manually

    3. To get ipkg-opt fallow
    http://www.nslu2-linux.org/wiki/Optw...RT-brcm24Build
    I skipped the part with "libpthread and libstdcpp for some Optware packages".
    EDIT : Don't skip anything! You need this for transmission

    For now everything works but most likely youll need it so dont be as lazy as I am and install it.
    Somehow I couldnt get it to install with 'install' 'ipkg.sh install' so I found my own noobish way of adding the repository to Xwrt and installing it from there ^^.
    4. To get samba to work Install it with ipkg-opt (you need a HDD or a stick for this as it takes MiBytes). Reading the tutorial here helps http://wl500g.info/showthread.php?t=10761

    My startup scripts for usb HDD, swap,samba look like
    #!/bin/sh /etc/rc.common

    START=40
    STOP=40



    start()
    {
    echo -n "Testing USB Partition: "
    e2fsck -p /dev/scsi/host0/bus0/target0/lun0/part1 &
    sleep 5
    echo -n "Mounting USB drive: "
    mount -t ext2 -o noatime /dev/scsi/host0/bus0/target0/lun0/part1 /opt
    echo "Done."
    }
    stop()
    {
    echo -n "Umounting USB drive: "
    sync
    sync
    umount /dev/scsi/host0/bus0/target0/lun0/part1
    echo "Done."
    }
    restart()
    {
    stop
    start
    }
    #!/bin/sh /etc/rc.common

    START=40
    echo "mounting swap...."
    swapon /dev/scsi/host0/bus0/target0/lun0/part2
    echo "done with swap"
    #!/bin/sh /etc/rc.common

    START=50
    STOP=50


    samba_active=1

    start()
    {
    echo -n "Starting samba "
    /opt/sbin/nmbd -D
    /opt/sbin/smbd -D
    echo "Done."
    }
    stop()
    {
    echo -n "Stopping samba: "
    killall smbd
    killall nmbd
    echo "Done."
    }
    restart()
    {
    stop
    sleep 2
    start
    }

    As it is stated above Im stuck with getting busybox http to load transmission.
    I keep spamming one guys PM box all the time but I think hes tired of me
    So if anybody knows how to get transmission up on kamikaze from this point it would be nice if you keep this going.
    Also remember to post everything you've done on Kamikaze and WL500gp.
    It is always nice to find a complete or at least essential howto post around to go on.
    Last edited by calebz; 30-01-2008 at 11:54.

  2. #2
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    I've just noticet this thred. I am running T on K from day one. I am using thttpd instead of busybox_thttpd. You do not need logrotate for syslog. I am using size limitied 100k stock syslog. Installed webif for easy managmend and that's it. You could also use Kamikaze httpd instead!

    You can ask further questions here. Thread watched.

  3. #3
    Error while starting watchdog
    /opt/sbin/transmission_watchdog: ulimit: 304: error setting limit (Operation not permitted)
    log
    Jan 30 12:00:47 (none) daemon.info thttpd[27664]: spawned CGI process 29339 for file 'cgi-bin/transmission.cgi'
    Jan 30 12:00:51 (none) daemon.info thttpd[27664]: spawned CGI process 29360 for file 'cgi-bin/transmission.cgi'
    Jan 30 12:00:57 (none) user.info transmissiond[29379]: Transmission daemon 1.01+ (4684) started - http://transmission.m0k.org/ at port 65534
    Jan 30 12:00:57 (none) user.crit transmissiond[29379]: /var/run/transmission.pid - Permission denied
    Jan 30 12:00:57 (none) user.warn transmission_watchdog: Transmission daemon restarted!
    Jan 30 12:00:58 (none) user.notice transmissiond[29379]: Starting torrent /opt/samba/TEST/torrent/work/....torrent
    Tried to change /var/run/transmission.pid from /opt/var/run/transmission.pid
    But I dont think thats it. Reverting back to /opt/..

    Also after update pressed
    tail: read error: Is a directory

  4. #4
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    I am using
    Code:
    USER=root
    GROUP=root
    PIDFILE=/opt/var/run/transmission.pid
    SYSLOG=/var/log/messages
    Probably you are running under another name than ROOT that is lacking permissions.

  5. #5
    Solved.

    Needed root in thttpd.conf and transmission.conf

    What is tail: read error: Is a directory

    Gnuplot missing some lib :
    gnuplot: can't load library 'libiconv.so.2'

    Also Im having trouble with a noob startup script for thttpd
    #!/bin/sh /etc/rc.common

    START=50
    STOP=50

    start()
    {
    echo -n "Starting thttpd.."
    /opt/sbin/thttpd -C /opt/etc/thttpd.conf
    echo "Done."
    }
    stop()
    {
    echo -n "Stopping all thttpd.."
    killall thttpd
    echo "Done."
    }
    restart()
    {
    stop
    start
    }

    start/stop works but when restart it kills but doesnt start it. Tried sleep 1-5.
    Last edited by calebz; 30-01-2008 at 12:37.

  6. #6
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    Some systems needs libiconv package to be installed!
    I will correct that in next gnuplot package.

    tail message means that your syslog is not a file but a directory!

    There is a optware procided /opt/etc/init.d/S80thttpd that looks like
    Code:
    #!/bin/sh
    
    if [ -n "`pidof thttpd`" ]; then 
        killall thttpd 2>/dev/null
    fi
    
    /opt/sbin/thttpd -C /opt/etc/thttpd.conf

  7. #7
    Downloading http://ipkg.nslu2-linux.org/feeds/op...1-2_mipsel.ipk
    pkg_run_script: ERROR: uninstalled package libiconv has a NULL tmp_unpack_dir
    An error ocurred, return value: 1.
    Collected errors:
    unpack_pkg_control_files: Failed to create temporary directory '(null)': No space left on device
    Aborting installation of libiconv



    Should I install the one from kamikaze repository ? Edit : installed with ipkg from kamikaze. works.


    Also should I change it from Circular to File and point to /opt/var/log/messages?
    Last edited by calebz; 30-01-2008 at 14:27.

  8. #8
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    yes, from circular to file and then 100k size.

    ipkg-opt uses /opt as temporary directory! How could you fill up /opt?
    If there are some temporary /opt/ipkg-???? files you can safely delete it.

  9. #9
    Yeah more and more I start to guess that my HDD is faulty.
    1st that thing with filled up space now I got some errors with the HDD in log.

  10. #10
    Ok. Seems that it works 'for now' but the drive is giving a lot of errors with e2fsck, maybe its because I used ext2 instead of ext3.

    Syslog appears to be writing to /opt/var/log/messages but Xwrt doesnt read the file in its syslog view.
    Also what happens to messages at boot time before HDD gets mounted ? Is it smart enough to buffer it ?

    Some trouble with cron.

    cron works : 20534 root 428 S crond -c /etc/crontabs

    cron table as I understood must be put into /etc/crontabs as another file ie root ?

    Cron Jobs : root

    SHELL=/bin/sh

    PATH=/sbin:/bin:/usr/sbin:/usr/bin:/opt/bin:/opt/sbin

    MAILTO=""

    HOME=/

    # ---------- ---------- Default is Empty ---------- ---------- #

    # m h dom mon dow user command

    30 * * * * root nice transmission_watchdog

    * * * * * echo "Testing crond..."
    Last edited by calebz; 30-01-2008 at 19:11.

  11. #11
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    Oh yes, cron. I am using Kamikaze provided cron.
    Just run crontab -e and enter line
    Code:
    */30 * * * * /opt/sbin/transmission_watchdog
    This runs every half an hour. I preffer running cron once an hour. Eg.
    Code:
    5 * * * * /opt/sbin/transmission_watchdog
    And for fsck trouble I suggest to shorten USB cable to 25cm. It seems that it helps.
    I've also wrote tutorial how to write startup for optware.
    See http://www.dd-wrt.com/wiki/index.php/Optware for idea on that.
    Last edited by oleo; 31-01-2008 at 07:35. Reason: startup

  12. #12
    Jan 31 10:21:27 OpenWrt user.notice transmissiond[27219]: Stopping torrent /opt/samba/TEST/torrent/work/xxxx.DVD.SCREENER.XViD-PUKKA/Bee.Movie.DVD.SCREENER.XViD-PUKKA.torrent
    Jan 31 10:21:27 OpenWrt user.notice transmissiond[27219]: Closing torrent /opt/samba/TEST/torrent/work/xxxx.DVD.SCREENER.XViD-PUKKA/xx.DVD.SCREENER.XViD-PUKKA.torrent
    Jan 31 10:21:30 OpenWrt user.err transmissiond[27219]: Couldn't open '/opt/samba/TEST/torrent/work/xxxx.2007.DVDScr.xVID-LRC/Tx.2007.DVDScr.xVID-LRC/CD2/lrc-tgcb.r31': Input/output error
    Jan 31 10:21:30 OpenWrt user.notice transmissiond[27219]: Previous message repeated 1 times
    Jan 31 10:21:30 OpenWrt user.notice transmissiond[27219]: Stopping torrent /opt/samba/TEST/torrent/work/xxxx.2007.DVDScr.xVID-LRC/x.2007.DVDScr.xVID-LRC.torrent
    Jan 31 10:21:31 OpenWrt user.notice transmissiond[27219]: Closing torrent /opt/samba/TEST/torrent/work/xxxxx2007.DVDScr.xVID-LRC/x.2007.DVDScr.xVID-LRC.torrent
    Jan 31 10:21:36 OpenWrt user.notice transmissiond[27219]: Stopping torrent /opt/samba/TEST/torrent/work/xxx2007.DVDRip.XviD-FLAiTE/x.DVDRip.XviD-FLAiTE.torrent
    Jan 31 10:21:36 OpenWrt user.notice transmissiond[27219]: Closing torrent /opt/samba/TEST/torrent/work/zxx.DVDRip.XviD-FLAiTE/xx.2007.DVDRip.XviD-FLAiTE.torrent
    Getting spammed by this. What about the syslog not being displayed in Xwrt?

    Hmm couldnt find an entry for samba nmbd because of this spam I guess.
    Process crashed during night. Tho smbd still worked.
    Last edited by calebz; 31-01-2008 at 09:51.

  13. #13
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    You've got problems with filesystem. I recommend you that you delete all work files and start with fresh torrent. Of course, assure that your file system is without corruption before you start.
    Here is mine /etc/init.d/custom-user-startup
    PHP Code:
    #!/bin/sh /etc/rc.common
    START=90
    # place your own startup commands here
    #
    # REMEMBER: You *MUST* place an '&' after launching programs you 
    #   that are to continue running in the background.
    #
    #   i.e. 
    #   BAD:  upnpd
    #   GOOD: upnpd &

    # Failure to do this will result in the startup process halting
    # on this file and the diagnostic light remaining on (at least
    # for WRT54G(s) models).
    #

    wlc radio 1

    start 
    () {
      if [ -
    /dev/discs/disc0/part1 ]; then
       
    (
            
    swapon /dev/discs/disc0/part2
            e2fsck 
    -/dev/discs/disc0/part1
            mount 
    -t ext3 -o noatime /dev/discs/disc0/part1 /opt
            e2fsck 
    -/dev/discs/disc0/part3
            mount 
    -t ext3 -o noatime /dev/discs/disc0/part3 /home
            
    if [ -/opt/etc/init.]; then
              
    for f in /opt/etc/init.d/S* ; do
                  [ -
    x $f ] && $f start
              done
            fi
       
    ) > /tmp/optware-boot.log 2>&1
      fi

    Assure with tune2fs that you have disabled time checking on partitions and that you have for example 10 mounts before forced fsck. This is done with
    Code:
    tune2fs -i 0 -c 10 /dev/discs/disc0/part1
    tune2fs -i 0 -c 10 /dev/discs/disc0/part3
    The you can add ffsck function to /etc/profile to force fsck on next boot with
    Code:
    ffsck() {                    
    tune2fs -C 10 /dev/discs/disc0/part1
    tune2fs -C 10 /dev/discs/disc0/part3
    }
    You will always get Optware startup log in file /tmp/optware-boot.log in case you are impatient and waiting for fsck for an hour and so, if you have 500GB+ storage.

    If you are keen enough than you could also make cron job to fsck the server every month or so. Mine server is quite stable. It can run for a month and more without any problem. No dmesg troubles reported from kernel. Of course I have wl500gx with RAM upgraded to 64MB.
    Last edited by oleo; 31-01-2008 at 12:41. Reason: stability

  14. #14
    Hey

    Im having definite problems with HDD will try to remake partitions and check after it.

    You use ext2 or ext3 ?

    Can you please post your qos-script configuration ?
    Would be really cool to leech +voip+gaming.
    Last edited by calebz; 31-01-2008 at 18:43.

  15. #15
    Join Date
    Jun 2005
    Location
    Slovenia
    Posts
    736
    If you have stable system then ext2 is somewhat better. In your case ext3 seems to be a way to go. I do not use mine server for routing. I have another wl500gx that does NAT and handles oleo.ath.cx website on USB key.
    Code:
    # QoS configuration for OpenWrt
    
    # INTERFACES:
    config interface wan
            option classgroup  "Default"
            option enabled      1
            option upload   '380'
            option download '2000'
            option overhead '1'
    
    # RULES:
    config classify
            option target       "Bulk"
            option ipp2p        "all"
    config classify
            option target       "Bulk"
            option layer7       "edonkey"
    config classify
            option target       "Bulk"
            option layer7       "bittorrent"
    config classify
            option target   'Express'
            option ports    '34000'
            option proto    'tcp'
    
    config classify
            option target   'Priority'
            option ports    '22,53'
    config classify
            option target   'Normal'
            option ports    '20,21,25,80,110,443,993,995'
            option proto    'tcp'
    
    config default
            option target       "Express"
            option proto        "udp"
            option pktsize      "-500"
    config reclassify
            option target       "Priority"
            option proto        "icmp"
    config default
            option target       "Bulk"
            option portrange    "1024-65535"
    config reclassify
            option target   'Bulk'
            option srchost  '192.168.1.181'
    
    config reclassify
            option target   'Bulk'
            option srchost  '192.168.1.166'
    
    # Don't change the stuff below unless you
    # really know what it means :)
    
    config classgroup "Default"
            option classes      "Priority Express Normal Bulk"
            option default      "Normal"
    
    config class "Priority"
            option packetsize  300
            option packetdelay 10
            option maxsize     400
            option avgrate     40
            option linksharing 75
    config class "Priority_down"
            option packetsize  1500
            option avgrate     20
    
    config class "Express"
            option packetsize  1300
            option packetdelay 15
            option maxsize     800
            option avgrate     30
            option linksharing 80
    
    config class "Normal"
            option packetsize  1500
            option packetdelay 150
            option avgrate     20
            option linksharing 30
    config class "Normal_down"
            option avgrate     30
    
    config class "Bulk"
            option linksharing 10
    config class "Bulk_down"
            option avgrate     15
            option limitrate   85
    
    config "classify" ""
            option target   'Priority'
            option proto    'tcp'
            option mark     '!Bulk'
            option tcpflags 'SYN'
            option pktsize  '-128'
    
    config "classify" ""
            option target   'Priority'
            option proto    'tcp'
            option mark     '!Bulk'
            option tcpflags 'ACK'
            option pktsize  '-128'
    Last edited by oleo; 31-01-2008 at 19:58. Reason: QOS is more or less stock HBT

Page 1 of 2 12 LastLast

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •