Piratebox using trunk images of openwrt

Posted by Rene 
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
Piratebox using trunk images of openwrt
December 02, 2015 06:05PM
Hello
have somebody tried to install pb on the trunk images of openwrt?
12.04 is very old since 15.05 is stable
Re: Piratebox using trunk images of openwrt
December 04, 2015 07:39PM
Nope, you can give it a try with using our online repository.

Here is a manual installation howto: [piratebox.cc]

Matthias
Re: Piratebox using trunk images of openwrt
December 05, 2015 12:35AM
Hello Matthias,
thank you very much for the reply.
i´ve tried it using the latest git from openwrt and your feeds

it compiles just fine without errors lighttpd and the other packages are included but howto prepare my usb stick and howto change the config files?
Re: Piratebox using trunk images of openwrt
December 05, 2015 10:27AM
Hi,
I doubt that it worked out for you, if you built the packages based upon the openwrt-piratebox-feed repository! I did this last week and it failed because of broken dependencies (packages were renamed during the last OpenWRT releases).

In addition, we don't build our own images, because this brakes the compatibility to the upstream/OpenWRT kernel module packages. This makes the image only usable for PirateBox- nothing else.

So what we do is:

* Create package files (like the repository I linked above) with the OpenWrt toolchain. This makes sure the package format is fitting and dependencies can be resolved.
* Create a (local) repository with the newly created package files.
* Use the imagebuilder toolchain to use the official OpenWRT images & packages to create the custom PirateBox images and the install.zip

But to make sure, that our scripts are compatible with the OpenWrt, you need to get the PirateBox working with the manual steps. After that, the next step is to create the stuff based on the auto-installer. That ensures bugs are not mixed up between auto-install and PirateBox related scripts.

You find some more information here:

* General development stuff, including an introduction into our toolchain
* Github: openwrt-dev-environment , the toolchain for automatically builts
* OpenWrt image build - Be aware of the different branches. There is a AA based branch, you might take this one and create a new CC.based branch. This should include the new URL & names for the ChaosCalmer release (you can see the difference if you look at the trunk branch).

I hope that helps,

best regards
Matthias


This is only my signature.
Re: Piratebox using trunk images of openwrt
December 05, 2015 03:34PM
Hi Matthias,
here is what i did - all packages are installed in the flash (16m flash)

First install all depencies
sudo apt-get install zip libxml-parser-perl build-essential libncurses5-dev m4 flex git git-core zlib1g-dev unzip subversion gawk htop python libssl-dev quilt screen file
After that
git clone git://git.openwrt.org/15.05/openwrt.git
cd openwrt
nano feeds.conf.default  
add 
src-git piratebox git://github.com/PirateBox-Dev/openwrt-piratebox-feed.git
./scripts/feeds update -a
./scripts/feeds install -a
make menuconfig
i´ve selected as Target the gl-ar150
after that go to utils and select extroot and the other packages in network and so on
then run make

result is a image with all packages needed for the pb

root@OpenWrt:~# cat /proc/version
Linux version 4.1.13  (gcc version 5.2.0 (OpenWrt GCC 5.2.0 r47770) ) #2 Sat Dec 5 00:45:04 CET 2015

root@OpenWrt:~# df -h
Filesystem                Size      Used Available Use% Mounted on
/dev/root                10.5M     10.5M         0 100% /rom
tmpfs                    29.7M     64.0K     29.6M   0% /tmp
/dev/mtdblock5            3.9M    656.0K      3.2M  17% /overlay
overlayfs:/overlay        3.9M    656.0K      3.2M  17% /
tmpfs                   512.0K         0    512.0K   0% /dev

root@OpenWrt:~# opkg list-installed
base-files - 163-r47770
bash - 4.3.42-1
block-mount - 2015-11-22-86ebc116da42168a1b57204c98747c6cccebdc68
box-installer - 2.0.1-1
busybox - 1.24.1-1
dnsmasq - 2.75-2
dropbear - 2015.68-3
extendRoot - 0.9.1-3
firewall - 2015-07-27
fstools - 2015-11-22-86ebc116da42168a1b57204c98747c6cccebdc68
hostapd-common - 2015-03-25-2
ip6tables - 1.4.21-1
iptables - 1.4.21-1
iw - 4.1-1
iwinfo - 2015-10-05-813f61e48b9b1a76cb55f3b4a229bf98d3cd53a9
jshn - 2015-11-08-10429bccd0dc5d204635e110a7a8fae7b80d16cb
jsonfilter - 2014-06-19-cdc760c58077f44fc40adbbe41e1556a67c1b9a9
kernel - 4.1.13-1-e1634e6c3e2e1cf384f85343418e54ad
kmod-ath - 4.1.13+2015-10-26-1
kmod-ath9k - 4.1.13+2015-10-26-1
kmod-ath9k-common - 4.1.13+2015-10-26-1
kmod-cfg80211 - 4.1.13+2015-10-26-1
kmod-crypto-hash - 4.1.13-1
kmod-fs-ext4 - 4.1.13-1
kmod-fs-vfat - 4.1.13-1
kmod-gpio-button-hotplug - 4.1.13-1
kmod-ip6tables - 4.1.13-1
kmod-ipt-conntrack - 4.1.13-1
kmod-ipt-core - 4.1.13-1
kmod-ipt-nat - 4.1.13-1
kmod-ledtrig-usbdev - 4.1.13-1
kmod-lib-crc-ccitt - 4.1.13-1
kmod-lib-crc16 - 4.1.13-1
kmod-loop - 4.1.13-1
kmod-mac80211 - 4.1.13+2015-10-26-1
kmod-nf-conntrack - 4.1.13-1
kmod-nf-conntrack6 - 4.1.13-1
kmod-nf-ipt - 4.1.13-1
kmod-nf-ipt6 - 4.1.13-1
kmod-nf-nat - 4.1.13-1
kmod-nls-base - 4.1.13-1
kmod-nls-cp437 - 4.1.13-1
kmod-nls-cp850 - 4.1.13-1
kmod-nls-iso8859-1 - 4.1.13-1
kmod-nls-iso8859-15 - 4.1.13-1
kmod-ppp - 4.1.13-1
kmod-pppoe - 4.1.13-1
kmod-pppox - 4.1.13-1
kmod-scsi-core - 4.1.13-1
kmod-slhc - 4.1.13-1
kmod-usb-core - 4.1.13-1
kmod-usb-ohci - 4.1.13-1
kmod-usb-storage - 4.1.13-1
kmod-usb2 - 4.1.13-1
libblobmsg-json - 2015-11-08-10429bccd0dc5d204635e110a7a8fae7b80d16cb
libbz2 - 1.0.6-2
libc - 1.1.11-1
libdb47 - 4.7.25.4.NC-5
libffi - 3.0.13-1
libgcc - 5.2.0-1
libgdbm - 1.11-1
libip4tc - 1.4.21-1
libip6tc - 1.4.21-1
libiwinfo - 2015-10-05-813f61e48b9b1a76cb55f3b4a229bf98d3cd53a9
libjson-c - 0.12-1
libjson-script - 2015-11-08-10429bccd0dc5d204635e110a7a8fae7b80d16cb
libncurses - 5.9-2
libnl-tiny - 0.1-5
libopenssl - 1.0.2e-1
libpcre - 8.37-2
libpthread - 1.1.11-1
libsmartcols - 2.25.2-4
libsqlite3 - 3081101-1
libubox - 2015-11-08-10429bccd0dc5d204635e110a7a8fae7b80d16cb
libubus - 2015-11-19-259450f414d8c9ee41896e8e6d6bc57ec00e2b63
libuci - 2015-08-27.1-1
libxml2 - 2.9.3-1
libxtables - 1.4.21-1
lighttpd - 1.4.37-1
lighttpd-mod-alias - 1.4.37-1
lighttpd-mod-cgi - 1.4.37-1
lighttpd-mod-redirect - 1.4.37-1
lighttpd-mod-setenv - 1.4.37-1
losetup - 2.25.2-4
mtd - 21
netifd - 2015-12-02-988b5f74dab89f285e3bb59196b4cc880cfa51c7
odhcp6c - 2015-09-04-dc186d6d2b0dd4ad23ca5fc69c00e81f796ff6d9
odhcpd - 2015-11-19-01d3f9d64486ac1daa144848944e877e7f0cb762
opkg - 9c97d5ecd795709c8584e972bfdf3aee3a5b846d-10
perl - 5.22.0-5
perlbase-base - 5.22.0-5
perlbase-bytes - 5.22.0-5
perlbase-charnames - 5.22.0-5
perlbase-class - 5.22.0-5
perlbase-config - 5.22.0-5
perlbase-cwd - 5.22.0-5
perlbase-data - 5.22.0-5
perlbase-db-file - 5.22.0-5
perlbase-digest - 5.22.0-5
perlbase-dynaloader - 5.22.0-5
perlbase-encode - 5.22.0-5
perlbase-encoding - 5.22.0-5
perlbase-errno - 5.22.0-5
perlbase-essential - 5.22.0-5
perlbase-fcntl - 5.22.0-5
perlbase-file - 5.22.0-5
perlbase-filehandle - 5.22.0-5
perlbase-gdbm-file - 5.22.0-5
perlbase-i18n - 5.22.0-5
perlbase-integer - 5.22.0-5
perlbase-io - 5.22.0-5
perlbase-list - 5.22.0-5
perlbase-locale - 5.22.0-5
perlbase-mime - 5.22.0-5
perlbase-params - 5.22.0-5
perlbase-posix - 5.22.0-5
perlbase-re - 5.22.0-5
perlbase-scalar - 5.22.0-5
perlbase-selectsaver - 5.22.0-5
perlbase-socket - 5.22.0-5
perlbase-symbol - 5.22.0-5
perlbase-tie - 5.22.0-5
perlbase-time - 5.22.0-5
perlbase-unicode - 5.22.0-5
perlbase-unicore - 5.22.0-5
perlbase-utf8 - 5.22.0-5
perlbase-xsloader - 5.22.0-5
piratebox - 1.0.1-8
piratebox-mod-imageboard - 0.1.3-1
ppp - 2.4.7-8
ppp-mod-pppoe - 2.4.7-8
procd - 2015-10-29-6ffa138d4424dc1f1e05e8923a8d67c8394ac896
python - 2.7.10-6
python-base - 2.7.10-6
python-codecs - 2.7.10-6
python-compiler - 2.7.10-6
python-ctypes - 2.7.10-6
python-db - 2.7.10-6
python-decimal - 2.7.10-6
python-distutils - 2.7.10-6
python-email - 2.7.10-6
python-gdbm - 2.7.10-6
python-light - 2.7.10-6
python-logging - 2.7.10-6
python-multiprocessing - 2.7.10-6
python-ncurses - 2.7.10-6
python-openssl - 2.7.10-6
python-pydoc - 2.7.10-6
python-sqlite3 - 2.7.10-6
python-unittest - 2.7.10-6
python-xml - 2.7.10-6
swconfig - 10
terminfo - 5.9-2
uboot-envtools - 2015.10-1
ubox - 2015-11-22-c086167a0154745c677f8730a336ea9cf7d71031
ubus - 2015-11-19-259450f414d8c9ee41896e8e6d6bc57ec00e2b63
ubusd - 2015-11-19-259450f414d8c9ee41896e8e6d6bc57ec00e2b63
uci - 2015-08-27.1-1
unzip - 6.0-3
usb-config-scripts - 0.4.2-7
usign - 2015-05-08-cf8dcdb8a4e874c77f3e9a8e9b643e8c17b19131
wpad-mini - 2015-03-25-2
zlib - 1.2.8-1
when i insert a usb drive it gets mounted as /mnt/usb but howto configure the hostapd and lighttpd and so on?



Edited 4 time(s). Last edit at 12/05/2015 03:40PM by Rene.
Re: Piratebox using trunk images of openwrt
December 05, 2015 06:21PM
Hi Rene,
when I see what stuff you are able to put to the 16MB image, then I guess you really need the USB drive as an installation destination.

I think, if you just extract one of our current install.zip to the USB stick, then the piratebox installation should be triggered and the missing packages are installed on the usb stick... and the PirateBox should be configured at the end.
What do you think?

Matthias


This is only my signature.
Re: Piratebox using trunk images of openwrt
December 05, 2015 07:59PM
Well its not working as expected... i think the script need a littlr bit modification or the openwrt image

root@OpenWrt:~# box_installer.sh
/bin/box_installer.sh : executing run_test
/bin/box_installer.sh : Testing requirements...
/bin/box_installer.sh : .. USB storage modules available
/bin/box_installer.sh : extendRoot package is installed
/bin/box_installer.sh : Trying to find next step
/bin/box_installer.sh : executing run_signaling_extendRoot_start
/bin/box_installer.sh : Trying to find next step
/bin/box_installer.sh : executing run_prepare_extendRoot
/bin/box_installer.sh : configure initi step for extendRoot
/bin/box_installer.sh : Trying to find next step
/bin/box_installer.sh : executing run_init_extendRoot
/bin/box_installer.sh : not running extendRoot init, because it already is
/bin/box_installer.sh : Trying to find next step
/bin/box_installer.sh : executing run_signaling_extendRoot_stop
/bin/box_installer.sh : Trying to find next step
/bin/box_installer.sh : executing run_test_installation_destination
/bin/box_installer.sh : Testing if installation destination by extendRoot is available.
/bin/box_installer.sh : Installation destination is available.
/bin/box_installer.sh : Trying to find next step
/bin/box_installer.sh : executing run_fake_opkg_update
/bin/box_installer.sh : Getting main Repository from /etc/opkg.conf
/bin/box_installer.sh : Doing fake opkg update (copy from cache folder (root)
/bin/box_installer.sh : .. doing it for Piratebox repository (optional)
/bin/box_installer.sh : Trying to find next step
/bin/box_installer.sh : executing run_signaling_package_start
/bin/box_installer.sh: line 26: can't create /sys/class/leds/*3g/trigger: nonexistent directory
/bin/box_installer.sh: line 26: can't create /sys/class/leds/*usb/trigger: nonexistent directory
/bin/box_installer.sh : Trying to find next step
/bin/box_installer.sh : executing run_install_package
/bin/box_installer.sh : ERROR: /mnt/usb/install/auto_package is not set

root@OpenWrt:~# box_installer_start.sh
/bin/box_installer_start.sh : Logging install log to USB-Stick
cat: can't open '/var/log/messages': No such file or directory
What to do now? And maybe you could give me a messenger option like skype or something else so we could hack together? smiling smiley
Re: Piratebox using trunk images of openwrt
December 05, 2015 08:16PM
Quote

bin/box_installer.sh : ERROR: /mnt/usb/install/auto_package is not set
this more like you extracted the zip file wrong.. winking smiley

you can find me on the irc, I'm not using skype .. ;P


This is only my signature.



Edited 1 time(s). Last edit at 12/05/2015 08:19PM by Matthias.
Re: Piratebox using trunk images of openwrt
December 05, 2015 11:34PM
after some tries and set the symlink manually..
root@OpenWrt:~# ln  -s /etc/piratebox.config /usr/local/etc/piratebox.config
root@OpenWrt:~# /etc/init.d/piratebox start
It seems PirateBox was not initialized correctly
 or the USB stick is not mounted
root@OpenWrt:~# It seems PirateBox was not initialized correctly
-ash: It: not found
root@OpenWrt:~# mount
/dev/root on /rom type squashfs (ro,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,noatime)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,noatime)
tmpfs on /tmp type tmpfs (rw,nosuid,nodev,noatime)
/dev/mtdblock5 on /overlay type jffs2 (rw,noatime)
overlayfs:/overlay on / type overlay (rw,noatime,lowerdir=/,upperdir=/overlay/upper,workdir=/overlay/work)
tmpfs on /dev type tmpfs (rw,nosuid,relatime,size=512k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,mode=600)
debugfs on /sys/kernel/debug type debugfs (rw,noatime)
/dev/sda1 on /mnt/usb type vfat (rw,noatime,fmask=0000,dmask=0000,allow_utime=0022,codepage=437,iocharset=iso8859-1,shortname=mixed,errors=remount-ro)
/dev/loop0 on /mnt/ext type ext4 (rw,sync,relatime,data=ordered)
root@OpenWrt:~# cat /etc/piratebox.config
#############################################################################
# PirateBox global config. /etc/init.d/piratebox setup to take effect

# Use ext_config stuff .. if not available, assume something
if [ -e /etc/ext.config ] ; then
   . /etc/ext.config
else
   ext_usbmount="/mnt/PirateBox"
   ext_linktarget=""
   echo "Ext-root config not found..."
   echo  "this can be an error or wished.. assuming: "
   echo  "   PirateBox-usb folder:  $ext_usbmount"
   echo  "   additional linktarget:  $ext_linktarget"
fi


pb_usbdir="$ext_usbmount/PirateBox"
pb_ip="192.168.1.1"

pb_wireless_ssid="PirateBox - Share Freely"
pb_hostname="piratebox.lan"
pb_random_hostname=""
pb_pb_srcImg="$ext_usbmount/install/piratebox_ws_1.0_img.tar.gz"

pb_usbdir="$ext_usbmount/PirateBox"
pb_pbimg="$pb_usbdir/pbIMG_ws.img"
pb_pbmount="/opt/piratebox"

pb_www_alt="$pb_usbdir/www_alt"

# Backup Url for downloading Image
pb_pb_srcImg_url="[piratebox.aod-rpg.de];

pb_inst_done="$ext_linktarget/etc/piratebox.install_done"
pb_inst_flag_mesh="/etc/init.d/mesh"

#PirateBox Script internals
pb_flag_image_init_done="$pb_pbmount/conf/openwrt_init_done"
pb_piratebox_conf="$pb_pbmount/conf/piratebox.conf"
pb_timesave_script="$pb_pbmount/bin/timesave.sh"

root@OpenWrt:~# cd /mnt/usb
root@OpenWrt:/mnt/usb# mkdir PirateBox
root@OpenWrt:/mnt/usb# /etc/init.d/piratebox start
mount: mounting /mnt/usb/PirateBox/pbIMG_ws.img on /opt/piratebox failed: No such file or directory
/etc/init.d/piratebox: ERROR: unable to mount piratebox image
root@OpenWrt:/mnt/usb# ls
sooo... where i can get pbIMG_ws.img?
Re: Piratebox using trunk images of openwrt
December 06, 2015 02:19AM
i´ve made it!
i´ve copied the content of /mnt/usb/PirateBox from another PB Installation and now it is working great with the gl-ar150 AND cc1505
Re: Piratebox using trunk images of openwrt
December 06, 2015 02:31AM
Well, it seems it is not so easy...hostapd was not working but this was not a issue after hostapd -B /opt/piratebox/hostapd.conf it was working but dns seems not working i cant reach the pb with wlan
Re: Piratebox using trunk images of openwrt
December 06, 2015 08:30AM
No, I think your initial PirateBox configuration seems not to be done

Try and run:

/etc/init.d/piratebox stop
/etc/init.d/piratebox setup
reboot

The reboot is the proper way to initialize the system. After that you should see a wifi network "PirateBox - Share Freely"

Matthias
Re: Piratebox using trunk images of openwrt
December 06, 2015 04:38PM
Great, thank you very much it´s working now
Re: Piratebox using trunk images of openwrt
December 07, 2015 06:34PM
wuhu, congratulations!


This is only my signature.
Re: Piratebox using trunk images of openwrt
December 14, 2015 09:33PM
is there any plan to build images from trunk or the stable 15.05 release u could provide to the community maybe?
Re: Piratebox using trunk images of openwrt
December 15, 2015 06:35AM
You can try it yourself, using the openwrt-image-build with the current version of the imagebuilder (use the AA-with-installer branch).
The main difference for "generic" piratebox-images is, that 95% of our packages are installed to the USB stick, which is the reason why it didn't worked out until today. Your installation was quite different.

I'm currently working on preparing the 2.1 release of LibraryBox including a hotfix release for PirateBox. With that change, some bugfixes will go into the automatic installation...

Matthias


This is only my signature.