Problem installing on WDR3600

Posted by surian 
This forum is currently read only. You can not log in or make any changes. This is a temporary situation.
Now, this forum is in read-only mode. You find details Details hereContinue on /r/PirateBox
Problem installing on WDR3600
May 30, 2014 09:51PM
Hello!
I'm trying to install PB in a TP-Link WDR3600.
I already installed sucessfully in this kind of router 6 months ago, following this same tutorial:
http://piratebox.aod-rpg.de/dokuwiki/doku.php/piratebox_1.0_pre_install_guide

But now, with the new 1.0 launch and site (awesome, by the way!) I don't know if this is still the most up-to-date method... I could't find info in the new site about installing in other routers using normal openwrt images.

In the end of the installation, after running opkg -d ext install extendRoot-piratebox i get this error:

/etc/init.d/piratebox: Creating piratebox loop image...
/etc/init.d/piratebox: No PirateBox Image file found... loading from Internet
Connecting to piratebox.aod-rpg.de (87.237.121.137:80)
wget: server returned error: HTTP/1.1 404 Not Found
/etc/init.d/piratebox: ERROR: wget failed... cancel



the full log of the installation is here (sorry if it's too big)

s@amora:/media/dados/6.docs/2.redes/piratebox$ ssh root@192.168.1.90
root@192.168.1.90's password: 


BusyBox v1.19.4 (2013-03-14 11:28:31 UTC) built-in shell (ash)
Enter 'help' for a list of built-in commands.

  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 ATTITUDE ADJUSTMENT (12.09, r36088)
 -----------------------------------------------------
  * 1/4 oz Vodka      Pour all ingredients into mixing
  * 1/4 oz Gin        tin with ice, strain into glass.
  * 1/4 oz Amaretto
  * 1/4 oz Triple sec
  * 1/4 oz Peach schnapps
  * 1/4 oz Sour mix
  * 1 splash Cranberry juice
 -----------------------------------------------------
root@OpenWrt:~# ping google.com
root@OpenWrt:~#  opkg install [beta.openwrt.piratebox.de]
-beta-opkg_0.0.6_all.ipk
Downloading [beta.openwrt.piratebox.de].
Installing pbx-beta-opkg (0.0.6) to root...
Configuring pbx-beta-opkg.
root@OpenWrt:~#  opkg update
Downloading [downloads.openwrt.org].
Updated list of available packages in /var/opkg-lists/attitude_adjustment.
Downloading [beta.openwrt.piratebox.de].
Updated list of available packages in /var/opkg-lists/piratebox.
root@OpenWrt:~# opkg install extendRoot 
Installing extendRoot (0.8.0-1) to root...
Downloading [beta.openwrt.piratebox.de].
Installing kmod-usb-storage (3.3.8-1) to root...
Downloading [downloads.openwrt.org].
Installing kmod-scsi-core (3.3.8-1) to root...
Downloading [downloads.openwrt.org].
Installing kmod-fs-vfat (3.3.8-1) to root...
Downloading [downloads.openwrt.org].
Installing kmod-nls-cp437 (3.3.8-1) to root...
Downloading [downloads.openwrt.org].
Installing kmod-nls-cp850 (3.3.8-1) to root...
Downloading [downloads.openwrt.org].
Installing kmod-nls-iso8859-1 (3.3.8-1) to root...
Downloading [downloads.openwrt.org].
Installing kmod-nls-iso8859-15 (3.3.8-1) to root...
Downloading [downloads.openwrt.org].
Installing kmod-fs-ext4 (3.3.8-1) to root...
Downloading [downloads.openwrt.org].
Installing kmod-lib-crc16 (3.3.8-1) to root...
Downloading [downloads.openwrt.org].
Installing block-mount (0.2.0-9) to root...
Downloading [downloads.openwrt.org].
Installing blkid (2.21.2-1) to root...
Downloading [downloads.openwrt.org].
Installing libblkid (2.21.2-1) to root...
Downloading [downloads.openwrt.org].
Installing libuuid (2.21.2-1) to root...
Downloading [downloads.openwrt.org].
Installing swap-utils (2.21.2-1) to root...
Downloading [downloads.openwrt.org].
Installing kmod-loop (3.3.8-1) to root...
Downloading [downloads.openwrt.org].
root@OpenWrt:~# /etc/init.d/ext init 
/etc/init.d/ext: Mounting external USB storage...
/etc/init.d/ext: Creating swapspace...
32+0 records in
32+0 records out
Setting up swapspace version 1, size = 32764 KiB
no label, UUID=50ea608f-0280-46cf-91b3-225d919c354a
/etc/init.d/ext: Creating ext loop image...
/etc/init.d/ext: No external Image-template file found... loading from Internet
Connecting to downloads.piratebox.de (87.237.121.137:80)
OpenWRT.img.gz       100% |******************************| 54561   0:00:00 ETA
/etc/init.d/ext: Including the external mountpoint to system
/etc/init.d/ext: Creating /bin/ext_path_fixer
/etc/init.d/ext: Including ext_path_fixer to /etc/profile
/etc/init.d/ext: Including   ext_path_fixer to /etc/rc.common
/etc/init.d/ext: Enable for startup
/etc/init.d/ext: Starting...
If you run this during an install or run the init the first time
 please run 
    source /etc/profile 
root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# source /etc/profile
  _______                     ________        __
 |       |.-----.-----.-----.|  |  |  |.----.|  |_
 |   -   ||  _  |  -__|     ||  |  |  ||   _||   _|
 |_______||   __|_____|__|__||________||__|  |____|
          |__| W I R E L E S S   F R E E D O M
 -----------------------------------------------------
 ATTITUDE ADJUSTMENT (12.09, r36088)
 -----------------------------------------------------
  * 1/4 oz Vodka      Pour all ingredients into mixing
  * 1/4 oz Gin        tin with ice, strain into glass.
  * 1/4 oz Amaretto
  * 1/4 oz Triple sec
  * 1/4 oz Peach schnapps
  * 1/4 oz Sour mix
  * 1 splash Cranberry juice
 -----------------------------------------------------
root@OpenWrt:~# opkg -d ext install extendRoot-piratebox
Installing extendRoot-piratebox (0.8.0-1) to ext...
Downloading [beta.openwrt.piratebox.de].
Installing extendRoot-lighttpd (0.8.0-1) to ext...
Downloading [beta.openwrt.piratebox.de].
Installing lighttpd (1.4.30-2) to ext...
Downloading [downloads.openwrt.org].
Installing libopenssl (1.0.1g-1) to ext...
Downloading [downloads.openwrt.org].
Installing zlib (1.2.7-1) to ext...
Downloading [downloads.openwrt.org].
Installing libpcre (8.11-2) to ext...
Downloading [downloads.openwrt.org].
Installing libpthread (0.9.33.2-1) to ext...
Downloading [downloads.openwrt.org].
Installing extendRoot-python (0.8.0-1) to ext...
Downloading [beta.openwrt.piratebox.de].
Installing python (2.7.3-1) to ext...
Downloading [downloads.openwrt.org].
Installing libffi (3.0.10-1) to ext...
Downloading [downloads.openwrt.org].
Installing python-mini (2.7.3-1) to ext...
Downloading [downloads.openwrt.org].
Installing piratebox (1.0.0-7) to ext...
Downloading [beta.openwrt.piratebox.de].
Installing lighttpd-mod-cgi (1.4.30-2) to ext...
Downloading [downloads.openwrt.org].
Installing lighttpd-mod-redirect (1.4.30-2) to ext...
Downloading [downloads.openwrt.org].
Installing lighttpd-mod-alias (1.4.30-2) to ext...
Downloading [downloads.openwrt.org].
Installing lighttpd-mod-setenv (1.4.30-2) to ext...
Downloading [downloads.openwrt.org].
Configuring libpthread.
Configuring zlib.
Configuring libopenssl.
Configuring libpcre.
Configuring lighttpd.
Configuring lighttpd-mod-cgi.
Configuring lighttpd-mod-setenv.
Configuring extendRoot-lighttpd.
Configuring libffi.
Configuring python-mini.
Configuring python.
Configuring extendRoot-python.
Configuring lighttpd-mod-redirect.
Configuring lighttpd-mod-alias.
Configuring piratebox.
Stopping uttpd and disable it
Stopping luci_fixtime and disable it
Loading defaults
Loading synflood protection
Adding custom chains
Loading zones
Loading forwardings
Loading rules
Loading redirects
Loading includes
Optimizing conntrack
Loading interfaces
'radio1' is disabled
Configuration file: /var/run/hostapd-phy0.conf
Using interface wlan0 with hwaddr 64:66:b3:c6:f7:1f and ssid "PirateBox - Share Freely"
'radio1' is disabled
/etc/init.d/piratebox: Creating piratebox loop image...
/etc/init.d/piratebox: No PirateBox Image file found... loading from Internet
Connecting to piratebox.aod-rpg.de (87.237.121.137:80)
wget: server returned error: HTTP/1.1 404 Not Found
/etc/init.d/piratebox: ERROR: wget failed... cancel
Configuring extendRoot-piratebox.
Collected errors:
 * pkg_run_script: package "piratebox" postinst script returned status 99.
 * opkg_configure: piratebox.postinst returned 99.

Thanks!
Re: Problem installing on WDR3600
May 30, 2014 10:10PM
Hi surian,
you hit the only thing I missed during releasing piratebox 1.0 - I changed that url to
Language: PHP
http://stable.openwrt.piratebox.de/piratebox_images/piratebox_ws_1.0_img.tar.gz
but forgot to change it within the package.

I copied the file to the given URL, so the install would run.

To restart it, you need to run:

 /etc/init.d/piratebox setup
 /etc/init.d/piratebox init
/etc/init.d/piratebox enable 
/etc/init.d/piratebox start
/etc/init.d/piratebox  stop_keep

regards Matthias
Re: Problem installing on WDR3600
May 31, 2014 10:01PM
Thanks Matthias!
I tried to install again and it worked smiling smiley

But then, following the OpenWRT Mods page in the PB site I broke my installation in the step www offload (trying to put a www folder on a usb stick).

It is not so important, since I don't really need this feature, but I'm reporting here to debug.

The installation went normal, but after reboot, the piratebox only redirects the users to a simple index page showing:

Index of /
Name	Last Modified	Size	Type
Parent Directory/	 	-  	Directory
library/	1980-Jan-01 00:00:00	-  	Directory
forban_link.html	1980-Jan-01 00:00:00	0.0K	text/html
ncsi.txt	1980-Jan-01 00:00:00	0.1K	text/plain
redirect.html	1980-Jan-01 00:00:00	0.2K	text/html

Here is the log of that www offload step:

root@piratebox:~# mkdir /mnt/usb/PirateBox/www_alt

root@piratebox:~# /etc/init.d/piratebox stop
Stopping script piratebox
Stopping dnsmasq...
0
Stopping droopy... 
0
Stopping lighttpd...
0

root@piratebox:~# /etc/init.d/piratebox updatePB
/etc/init.d/piratebox: Unmounting /opt/piratebox
/etc/init.d/piratebox: Removing old image file if exists
/etc/init.d/piratebox: Create new Image file
/etc/init.d/piratebox: Done

root@piratebox:~# /etc/init.d/piratebox start
-------------- Initialize PirateBoxScripts -----------
----------------------------------------------------
####      Alternative www folder found          ####
####          /mnt/usb/PirateBox/www_alt                ####
####         switching directories              ####
----------------------------------------------------
----------------------------------------------------
####          /mnt/usb/PirateBox/www_alt                ####
####         switching directories              ####
----------------------------------------------------
  Copy over >>fake internet detection-stuff<<
  Copy over >>redirect.html<< for automatic redirect on  wrong entered page<<
  Done. Now, you are on your own! 
Starting initialize PirateBox Part2..
chown: /opt/piratebox/share: Operation not permitted
chown: /opt/piratebox/www: Operation not permitted
chmod: /opt/piratebox/www/cgi-bin/*: No such file or directory
ln: /opt/piratebox/www/board: Operation not permitted
ln: /opt/piratebox/www/Shared: Operation not permitted
Starting script piratebox 
Generating hosts file .... 
Generating dnsmasq.conf .....
Generating Environment-config for ligttpd .....
Empty tmp folder
rm: /opt/piratebox/tmp: is a directory
Copy over design files
Distribute HEADER.txt into /opt/piratebox/share/Shared/videos 
Distribute README.txt into /opt/piratebox/share/Shared/videos 
Starting dnsmasq... 
0
Starting droopy...
0
/opt/piratebox/bin/shoutbox_stuff.sh: line 26: can't create /opt/piratebox/www/cgi-bin/data.pso: nonexistent directory
Traceback (most recent call last):
  File "psogen.py", line 133, in <module>
    generate_html_from_file ()
  File "psogen.py", line 51, in generate_html_from_file
    old =  read_data_file() 
  File "psogen.py", line 66, in read_data_file
    datafile = open(datafilename, 'r')
IOError: [Errno 2] No such file or directory: '/opt/piratebox/www/cgi-bin/data.pso'
chown: /opt/piratebox/www/cgi-bin/data.pso: No such file or directory
chown: /opt/piratebox/www/chat_content.html: No such file or directory
chmod: ug+rw: No such file or directory
Starting lighttpd...
0
root@piratebox:~#
Re: Problem installing on WDR3600
May 31, 2014 10:33PM
mh, well it throws some exceptions because I didn't take account of that feature, while writing new features sad smiley

but it should work like that, does it?
Re: Problem installing on WDR3600
June 02, 2014 03:47PM
Yeah it works nice in the wdr3600 without this www offlload feature! No Problem!

Matthias, I'd like to suggest a mention to this link in the OpenWrt HowTo session of the site:
http://piratebox.aod-rpg.de/dokuwiki/doku.php/piratebox_1.0_pre_install_guide

It is the only place that explains this kind of installation (using normal openwrt images in different routers) and I could only install in the wdr3600 because I bookmarked it some time ago.
But I can't find a link to it anywhere, kind of a hidden treasure : )

Regards!
Re: Problem installing on WDR3600
June 02, 2014 04:03PM
Hi Surian,
yes, about that tutorial you are right. We wanted to focus on the most common way to install the PirateBox, and afterwards we slowly migrate those howtos down in the page as well.
We didn't let the detailed howto stay there during the release, because we didn't want to confuse people with less technical skill.

Thanks for your feedback.

Matthias