• BerryBoot allows to put multiple operating systems on one sd card.
  • the low power micro wifi adapter edimax ew-7811un is used in accesspoint mode
  • PirateBox 1.01 exists as arch linux based raspberry pi image

Install BerryBox (reference)

  • download latest berryboot zip archive from sourceforge
  • reformat an sd card with one fat32 partition
  • copy the contents of the zip archive into this partition
  • attach screen, mouse and wired ethernet to raspberry pi and boot from sd card
  • follow the instructions and install one “standard os”, e.g. “webserver”

Install PirateBox raspberry pi image

  • download latest piratebox raspberry pi image (ArchLinuxARM) from downloads.piratebox.de (using a bit torrent client like deluge)
  • this image has to modified on a linux machine (e.g. ubuntu 14.04 lts):
    /lib and /sbin which are symbolic links in the image have to be changed to real directories (reference)
    the resulting root partition has to be copied into a squash filesystem (reference)
  • unzip the image and use kpartx as helper to mount the second partition
    kpartx -av filename_of_unpacked_image
    mount /dev/mapper/loopNp2 your_mountpoint (with N=0, 1, 2 … as displayed by kpartx
  • use mc, navigate to the root directory of the mounted image.
    i) Remove the symlinks lib, binĀ  and sbin.
    ii) Move usr/lib to the root directory of the image; also move usr/bin to the root directory of the image.
    iii) Inside the root directory of the image rename bin to sbin and make a symlink from sbin to bin (ln -s sbin bin).
    iv) inside usr/ create symlinks for lib, bin and sbin to the root directory (ln -s bin ../bin; ln -s sbin ../sbin; ln -s lib ../lib)
  • create the squash filesystem image (excluding the kernel modules because the kernel of BerryBoot is used)
    mksquashfs your_mountpoint archlinux.img -comp lzo -e lib/modules
  • copy archlinux.img to an usb stick, plug this usb stick into the usb port of the raspberry pi running berryboot “edit boot”
    and copy archlinux.img to the sd card (using a long mouse click on “Add OS”)
  • set archlinux as default boot entry and exit the boot menu configuration
  • the raspberry pi should boot to the arch linux boot prompt (alarmpi: user: root; password: root)

Configure PirateBox with edimax ew-7811un wifi as access point (reference)

  • replace /usr/bin/hostapd by this version (reference)
  • use editor nano and change the line driver=… in /opt/piratebox/conf/hostapd.conf
  • edit /opt/piratebox/www/board/config.pl and uncomment and set
    ADMIN_PASS (=forum administrator password) and SECRET (seed for cryptography)
  • workaround: piratebox.service (version 2014-10-10) needs to be started with a delay (else it fails to start hostapd):
    use nano and create /etc/systemd/system/piratebox.timer:
    Description=piratebox delayed start
  • activate this timer with
    systemctl enable piratebox.timer
  • test if piratebox runs with
    systemctl piratebox status
    and try to rerun it with
    systemctl piratebox stop
    systemctl piratebox start
    systemctl piratebox status
  • connect to piratebox access point; reboot; wait about 2 minutes; try again to connect
  • use passwd to set your own root password
  • reboot without wired lan connection and without keyboard, mouse and monitor

For a clean shutdown without keyboard ssh could be used (use hostname piratebox.lan)

To upload files from ios other than photos and videos from photo roll and camera:

  • install icab-mobile (has an affordable price)
  • on the settings page of icab-mobile set Network/Upload to icab mobile mode (defaults to ios mode)
  • even with this setting the iframed upload page uses ios upload mode, but
    opened as a separate page (and not as iframe) allows to upload files (which have been previously downloaded by icab-mobile)
  • documents displayed in safari can be transferred to icab-mobile download folder using “open with …” / icab mobile;
    then icab mobile asks if the document should be downloaded.

Leave a Reply