Raspbian and Armbian based manual instructions

The prebuilt images are ArchLinux based, but for various reasons, it can be helpful to step to Armbian or Raspbian. These distributions do support other or sometimes better the different onechip computers. For CHIP, check out the ChiPirate-BOX: the chipest and cheapest Pirate-BOX ever manual. It contains some additional hints.

After everything is correctly setup, the following parameters are valid:

  • IP Address via wifi: 192.168.77.1 (use ssh)
  • SSID: PirateBox - Share Freely
  • IP Range: 192.168.77.10 - 192.168.77.250
  • Hostname: piratebox.lan

Recipe

Login via SSH corresponding to your distribution.

Install some extra debian packets:

 sudo apt-get update
 sudo apt-get install iw perl lighttpd dnsmasq hostapd python php5-cgi zip avahi-daemon hostapd libcgi-pm-perl

Prevent the daemons from automatic loading.

sudo systemctl stop lighttpd
sudo systemctl disable lighttpd
sudo systemctl stop dnsmasq
sudo systemctl disable dnsmasq
sudo systemctl stop hostapd
sudo systemctl disable hostapd

Get the piratebox code:

wget  http://downloads.piratebox.de/piratebox-ws_current.tar.gz
tar xf piratebox-ws_current.tar.gz
cd piratebox
sudo cp -rv piratebox /opt
sudo ln -s /opt/piratebox/init.d/piratebox /etc/init.d/

All the files shared by this piratebox will be stored in /opt/piratebox/share.

It is a good idea to have a look and edit some configuration parameters (if you like) in the following files: /opt/piratebox/conf/piratebox.conf and /opt/piratebox/conf/hostapd.conf. (It is not strictly needed it works out-of-the-box).

Finalize the installation:

sudo /opt/piratebox/bin/install_piratebox.sh /opt/piratebox/conf/piratebox.conf part2
sudo /etc/init.d/piratebox start
sudo /opt/piratebox/bin/install_piratebox.sh /opt/piratebox/conf/piratebox.conf imageboard

To activate the board, run the following command:

sudo /opt/piratebox/bin/board-autoconf.sh

Everything is now ready. It is possible to start your PirateBox:

sudo /etc/init.d/piratebox start

Obviously the PirateBox can be turned off in this way:

sudo /etc/init.d/piratebox stop

Systemd can be instructed to start PirateBox at boot time:

sudo systemctl enable piratebox

Use disable instead of enable to undo this operation.

USB Stick

It is recommended to use an USB stick to store your files.

You can follow the instructions listed Raspberry Pi(rate)Box Mods - USB FAT Storage.

Minidlna

For enabling minidlna, some additional steps are required:

 sudo apt-get install minidlna
 sudo cp /etc/minidlna.conf /etc/minidlna.conf.bkp
 sudo cp /opt/piratebox/src/linux.example.minidlna.conf /etc/minidlna.conf
 sudo systemctl enable minidlna
 sudo systemctl start minidlna

Trouble?

As this is more like an unsupported build, please ask in this forum for assistance.

Disable management of wifi card in NetworkManager

The NetworkManager is a comfort feature, which tend to disturb a smoothness running PirateBox. You can disable the management of wlan0 of the NetworkManagement daemon, run:

 if ! grep -q wlan0 /etc/NetworkManager/NetworkManager.conf ; then
    sudo sed -i -e 's|unmanaged-devices=interface-name|unmanaged-devices=;interface-name|' \
                /etc/NetworkManager/NetworkManager.conf
    sudo sed -i -e 's|unmanaged-devices=|unmanaged-devices=interface-name:wlan0|' \
               /etc/NetworkManager/NetworkManager.conf
 fi