[SETUP] Zsun WiFi Card Reader an €10 PirateBox

Posted by meduza 
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
Re: [SETUP] Zsun WiFi Card Reader an €10 PirateBox
May 02, 2016 10:07PM
Quote
Matthias
3. The sed for Droopy is because you are now running under a ext3 filesystem, so droopy have to run as the lighttpd user, that uploaded files work.
File upload works without sed, files are uploaded as root.root with mod 0755.

Quote
Matthias
6. The sed for loopback is a fix for running "/etc/init.d/piratebox stop". Without that loop1 fix, you won't unmount the opt/piratebox completely clean. Maybe there is a kernel & utility adjustment that the loopback device is automatically removed. Can you check if you
Language: HTML
/opt/piratebox/init.d/piratebox_alt cd / umount /opt/piratebox ls /dev/loop*

Piratebox running
Language: HTML
root@piratebox:~# df Filesystem 1K-blocks Used Available Use% Mounted on rootfs 944808 99092 780504 11% / /dev/root 3328 3328 0 100% /rom tmpfs 30556 140 30416 0% /tmp /dev/sda1 944808 99092 780504 11% /overlay overlayfs:/overlay 944808 99092 780504 11% / tmpfs 512 0 512 0% /dev /dev/loop0 48550 1195 43771 3% /opt/piratebox root@piratebox:~# mount /dev/root on /rom type squashfs (ro,relatime) proc on /proc type proc (rw,noatime) sysfs on /sys type sysfs (rw,noatime) tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime) /dev/sda1 on /overlay type ext4 (rw,relatime,data=ordered) overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work) tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755) devpts on /dev/pts type devpts (rw,relatime,mode=600) debugfs on /sys/kernel/debug type debugfs (rw,noatime) /dev/loop0 on /opt/piratebox type ext4 (rw,relatime,sync,data=ordered) root@piratebox:~# ls /dev/loop* /dev/loop-control /dev/loop1 /dev/loop3 /dev/loop5 /dev/loop7 /dev/loop0 /dev/loop2 /dev/loop4 /dev/loop6

Piratebox_alt stop
Language: HTML
root@piratebox:~# [b]/opt/piratebox/init.d/piratebox_alt stop[/b] Stopping script piratebox Stopping dnsmasq... 0 Stopping droopy... 0 Stopping lighttpd... 0 root@piratebox:~# df Filesystem 1K-blocks Used Available Use% Mounted on rootfs 944808 99092 780504 11% / /dev/root 3328 3328 0 100% /rom tmpfs 30556 136 30420 0% /tmp /dev/sda1 944808 99092 780504 11% /overlay overlayfs:/overlay 944808 99092 780504 11% / tmpfs 512 0 512 0% /dev /dev/loop0 48550 1194 43772 3% /opt/piratebox root@piratebox:~# mount /dev/root on /rom type squashfs (ro,relatime) proc on /proc type proc (rw,noatime) sysfs on /sys type sysfs (rw,noatime) tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime) /dev/sda1 on /overlay type ext4 (rw,relatime,data=ordered) overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work) tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755) devpts on /dev/pts type devpts (rw,relatime,mode=600) debugfs on /sys/kernel/debug type debugfs (rw,noatime) /dev/loop0 on /opt/piratebox type ext4 (rw,relatime,sync,data=ordered) root@piratebox:~# ls /dev/loop* /dev/loop-control /dev/loop1 /dev/loop3 /dev/loop5 /dev/loop7 /dev/loop0 /dev/loop2 /dev/loop4 /dev/loop6

Umount
Language: HTML
root@piratebox:/# [b]umount /opt/piratebox[/b] root@piratebox:/# df Filesystem 1K-blocks Used Available Use% Mounted on rootfs 944808 99092 780504 11% / /dev/root 3328 3328 0 100% /rom tmpfs 30556 136 30420 0% /tmp /dev/sda1 944808 99092 780504 11% /overlay overlayfs:/overlay 944808 99092 780504 11% / tmpfs 512 0 512 0% /dev root@piratebox:/# mount /dev/root on /rom type squashfs (ro,relatime) proc on /proc type proc (rw,noatime) sysfs on /sys type sysfs (rw,noatime) tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime) /dev/sda1 on /overlay type ext4 (rw,relatime,data=ordered) overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work) tmpfs on /dev type tmpfs (rw,relatime,size=512k,mode=755) devpts on /dev/pts type devpts (rw,relatime,mode=600) debugfs on /sys/kernel/debug type debugfs (rw,noatime) root@piratebox:/# ls /dev/loop* /dev/loop-control /dev/loop1 /dev/loop3 /dev/loop5 /dev/loop7 /dev/loop0 /dev/loop2 /dev/loop4 /dev/loop6

An interesting thing got my eye. I normally run, and I guess the install script as well, '/etc/init.d/piratebox stop' for shutting down piratebox. (did doesn't happens when '/opt/piratebox/init.d/piratebox_alt stop' is used)
Language: HTML
root@piratebox:/# /etc/init.d/piratebox stop Stopping script piratebox Stopping dnsmasq... 0 Stopping droopy... 0 Stopping lighttpd... 0 umount: /opt/piratebox: target is busy (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1).) umount: /opt/piratebox: not mounted /etc/init.d/piratebox: WARNING: unable to umount piratebox image losetup: /dev/loop0: detach failed: No such device or address
So, what's de difference between the ../init.s/piratebox files!?

General notice:
Because of a small family trip I will be offline till the end of the week
spinning smiley sticking its tongue out
Re: [SETUP] Zsun WiFi Card Reader an €10 PirateBox
May 03, 2016 05:24AM
Quote

File upload works without sed, files are uploaded as root.root with mod 0755.
yes, because we added a chmod in droopy. But when you have a filesystem, which supports proper use of usernames, I prefer running droopy as the lighttpd user. The advantage is, that the files are owned by lighttpd and may be deleted later.

On openwrt, that /etc/init.d/piratebox scripts does a few extra things over /opt/piratebox/init.d

* Configure OpenWrt specific things , (on init / setup)
* mount opt/piratebox
* Init the opt/piratebox things, which may need to be adjusted during first mount of opt/piratebox
* pre 1.0 it was needed to setup a correct environment (LD_PATH, PATH variable were not exposed to the root shell)
* execute opt/piratebox/init
* umount opt/piratebox
* cleanup loopn device

I'm wondering what process is blocking your opt/piratebox folder.

Matthias
Re: [SETUP] Zsun WiFi Card Reader an €10 PirateBox
May 03, 2016 09:03AM
Language: PHP
root@piratebox:~# /etc/init.d/piratebox start && /etc/init.d/piratebox stop Starting script piratebox Generating hosts file .... Generating dnsmasq.conf ..... Generating Environment-config for lighttpd ..... Empty tmp folder rm: ';/opt/piratebox/tmp'; is a directory Copy over design files Starting dnsmasq... 0 Starting droopy... 0 Generated HTML-Shoutbox File. CRITICAL: /opt/piratebox/share/Shared modified 1420 minutes ago. Threshold set to 5 minutes. Cannot update. Generated HTML-DiskUsage File. Starting lighttpd... 0 Stopping script piratebox Stopping dnsmasq... 0 Stopping droopy... 0 Stopping lighttpd... 0 umount: /opt/piratebox: target is busy (In some cases useful info about processes that use the device is found by lsof(8) or fuser(1).) umount: /opt/piratebox: not mounted /etc/init.d/piratebox: WARNING: unable to umount piratebox image losetup: /dev/loop0: detach failed: No such device or address

When I manual run 'piratebox stop' the 'target is busy' message appears approx 1 out of 5 times. I can force the message to appear then I do '/etc/init.d/piratebox start && /etc/init.d/piratebox stop' Could it just be a timing issue?



Edited 1 time(s). Last edit at 05/03/2016 09:05AM by meduza.
Re: [SETUP] Zsun WiFi Card Reader an €10 PirateBox
August 25, 2016 06:19PM
is this normal?

Re: [SETUP] Zsun WiFi Card Reader an €10 PirateBox
October 14, 2016 10:52AM
anyone trying to control LED?
Re: [SETUP] Zsun WiFi Card Reader an €10 PirateBox
November 13, 2016 05:06PM
Hello, I have a problem in the second reconnection
Tells me that packages are missing to install piratebox
Thank you very much
root@OpenWrt:~# opkg install piratebox
Installing piratebox (1.1.0-4) to root...
Downloading [stable.openwrt.piratebox.de].
Collected errors:
 * satisfy_dependencies_for: Cannot satisfy the following dependencies for piratebox:
 * 	php5-mod-sqlite * 	radvd * 
 * opkg_install_cmd: Cannot install package piratebox.
Re: [SETUP] Zsun WiFi Card Reader an €10 PirateBox
November 14, 2016 07:30PM
uhm. The issue is, that these new dependencies were added with 1.1 .. but ChaosCalmer does not support these packages anymore

:-(

mh
Re: [SETUP] Zsun WiFi Card Reader an €10 PirateBox
November 16, 2016 10:55PM
hmm...
php5-mod-sqlite3_5.6.17-1_ar71xx.ipk

radvd however has been removed from chaos calmer.

I guess I need to get back into the game and catch up on what has been updated since I was last here.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)
Re: [SETUP] Zsun WiFi Card Reader an €10 PirateBox
November 17, 2016 06:16AM
PirateBox 1.1 comes with preinstalled PHP and radvd to make IPv6 for mesh interconnect.
It might be possible to install an older (AA or Bcool smiley radvd version.

.. I am currently investigating what we need to fix on PirateBox to make it CC compatible
Re: [SETUP] Zsun WiFi Card Reader an €10 PirateBox
November 21, 2016 04:43PM
With these 3 files I have already made it work.
a greeting

libsqlite2_2.8.17-2_ar71xx.ipk
php5-mod-sqlite_5.4.5-3_ar71xx.ipk
radvd_1.9.1-2_ar71xx.ipk




And this to be able to access by ftp through ssh
openssh-sftp-server
Re: [SETUP] Zsun WiFi Card Reader an €10 PirateBox
November 23, 2016 07:23PM
i ran throught the guid here:
[piratebox.cc]

and piratebox runs nicely on my zsun, just the way it stores files feels wrong (the bar goes up fast with 32GB microSD)

It looks like the installation stores on the 500BM Ext4 Partition and overlooks the 28GB FAT32, how can i change that behaviour?

that's what "df" gives me:
root@OpenWrt:~# df
Filesystem           1K-blocks      Used Available Use% Mounted on
rootfs                  486628    245519    211465  54% /
/dev/root                 3328      3328         0 100% /rom
tmpfs                    30556        84     30472   0% /tmp
/dev/sda2               486628    245519    211465  54% /overlay
overlayfs:/overlay      486628    245519    211465  54% /
tmpfs                      512         0       512   0% /dev
/dev/sda1             30182400   2568032  27614368   9% /mnt/sda1
Re: [SETUP] Zsun WiFi Card Reader an €10 PirateBox
November 23, 2016 07:30PM
/dev/sda1 is mounted to the wrong place. Should be /opt/piratebox/share and not /mnt/sda1

copy contents of /opt/piratebox/share to /mnt/sda1/share
then
you can manually edit /etc/config/fstab to make those changes. (change the target line)

reboot and everthing SHOULD be ok.


PirateBox Installs:
2x Zsun's (both testing, one with serial interface)
A5-V11 (mostly for OpenWRT testing DIY)
2x RPi Zero's
(one active in car 24/7, gets a lot of hits at Walmart, movie theaters and the mall)
2x RPi3's (both home servers, one Ubuntu custom install along side a ton of other services)
1x RPi2 (currently work server)



Edited 3 time(s). Last edit at 11/23/2016 07:35PM by TheExpertNoob.