Create Custom Installer

Posted by carthax 
Create Custom Installer
June 20, 2017 02:45AM
I am working on an application of PirateBox that would be used by a non-profit, and I would need to create a minimum of 10 fully-functioning WR3040 routers right off the bat. In the future, I will be selling the WR3040 and thumbdrive to individuals who might have zero knowledge of computers.

What I'd like to end up with is a firmware and install folder on a thumbdrive that will set up the system for complete newbies -- so all they have to do is plug in the thumb drive, turn on the router, wait till it stops flashing, then have it ready to go with the correct SSID and all of our information on it.

Can anyone point me in the right direction to do that?

Re: Create Custom Installer
June 23, 2017 07:25AM
yes I can.

The easiest way is to fork PirateBox-Dev/PirateBoxScripts_Webserver . This is the minimum if you do not necessarily need to add new packages.

Create a branch, which is based on master (then you can merge things back to your branch and get proper diffs after a new PirateBox release is out).

Adjust the configuration in piratebox/piratebox/conf/piratebox.conf
As the SSID is OpenWrt based, it is a bit more difficult. I recommend the easisest option first:
add your custom adjustments using uci in piratebox/piratebox/bin/hooks/
This script is executed before PirateBox initialization is done. You can add normal shell script commands here.
For changing the SSID, a simple:

Language: PHP
uci set wireless.@wifi-iface[0].ssid="my SSID" uci commit wireless

is enough.

Other things, for example piratebox configuration, should be placed in
Here you can add a change for the hostname, for example:

/opt/piratebox/bin/ $1 hostname "12v.offline"

The UI is placed in piratebox/piratebox/www_content/ , remember, it will only copied into place after you removed the content folder on the USB stick.

If you are done with your customizations, then you will continue with creating an img file for the piratebox package. The steps are:

make clean
make shortimage

After this you get piratebox_ws_1.1_img.tar.gz which you can exchange with piratebox_ws_1.1_img.tar.gz inside the OR you can test it on an already working image. Replace the file with the file in <usb>/install ,
then login and perform the following commands (assuming minidlna is not running):

/etc/init.d/piratebox stop
/etc/init.d/piratebox updatePB
/etc/init.d/piratebox start
Within the next start step, the pre_openwrt_init step and later the post_init step are executed.

Hope that helps, let me know if you need further assistance,

best regards

This is only my signature.

Your Email:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically.
 **    **  ********   ********   **     **  ******** 
 **   **   **     **  **     **  **     **  **       
 **  **    **     **  **     **  **     **  **       
 *****     **     **  ********   **     **  ******   
 **  **    **     **  **         **     **  **       
 **   **   **     **  **         **     **  **       
 **    **  ********   **          *******   ********