ootrw (opkg optware the right way)

Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware
Goto page 1, 2  Next
Author Message
ventura8
DD-WRT Novice


Joined: 29 Jan 2012
Posts: 20

PostPosted: Mon May 05, 2014 18:02    Post subject: ootrw (opkg optware the right way) Reply with quote
NEW VERSION COMING THIS MONTH!
DEVELOPMENT WAS PAUSED! Very busy life. I will return soon with the new version (more compatibility and bug fixes from feedback) and with replies for the comments you left me.

ATTENTION! Please give feedback! Please leave a comment and describe what works and what doesn't work for you or if you have any suggestions.
Comments MUST include router details and install details. Example:
Asus AC-66U, KongMod 23900M, kernel 3.11, installed on opt. Everything works!

opkg otrw (optware for all DD-WRT builds)
(Broadcom, atheros, ar7, etc... any router that has DD-WRT or KongMod installed on any kernel 2.x , 3.x)
It could also work with OpenWrt, AsusWrt, MerlinWrt, Gargoile, Xwrt and any other variations. Testing needed.
For any firmware that is NOT DD-WRT or KongMod, you have to set the startup, shutdown and firewall scripts yourself!

Services provided:

    Proftpd
    Samba
    Minidlna
    Privoxy
    Pydio
    Performance script
    Pyload
    Transmission
    Mypage
    Auto opkg update
    Backup script


Changelog:

    Version 1.1.1 :
    - autoupgrade now upgrades all opkg optware (including php5)
    Version 1.1 :
    - Even more compatible (Fixed install issues for adm and ARM architecture; PHP 5.4)
    - Cleaner install (cleaned install script, folder structure)
    - Updated guide for 1.1
    - ootrw is now aware of builds with transmissions built-in (latest kongmod)
    Version 1.0 :
    - initial release


Installation

Before install: I suggest you configure DNS so you can have access via a domain instead of an ip. freedns.afraid.org is great, and offers free domains:
http://www.dd-wrt.com/wiki/index.php/DDNS_-_How_to_setup_Custom_DDNS_settings_using_embedded_inadyn_-_HOWTO

Routers without USB could use CIFS/samba-client to mount a r/w partition and install ootrw. Don't forget to have something mounted as /opt
http://www.dd-wrt.com/wiki/index.php/Samba_Filesystem

Users with < 128 MB RAM on their router should enable SWAP before installing and/or disable services after installation
http://www.dd-wrt.com/wiki/index.php/Linux_SWAP
ootrw can be installed over otrw or otrw2 as long as you install ootrw in jffs (Please report back with results).
It will overwrite otrw mypage with ootrw mypage
ootrw can be installed on any partition that has ~110 MB of free space
A router with all ootrw services running will have ~64MB more RAM used in idle (SWAP recommended)

Even if you install on a partition other than jffs or opt (example : /mnt/sda1) you MUST enable jffs and have usb storage on /opt (it will be used for the data folder)

If you just want to know what packages are compatible with your router, untar ootrw.tar and run install script like this:
install -d (with the -d argument, it will not install ootrw, it will only display what packages are compatible)

The example bellow shows how to install in /opt
1. Enable jffs
http://www.dd-wrt.com/wiki/index.php/Journalling_Flash_File_System
2. Mount USB storage (hdd, usb stick) as /opt
http://www.dd-wrt.com/wiki/index.php/Image:USBmount.png
3. Then run the following commands (in Administrator > Commands or via Telnet/SSH)
Code:
cd /opt
wget -O ootrwsetup.sh http://www.dd-wrt.com/phpBB2/download.php?id=28607
chmod 0755 ootrwsetup.sh
chown root.root ootrwsetup.sh
sh ootrwsetup.sh -i

The -i means setup will search for your architecture and install the right packages for your router.
it will first look in Barrier Breaker (trunk) repository, then in Attitude Adjustment and so on until it finds packages compatible with your router
Change the first line to the directory/partition you want ootrw installed: cd /jjfs or cd /mnt etc...
ootrwsetup has a wizard built in. You can run it by executing ootrwsetup.sh without any arguments.
Or you can set your architecture with:
ootrwsetup.sh -a [architecture URL]
Example:
ootrwsetup.sh -a http://downloads.openwrt.org/attitude_adjustment/12.09/brcm47xx/generic/packages/
Or you can set ootrw setup to search a particular repository for your architecture
Example:
ootrwsetup.sh -r http://downloads.openwrt.org/attitude_adjustment/12.09/
ootrwsetup.sh -r http://downloads.openwrt.org/backfire/10.03.1/


IF the install wizard finds an architecture different than yours, don't worry. Kong assured me this is normal!
Example: i have a broadcom router (AC66U) which should get it's packages from brcm47xx, but the install wizard always
looks for the first compatible packages and finds ar7! In this case, all my packages are installed from ar7 repository and
everything works perfectly on my broadcom chipset!

ootrw setup may not find some of the packages needed. So some services might not work after install.
pydio and pyload are very complex and have a lot of dependencies (python, curl, pycurl, lighttpd, php, zoneinfo)
so they may not work on some installations. Please report back like i asked in the beginning of the post.
SO, to recap, in some cases (it all depends on your router architecture) some of the services (especially pydio)
will not work out of the box!

Default Settings:

ootrw will make /etc and /usr/share read/writable
All the config files for all the services (except for pydio) are located in ootrw/conf/
if you want to change some settings, do it there.
ootrw opens the following ports via firewall script:
21, 7227, 8000, 9091, 51413, 8200, 3000, 4443.
Explanation below

Samba:
share /opt/data with DD-WRT as smb server name with user nobody (anonymous)

proftpd:
share /opt/data/public with anonymous and write limit
Access via http://yourip:21

Minidlna:
will look in /opt/data for files and update db every 60 sec
Status page access via http://yourip:8200

Privoxy:
Default privoxy filter with settings to pass through southparkstudios.com commercials (without this you would
not be able to watch south park episodes Smile
The 80 to 8118 redirection in firewall script is necessary for privoxy to work.

Pydio:
Default login: User: ootrw Pass: optware!
Saves files to /opt/data/pydio (via mount)
Access via http://yourip:3000
Access via https://yourip:4443
Upload file maximum size 128

Performance script:
echo 262144 > /proc/sys/net/core/rmem_max
echo 262144 > /proc/sys/net/core/wmem_max
echo "4096 16384 262144" > /proc/sys/net/ipv4/tcp_wmem
echo "4096 87380 262144" > /proc/sys/net/ipv4/tcp_rmem
echo 1000 > /proc/sys/net/core/netdev_max_backlog

Pyload:
Default login: User: ootrw Pass: optware
Saves files to /opt/data/downloads
Access via http://yourip:8000
Port 7227 needs to be open for pyload clients to work properly


Transmission:
Default login: User: ootrw Pass: optware
Saves files to /opt/data/torrents
Access via http://yourip:9091
Port 51413 needs to be open for transmission to work properly

Mypage:
version V0.16.2-20101013 which includes a modified page 8 with ootrw info.
When privoxy is active mypage texts are missing! Connect via https to bypass this issue.

Auto opkg update (autoupgrade script):
The script will update your opkg installed optware every day at 4 am.

Backup script:
is a modified backupessentials from otrw. It can backup nvram, optware install directory or ootrw folder.
Without -b argument it will create a backup folder where ootrw is installed.


After install:
-Change the default password and settings for the services to your liking.
(look in ootrw/conf/. For pyload and pydio look in their webgui settings)
-ootrw hijacks routers nas interface (Services > NAS) so if you configure proftpd, samba or minidlna via the webgui,
ootrw script will run the corresponding optware app with the settings you configure via webgui.
If your firmware has lighttpd or transmission built-in (like the latest kongmod builds for ARM routers),
ootrw will detect when they are enabled and won't run lighttpd or transmission from optware.
-Configure ootrw to your liking (add scripts, files, services, edit configuration files), don't forget to backup afterwards.
install new software with opkg (opkg install [newapp])
-Change pydio upload file size to your liking via php.ini and pydio webgui
After install you can run the following commands in a telnet/ssh shell:
services #shows what services are running now and are set to run at startup (like mypage 8 )
enable #use to enable ootrw services at startup
disable #use to disable ootrw services at startup
start # use to start ootrw services
stop # use to stop ootrw services
restart # use to restart ootrw services
backup (ootrw|optware|nvram|all) -b [backup dir]

Examples:
enable proftpd
disable samba minidlna
disable all
stop privoxy
restart all

I recommend you run the command: backup all. The restorenvram script generated in the backup folder is your nvram
backup and it can be used on any router and with any build of your router's firmware.
(the backup created by the Administration > Backup page is not safe to use on another router
or on another build of your firmware)
Use caution when using restorenvram on another router with the same firmware, some things change from one
router to another (example: one router could have vlan1ports="1 2 3 4 5*" and another vlan1ports="1 2 3 4 8*").
In such cases it is dangerous to use the script without proper edit of the script.

The all argument does not act on autoupgrade (opkg) script. To act on autoupgrade an explicit call must be made.
Example: disable all autoupgrade.

Another thing you could do postinstall is to apply easylist filter to privoxy. Example:
http://siderite.blogspot.com/2013/05/adblock-easylist-filter-and-action.html

Feel free to try out other php frameworks like:
http://roundcube.net/
http://clip-bucket.com/
http://www.webasyst.com/developers/
And, if you build your own php apps https://packagist.org/

Or check other great frameworks here:
https://www.softaculous.com/apps/

Don't forget you may have to configure lighttpd and php appropriately for the above frameworks to work.
The web server serves files located in /ootrw/web

Uninstallation
IF you didn't install in jffs, uninstall script will work. Just run uninstall in shell or via webgui.
It will erase startup, firewall, shutdown scripts, restart and delete optware folder.

Tested on:
- Asus AC-66U, KongMod 23900M, kernel 3.11, installed on opt. Everything works!
- Buffalo WZR-1750DHP, BS 23919M, installed on opt. pyload doesn't work
- Asus WL 500W (BS build 23919 - Kernel 2.4). Could not install (Investigating)
- Atheros routers(WDR4300): Test coming soon
- ARM router (R7000): Test coming soon

Thanks:
Kong from KongMod, Charles from Pydio and Appscend.com for their great support.
Mypage, pyload, pydio, opkg, transmission, samba, proftpd, minidlna, privoxy, samba and bash creators for their great work!
I take NO credit for otrw, pydio, mypage, pyload etc...



ootrw.tar
 Description:
Version 1.1.1

Download
 Filename:  ootrw.tar
 Filesize:  23.06 MB
 Downloaded:  284 Time(s)


ootrwsetup.txt
 Description:

Download
 Filename:  ootrwsetup.txt
 Filesize:  2.25 KB
 Downloaded:  363 Time(s)



Last edited by ventura8 on Fri Jul 11, 2014 11:21; edited 72 times in total
Sponsor
wabe
DD-WRT User


Joined: 17 Jun 2006
Posts: 385

PostPosted: Tue May 06, 2014 11:56    Post subject: Reply with quote
Good initiative! Have you considered reusing some of Basmafs work on OTRW2? I believe he has gotten other priorities and have little time left for OTRW2.
There ar some really nice features in OTRW2 e.g pound, the country block scripts in adition to myPage and backup that you already seem to have implemented.
ventura8
DD-WRT Novice


Joined: 29 Jan 2012
Posts: 20

PostPosted: Wed May 07, 2014 6:11    Post subject: Reply with quote
wabe wrote:
Good initiative! Have you considered reusing some of Basmafs work on OTRW2? I believe he has gotten other priorities and have little time left for OTRW2.
There ar some really nice features in OTRW2 e.g pound, the country block scripts in adition to myPage and backup that you already seem to have implemented.


ootrw should be compatible with otrw and otrw2 only if you install ootrw in jffs. i will add this info in the guide soon. I don't have the time to continue Basmafs work, but you are free to alter and modify ootrw to include what services you want
NiTrus
DD-WRT User


Joined: 25 Dec 2010
Posts: 146
Location: Coon Rapids, MN

PostPosted: Thu May 08, 2014 11:50    Post subject: Reply with quote
is there anyway to uninstall this?
_________________
RT-R7000 | 24865M [Kong]
AP-WNDR3700 | 24461 [BS]
ventura8
DD-WRT Novice


Joined: 29 Jan 2012
Posts: 20

PostPosted: Thu May 08, 2014 16:26    Post subject: Reply with quote
NiTrus wrote:
is there anyway to uninstall this?


Yes. there is an uninstall script. after installation just run uninstall via Telnet/SSH. uninstall script works only if you installed in any folder except /jffs. I will update the guide with more details soon...
pokazene_maslo
DD-WRT User


Joined: 29 Dec 2009
Posts: 50

PostPosted: Sun May 11, 2014 20:42    Post subject: Reply with quote
Buffalo WZR-1750DHP, BS 23919M, installed on opt. pyload doesn't work.

Code:
root@DD-WRT:/opt/optware/etc/init.d# pyload
Fatal Python error: pycurl: libcurl link-time version is older than compile-time version
Aborted

_________________
Buffalo WZR-1750DHP: r23919
ventura8
DD-WRT Novice


Joined: 29 Jan 2012
Posts: 20

PostPosted: Mon May 12, 2014 6:42    Post subject: Reply with quote
pokazene_maslo wrote:
Buffalo WZR-1750DHP, BS 23919M, installed on opt. pyload doesn't work.

Code:
root@DD-WRT:/opt/optware/etc/init.d# pyload
Fatal Python error: pycurl: libcurl link-time version is older than compile-time version
Aborted


ah... a typical pyload install error (pydio and pyload are usually first to fall). You should try to install pyload manually from attitude adjustment (recommended fresh install of pyload dependencies)
Anyway, if you don't succeed, pydio does part of pyload's job
RS
DD-WRT Novice


Joined: 14 May 2014
Posts: 8

PostPosted: Wed May 14, 2014 8:28    Post subject: Reply with quote
Hello,

I've tried to install ootrw in Asus WL 500W (BS build 23919 - Kernel 2.4), but got the following error:

Launching install script
ootrwsetup.sh: line 102: /opt/ootrw/scripts/install: not found
ventura8
DD-WRT Novice


Joined: 29 Jan 2012
Posts: 20

PostPosted: Wed May 14, 2014 18:22    Post subject: Reply with quote
RS wrote:
Hello,

I've tried to install ootrw in Asus WL 500W (BS build 23919 - Kernel 2.4), but got the following error:

Launching install script
ootrwsetup.sh: line 102: /opt/ootrw/scripts/install: not found


Hy. did ootrw.tar extracted ok? (you could check via WinSCP) if so, you could just run your install script yourself (runnig without arguments is just fine).
you could download ootrw.tar on your router, extract, and run install script (that is what ootrwsetup.sh does).
Please report back. I will do some test soon
ventura8
DD-WRT Novice


Joined: 29 Jan 2012
Posts: 20

PostPosted: Thu May 15, 2014 19:46    Post subject: Reply with quote
RS wrote:
Hello,

I've tried to install ootrw in Asus WL 500W (BS build 23919 - Kernel 2.4), but got the following error:

Launching install script
ootrwsetup.sh: line 102: /opt/ootrw/scripts/install: not found


I've just installed a fresh copy of ootrw 1.01 and everything installed ok.
RS
DD-WRT Novice


Joined: 14 May 2014
Posts: 8

PostPosted: Fri May 16, 2014 17:45    Post subject: Reply with quote
Hi,

Although i'm novice in linux, i've figured out why i was getting this error message. I use an usb pen drive and it wasn't being mounted in /opt but /mnt. After i've changed that, it began to install.
When the router finished rebooting, i accessed it's webpage, but lost all cable and wireless connection 30 seconds later. I was only able to regain access by unplugging the pen drive.

Any suggestions?


Last edited by RS on Sat May 31, 2014 14:03; edited 1 time in total
ventura8
DD-WRT Novice


Joined: 29 Jan 2012
Posts: 20

PostPosted: Sat May 17, 2014 6:32    Post subject: Reply with quote
RS wrote:
Hi,

Although i'm novice in linux, i've figured out why i was getting that error message. I use an usb pen drive and it wasn't being mounted in /opt but /mnt. After i've changed that, it began to install.
When the router finished rebooting, i accessed it's webpage, but lost all cable and wireless connection 30 seconds later. I was only able to regain access by unplugging the pen drive.

Any suggestions?

p.s.: I've attached an image of the whole process in putty.


Hello again! I think your router hangs after 30 seconds because of the startup script. Delete the entry with ootrwsetup from Administration > Commands and you should not have any more startup problems. This happens because ootrw did actually not install. Thanks for the image. I will update ootrw sometime to help with your problem. ootrw did not install probably because of the deadlock. you should try to install ootrw after you have deleted the startup, shutdown and firewall scripts ootrw added your router and a reboot. Also be sure you have root privilages (login as root when you connect to your router via ssh/telnet ) when you try to run ootrwsetup or install scripts. And don't forget to enalbe jffs and mount opt!
RS
DD-WRT Novice


Joined: 14 May 2014
Posts: 8

PostPosted: Sun May 18, 2014 12:15    Post subject: Reply with quote
Hello again,

I've done like you said, re-installed it, but i got always the same errors and still loose access to the router.
ventura8
DD-WRT Novice


Joined: 29 Jan 2012
Posts: 20

PostPosted: Mon May 19, 2014 9:19    Post subject: Reply with quote
RS wrote:
Hello again,

I've done like you said, re-installed it, but i got always the same errors and still loose access to the router.


If you really did everything by the book, then i think the problem is with kernel 2.4 compatability. I don't have time now, but sometime i will do some testing. Meanwhile you could search how to get rid of the deadlock. If you get past that, I think everything should be ok

PS You could try the following commands on ootrw
chmod 0755 ootrw/*
chown root.root ootrw/*
and then run ootrwsetup or install script
freya_z
DD-WRT Novice


Joined: 28 Apr 2014
Posts: 3

PostPosted: Mon May 19, 2014 18:37    Post subject: Reply with quote
Hi,

I installed it on Netgear WRN2200 /opt. Now I get

"/jffs//usr/lib/opkg/info/kmod-usb-core.postinst: .: line 3: can't open '/lib/functions.sh'".

I´m a noob and haven´t get a clue how I can fix it.

Can you help me?
Smile

Greetings
Goto page 1, 2  Next Display posts from previous:    Page 1 of 2
Post new topic   Reply to topic    DD-WRT Forum Forum Index -> Broadcom SoC based Hardware All times are GMT

Navigation

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You can attach files in this forum
You can download files in this forum