PirateBox LiveUSB - Calling for Developers!

Posted by darts 
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 LiveUSB - Calling for Developers!
June 19, 2014 04:09PM
Hey Everyone,

The PirateBox LiveUSB project (which allows you to run PirateBox directly on your laptop from a Live USB image) has been dormant for awhile and Matthias and I were hoping that some members of the PirateBox community might consider bringing it back to life. Please poke us if you're interested...
Re: PirateBox LiveUSB - Calling for Developers!
February 28, 2015 07:45AM
Have some experience with arch linux, if that is of any use? Currently work on ArchBang and VoidBang live isos.

Mr Green
Re: PirateBox LiveUSB - Calling for Developers!
March 01, 2015 07:18PM
Hi,
yes that sounds like a good base to start with that topic smiling smiley

I would love to see that someone can recreate a new livecd piratebox smiling smiley

What do you need to know for starting winking smiley ?

regards Matthias
Re: PirateBox LiveUSB - Calling for Developers!
March 01, 2015 07:53PM
Packages required, any configs that are needed... A general overview of priratebox...

Could add such a setup too ArchBang if not too heavy.
Re: PirateBox LiveUSB - Calling for Developers!
March 02, 2015 02:31PM
I wrote a howto for creating the RaspberryPI images under ArchLinux. That contains a lot of informations and links to the service-file for startup: [www.piratebox.cc]

The configuration from the RPi version works like the following:

- bootup ssh is enabled per default
- Ethernet port is stand alone waiting for getting an IP via DHCP
- PirateBox Scripts aren't enabled for boot up in default configuration.

After you did the post installation section of the RPI-DIY [www.piratebox.cc] , PirateBox is enabled for bootup.
Per Default it uses wlan0 as wifi device name. All further networking services are running on that interface. When the PirateBox scripts are started:
- Cleanups and preparence of the Shared folder
- hostap is creating the AP (interface comes up)
- ifconfig against the wifi interface
- starting dnsmasq (doing a catch-all dns server and serving IPs)
- starting lighttpd
- starting droopy (Upload utility)

then you have several options, like waiting with starting hostap until the configured wifi devices shows up.

IMHO, the best thing is to give a local test installation a try to get an impression.
Unfortunately, I have no idea how the current liveCD works.

regards Matthias
Re: PirateBox LiveUSB - Calling for Developers!
March 03, 2015 07:48AM
Wlan0 is the old naming scheme, currently my default wifi device name is wlp2s0. I will take a look at raspberry pi version it will gice me an overview of what is needed. ssh by default is not a problem. Wired connection should not be an issue either. Guessing that you can then ssh in and configure wifi as required.

If I can get something working then I would upload source files too github for you to look over/test.

Please bear with me as my work with ArchBang and VoidBang does take up a bit of my time...

Thanks

Mr Green
Re: PirateBox LiveUSB - Calling for Developers!
March 03, 2015 08:01AM
No worries, I'm patient about this topic smiling smiley

I know that the naming scheme changed, but on RPI-Archlinux it is (fortunately) not. .. because that would cause some code changes to find out the right name during first boot. sad smiley
If you have something useful about this, let me know winking smiley

regards Matthias
Re: PirateBox LiveUSB - Calling for Developers!
March 03, 2015 08:21AM
Thinking that I you could run wifi-menu to set up wireless connection at first run. Setting it up so you do not need too every boot is something else. You would need to be able to access either host drive or usb drive itself (to store information)...

Or go for an install....

For now you really need something working that can be set up for testing
Re: PirateBox LiveUSB - Calling for Developers!
March 07, 2015 06:17PM
Starting to work in iso, once I get something built more than likely will need help to configure it correctly. Have pulled packages required in (except proftpd!)... Will get source too github soon for you too checkout.

Provided I can get it too boot that is ;-)
Re: PirateBox LiveUSB - Calling for Developers!
March 07, 2015 06:46PM
Re: PirateBox LiveUSB - Calling for Developers!
March 07, 2015 06:52PM
Thanks for your work!

unfortunately, you need the start-stop-daemon, which isn't in the package list yet



Edited 1 time(s). Last edit at 03/07/2015 06:53PM by Matthias.
Re: PirateBox LiveUSB - Calling for Developers!
March 07, 2015 08:09PM
That's ok I can add what ever you need... Will update source to suit
Re: PirateBox LiveUSB - Calling for Developers!
March 07, 2015 08:10PM
Ok will add too packages and update github
Re: PirateBox LiveUSB - Calling for Developers!
March 07, 2015 08:16PM
I cannot find start-stop-daemon can you give me the package name? Did add piratebox.service too /etc/systemd/system and start it from custom script
Re: PirateBox LiveUSB - Calling for Developers!
March 08, 2015 11:33AM
Uploaded a couple of test isos, not much works at the moment. user is ablive (no password). Not sure if piratebox service is set up for ArchLinux, not exactly sure what it does.

Can access live system via ssh, lighttpd runs (if you add inidex.html). minidlna needs need set up so have not fully tested.

Let me know if you want me to change/edit/modify anything.

[sourceforge.net]
Re: PirateBox LiveUSB - Calling for Developers!
March 08, 2015 11:55AM
You need to build a package from [aur.archlinux.org] for the start-stop-daemon
without that, it won't start anything.
Re: PirateBox LiveUSB - Calling for Developers!
March 08, 2015 12:01PM
Ok I will add it too aur_packages and rebuild. Wondered why I could not find it :-)
Re: PirateBox LiveUSB - Calling for Developers!
March 08, 2015 12:43PM
Updated and uploaded new isos....
Re: PirateBox LiveUSB - Calling for Developers!
March 08, 2015 04:30PM


Found piratebox service was not starting (ifconfig error) once got past that this came up in my browser on my laptop. As you can see the file share box seems to have an error, some service or function needs to be started but not clear on what yet.
Re: PirateBox LiveUSB - Calling for Developers!
March 09, 2015 07:15PM
looks good.
You need to add "nameserver 192.168.77.1" to the /etc/resolv.conf , because the iframe reads from the dns name "piratebox.lan", which can't be resolved. On clients it should work.
Re: PirateBox LiveUSB - Calling for Developers!
March 09, 2015 07:27PM
Have added net-tools for ifconfig and will add resolv.conf soon.
Re: PirateBox LiveUSB - Calling for Developers!
March 09, 2015 07:31PM
btw, I assumed, you tested it on the running image.
The resolv.conf won't help on a client. The client should get the needed values by DHCP.
Re: PirateBox LiveUSB - Calling for Developers!
March 09, 2015 07:45PM
My screenshot was from a live usb but I set up wireless via wifi-menu, so it would not be an access point as such. Need to test new version.
Re: PirateBox LiveUSB - Calling for Developers!
March 10, 2015 07:35AM
Got an error 'log_daemon_msg' command not found? Do I need some logging installed too?
Re: PirateBox LiveUSB - Calling for Developers!
March 10, 2015 07:44AM
nope, I wonder why. Usually, the service file uses /opt/piratebox/init.d/piratebox_alt , which don't make use of Debian's log_daemon_msg
Did you made a custom service file?
Re: PirateBox LiveUSB - Calling for Developers!
March 11, 2015 10:16AM
Ok it seems my laptop does not support ap mode. Stuck my micro USB wifi in and it finds and sets up interface. Note that arch linux uses new naming scheme so had to edit config to get it too run.

Interface is set down at the moment so may need more work to get it running. Is there a file I can add custom settings too get priratebox service too run without the need to edit a raft of files?

Am tempted to try create_ap for a more arch like approach, it does most of the hard work for you, checking with its developer if I can modify IP address.
Re: PirateBox LiveUSB - Calling for Developers!
March 12, 2015 07:41AM
I know that the PirateBox-Startup with preparing everything is not the archlinux (systemd) way.
The scripts are designed to be a "out of the box" solution, that when you close it, your system is untouched.

you need to do a simple
   sed -i 's|wlan0|<new_name>|g' /opt/piratebox/conf/hostap.conf
   sed -i 's|wlan0|<new_name>|g' /opt/piratebox/conf/piratebox.conf

No, we currently haven't a script for doing that. With my overwork, there will be only one config file to be (ex)changed later.
Maybe you write an script, that is doing the modification and then issuing the start/stop command, which you call from the service file.
Re: PirateBox LiveUSB - Calling for Developers!
March 12, 2015 08:13AM
Was struggling with scripts of course I can 'sed' to get the correct device name. Technically a 'live' system should not touch anything in users system. If I was installing then it would be a different issue.

Your scripts are more Debain based to me, as I am unsure about them it is taking a little longer to get something working.

Iso framwork is there just need to get piratebox service running ;-) might have news on that soon
Re: PirateBox LiveUSB - Calling for Developers!
March 12, 2015 08:16AM
Quote

Your scripts are more Debain based to me, as I am unsure about them it is taking a little longer to get something working.
Yes, you are right. They were developed on and for Debian.
As Raspian changed from a small ISO to a bloat of stuff, I moved away to get a small downloadable image again. That is the point, where ArchLinux came up. smiling smiley

Looking forward to your results.

and Thanks for your time & work.



Edited 1 time(s). Last edit at 03/12/2015 08:16AM by Matthias.
Re: PirateBox LiveUSB - Calling for Developers!
March 23, 2015 07:38AM
My efforts are mixed, piratebox scripts do not work with my wifi adapter (Edimax). So I went and tried create_ap, a bash script written too set up access points. There is a work around for realtek and it does work. Was able to point lighttpd too your configs/css/templates and managed to get piratebox web gui up.

Shoutbox I have no idea, could not find anything in aur.

No idea how messenging works or file share part.

Not sure a liveUSB piratebox is going to work, with many different wifi cards/usb devices getting it too work would be difficult.

The Pi uses an image file which can be changed, modified and settings are of course saved after poweroff. Do not think a user wants to set up AP every time they start Piratebox. Wondering if the same approach would work with a USB install?