Raspberry Pi 2 - Arch Install

Posted by NightShade 
Raspberry Pi 2 - Arch Install
October 02, 2015 02:15AM
I installed Piratebox onto a Raspberry Pi2 under Arch Linux. I figured that I would share the steps I took in order to set it up. The current instructions are based on the Raspian Instructions, except tweaked for Arch.

#Setup Arch on Pi2:
Follow these instructions: http://archlinuxarm.org/platforms/armv7/broadcom/raspberry-pi-2

#Pacman - update all packages
pacman -Syu


#install lighttpd, remove autostart
pacman -S lighttpd --noconfirm
systemctl stop lighttpd
systemctl disable lighttpd


#install dnsmasq, remove autostart
pacman -S dnsmasq --noconfirm
systemctl stop dnsmasq
systemctl disable dnsmasq


#install hostapd, remove autostart
pacman -S hostapd --noconfirm
systemctl stop hostapd
systemctl disable hostapd


#install iw
pacman -S iw --noconfirm


#switch bash to sh
rm /bin/sh
ln /bin/bash /bin/sh
chmod a+rw /bin/sh


#install wget, download piratebox
cd ~/
pacman -S wget --noconfirm
wget http://downloads.piratebox.de/piratebox-ws_current.tar.gz
tar xzf piratebox-ws_current.tar.gz


#download arch startup script
cd ~/piratebox/init.d/
wget https://raw.githubusercontent.com/PirateBox-Dev/PirateBoxScripts_Webserver/master/BuildScripts/piratebox.service



#put piratebox in correct location, setup droopy
cd ~/piratebox/
mkdir -p /opt
cp -rv piratebox/ /opt
cd /opt/piratebox/
sed 's#DROOPY_USE_USER="no"#DROOPY_USE_USER="yes"#' -i  /opt/piratebox/conf/piratebox.conf


#install startup script
cp /opt/piratebox/init.d/piratebox.service /etc/systemd/system/piratebox.service


#add groups
groupadd nogroup; useradd -g nogroup nobody; usermod -a -G nogroup nobody;


#make and install debian's Start-Stop-Daemon
pacman -S gcc
pacman -S make
cd ~/
wget http://ftp.de.debian.org/debian/pool/main/d/dpkg/dpkg_1.18.3.tar.xz
tar -xvf dpkg_1.18.3.tar.xz
cd dpkg-1.18.3/
./configure
make
cd utils/
make install start-stop-daemon


#install python
pacman -S python2
ln -s /usr/bin/python2 /usr/bin/python


#enable piratebox on startup and start
systemctl enable piratebox
systemctl start piratebox
Re: Raspberry Pi 2 - Arch Install
October 02, 2015 04:51AM
thank you for the good guide.

Question: Why don't you use "makepkg" for building start-stop-daemon? You only need to adjust the arch flag of the package file

regards Matthias


This is only my signature.
Re: Raspberry Pi 2 - Arch Install
October 02, 2015 07:16AM
there's no reason. I just wasn't aware of that method.

- nightshade / gaeta



Edited 1 time(s). Last edit at 10/02/2015 07:17AM by NightShade.
JBJ
Re: Raspberry Pi 2 - Arch Install
October 10, 2015 04:09PM
Thanks for the guide.

Got me closer to having a piratebox on my rpi2, but one thing i couldn't figure out was the board.

Kept getting a 500 server error when going to the kareha.pl page.

Any thoughts on what that could be?
Re: Raspberry Pi 2 - Arch Install
October 11, 2015 06:02PM
Check out the file called /opt/piratebox/tmp/break.log after you got the message.
The file contains CGI errors and will give a hint what is missing-

best regards
Matthias


This is only my signature.
JBJ
Re: Raspberry Pi 2 - Arch Install
October 11, 2015 09:11PM
Figured it out, had to install a few other programs and make a directory to make it work.

The programs were: perl-cgi, unzip, cronie.

and

mkdir /opt/piratebox/www/board for your script from here to unzip everything correctly.

Thanks to both of you!
Hi,

i have problem with wlan0, not work, if i unplug lan wlan0 turn on but i can't find any piratebox wifi network

there is anothes step ?

Thank you
Re: Raspberry Pi 2 - Arch Install
October 13, 2015 11:08PM
Hi, i have the same problem. I have installed two times arch linux with this procedure, i have verified all passage, folder, setting but no one wlan is ready.

I reboot raspberry pi2 but nothing to do. Pirate wlan is missing. Only this message..."wlan0: link is not ready. Cfg80211: calling crda to update world regulatory domain" .

Are you sure it work ?
Re: Raspberry Pi 2 - Arch Install
October 15, 2015 08:43PM
which usb wifi do you use?
Re: Raspberry Pi 2 - Arch Install
October 17, 2015 03:32PM
Tplink wn725n
Re: Raspberry Pi 2 - Arch Install
November 17, 2015 07:45AM
This confirm working bro? can i edit the design of the web?
wim
Re: Raspberry Pi 2 - Arch Install
November 22, 2015 01:57PM
Not all wifi cards, whether USB or not, can act as AP. From the look of it, it seems yours can't.
Author:

Your Email:


Subject:


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.
 **     **  **         **         **      **  ********  
  **   **   **    **   **    **   **  **  **  **     ** 
   ** **    **    **   **    **   **  **  **  **     ** 
    ***     **    **   **    **   **  **  **  ********  
   ** **    *********  *********  **  **  **  **        
  **   **         **         **   **  **  **  **        
 **     **        **         **    ***  ***   **        
Message: