Differences
This shows you the differences between two versions of the page.
Both sides previous revision Previous revision Next revision | Previous revision | ||
openwrt:manual:zsun [2017/01/28 21:00] theexpertnoob [6. Options are optional] |
openwrt:manual:zsun [2022/06/26 21:24] theexpertnoob Too outdated to maintain. |
||
---|---|---|---|
Line 5: | Line 5: | ||
I would like to share my installation scripts in order to let you install your own. | I would like to share my installation scripts in order to let you install your own. | ||
- | <WRAP center centeralign alert 75%>This tutorial is for the technical minded but should be simple to follow until we get a full install package/script working. | + | <WRAP center centeralign alert 75%>This tutorial will soon be out of date due to the upcoming PirateBox v1.2. It will be updated once all the bugs are figured out and there is a successful release for this device.</WRAP> |
- | NOBODY will take responsibility or be liable for anything you do to your zsun. | + | |
- | If you brick it trying these procedures, **YOU** are solely responsible for your actions. | + | |
- | **YOU HAVE BEEN WARNED**. However, we can try and help in the forums.</WRAP> | + | |
- | ==== 0. PreSetup ==== | + | <WRAP center centeralign alert 75%>This tutorial is for the technical minded but should be simple to follow until we get a full install package/script working. |
+ | NOBODY will take responsibility or be liable for anything you do to your zsun. | ||
+ | If you brick it trying these procedures, **YOU** are solely responsible for your actions. | ||
+ | **YOU HAVE BEEN WARNED**. However, we can try and help in the forums. | ||
+ | This has been recently tested on Jan 28, 2017 and working with PirateBox v1.1.2. | ||
+ | |||
+ | Now testing on LEDE for A5-V11 with latest piratebox. Will create a new wiki page for A5-V11 LEDE setup as well as update this wiki once all testing is complete.</WRAP> | ||
+ | |||
+ | ==== 0. PreSetup ZSUN ==== | ||
* Having a Zsun running OpenWrt. I've used the [[https://wiki.hackerspace.pl/projects:zsun-wifi-card-reader:factory-update|hackerspace.pl]] method. | * Having a Zsun running OpenWrt. I've used the [[https://wiki.hackerspace.pl/projects:zsun-wifi-card-reader:factory-update|hackerspace.pl]] method. | ||
* microSD card (current data will be destroyed) | * microSD card (current data will be destroyed) | ||
Line 59: | Line 64: | ||
opkg update | opkg update | ||
</code> | </code> | ||
+ | |||
+ | |||
==== 1. Setup Mounts ==== | ==== 1. Setup Mounts ==== | ||
=== Format SD card === | === Format SD card === | ||
* Copy and paste one line at a time | * Copy and paste one line at a time | ||
- | * if druss.org is down try: | ||
- | * wget https://raw.githubusercontent.com/TheExpertNoob/scripts/parts/parts | ||
<code> | <code> | ||
cd /tmp | cd /tmp | ||
export LD_LIBRARY_PATH='/lib:/usr/lib:/tmp/lib:/tmp/usr/lib' | export LD_LIBRARY_PATH='/lib:/usr/lib:/tmp/lib:/tmp/usr/lib' | ||
- | opkg update && opkg install -d ram e2fsprogs mkdosfs fdisk | + | opkg update && opkg install -d ram e2fsprogs dosfstools fdisk |
wget http://druss.org/public/parts | wget http://druss.org/public/parts | ||
chmod +x /tmp/parts | chmod +x /tmp/parts | ||
./parts | ./parts | ||
- | /tmp/usr/sbin/mkfs.vfat /dev/sda1 | + | /tmp/usr/sbin/mkfs.fat /dev/sda1 |
/tmp/usr/sbin/mkfs.ext4 /dev/sda2 | /tmp/usr/sbin/mkfs.ext4 /dev/sda2 | ||
</code> | </code> | ||
Line 87: | Line 92: | ||
uci commit | uci commit | ||
mkdir /mnt/sda2 | mkdir /mnt/sda2 | ||
- | mount /dev/sda2 /mnt/sda2 | + | mount -t ext4 /dev/sda2 /mnt/sda2 |
tar -C /overlay -cvf - . | tar -C /mnt/sda2 -xf - | tar -C /overlay -cvf - . | tar -C /mnt/sda2 -xf - | ||
uci add fstab mount | uci add fstab mount | ||
Line 101: | Line 106: | ||
* Reconnect to PirateBox - Share Freely | * Reconnect to PirateBox - Share Freely | ||
==== 2. Install Packages ==== | ==== 2. Install Packages ==== | ||
- | * Copy and paste | + | * Copy and paste each code block and reboot between installation blocks as noted. Due to "newer" packages, I have been running out of ram and I am having to split them up so the process doesn't kill itself while configuring. I will work on an alternate solution soon. (Testing on A5-V11) |
<code> | <code> | ||
- | opkg update && opkg install python lighttpd lighttpd-mod-cgi lighttpd-mod-redirect lighttpd-mod-alias lighttpd-mod-setenv lighttpd-mod-fastcgi perl perlbase-base perlbase-cgi perlbase-essential perlbase-file perlbase-bytes perlbase-config perlbase-data perlbase-db-file perlbase-digest perlbase-encode perlbase-encoding perlbase-fcntl perlbase-gdbm-file perlbase-integer perlbase-socket perlbase-time perlbase-unicode perlbase-unicore perlbase-utf8 perlbase-xsloader php5-cgi php5-fastcgi unzip minidlna unzip | + | opkg update && opkg install python lighttpd lighttpd-mod-cgi lighttpd-mod-redirect lighttpd-mod-alias lighttpd-mod-setenv lighttpd-mod-fastcgi |
</code> | </code> | ||
- | * Press Enter | + | * Reboot |
- | * Wait....Tea break? | + | <code> |
+ | opkg update && opkg install perl perlbase-base perlbase-cgi perlbase-essential perlbase-file perlbase-bytes perlbase-config perlbase-data perlbase-db-file perlbase-digest perlbase-encode perlbase-encoding perlbase-fcntl perlbase-gdbm-file perlbase-integer perlbase-socket perlbase-time perlbase-unicode perlbase-unicore perlbase-utf8 perlbase-xsloader | ||
+ | </code> | ||
+ | * Reboot | ||
+ | <code> | ||
+ | opkg update && opkg install php5-cgi php5-fastcgi unzip minidlna | ||
+ | </code> | ||
+ | * Reboot | ||
==== 3. Set-up Piratebox, Imageboard & MiniDLNA ==== | ==== 3. Set-up Piratebox, Imageboard & MiniDLNA ==== | ||
* Copy and paste each line separately. | * Copy and paste each line separately. | ||
Line 121: | Line 133: | ||
sed -i 's|NET=192.168.77|NET=192.168.1|g' /opt/piratebox/conf/piratebox.conf | sed -i 's|NET=192.168.77|NET=192.168.1|g' /opt/piratebox/conf/piratebox.conf | ||
sed -i 's|DNSMASQ_INTERFACE="wlan0"|DNSMASQ_INTERFACE="br-lan"|g' /opt/piratebox/conf/piratebox.conf | sed -i 's|DNSMASQ_INTERFACE="wlan0"|DNSMASQ_INTERFACE="br-lan"|g' /opt/piratebox/conf/piratebox.conf | ||
- | sed -i 's:DROOPY_CHMOD:#DROOPY_CHMOD:' /opt/piratebox/conf/piratebox.conf | + | sed -i 's|DROOPY_CHMOD|#DROOPY_CHMOD|g' /opt/piratebox/conf/piratebox.conf |
sed -i 's|getenv = CDLL("libc.so.6").getenv|getenv = CDLL("libc.so.0").getenv|g' /opt/piratebox/bin/droopy | sed -i 's|getenv = CDLL("libc.so.6").getenv|getenv = CDLL("libc.so.0").getenv|g' /opt/piratebox/bin/droopy | ||
/etc/init.d/lighttpd stop | /etc/init.d/lighttpd stop | ||
Line 166: | Line 178: | ||
==== 6. Options are optional ==== | ==== 6. Options are optional ==== | ||
~Sarge, RvB | ~Sarge, RvB | ||
- | === 6.1 Enable IRC === | + | === 6.1 Enable PHP === |
+ | <code> | ||
+ | sed -i 's|#include "/opt/piratebox/conf/lighttpd/fastcgi-php.conf"|include "/opt/piratebox/conf/lighttpd/fastcgi-php.conf"|g' /opt/piratebox/conf/lighttpd/lighttpd.conf | ||
+ | |||
+ | sed -i 's|doc_root =|;doc_root =|g' /etc/php.ini | ||
+ | |||
+ | echo "<?php phpinfo() ?>" > /opt/piratebox/share/content/phpinfo.php | ||
+ | |||
+ | /etc/init.d/piratebox reload | ||
+ | </code> | ||
+ | * test | ||
+ | http://piratebox.lan/content/phpinfo.php you should get a long php info page of stuff. | ||
+ | If it works, you can delete the phpinfo page with this command. | ||
+ | <code> | ||
+ | rm /opt/piratebox/share/content/phpinfo.php | ||
+ | </code> | ||
+ | === 6.2 Enable IRC === | ||
* Copy and past each line | * Copy and past each line | ||
<code> | <code> | ||
Line 172: | Line 200: | ||
/etc/init.d/piratebox restart | /etc/init.d/piratebox restart | ||
</code> | </code> | ||
- | === 6.2 Change Upload Folder === | + | === 6.3 Change Upload Folder === |
<code> | <code> | ||
mkdir -p /opt/piratebox/share/Shared/Uploaded | mkdir -p /opt/piratebox/share/Shared/Uploaded | ||
Line 178: | Line 206: | ||
/etc/init.d/piratebox restart | /etc/init.d/piratebox restart | ||
</code> | </code> | ||
+ | |||
+ | ==== 7. Fixes ==== | ||
+ | * MiniDLNA | ||
+ | Minidlna config points to the wrong path. So we need to fix it | ||
+ | <code> | ||
+ | vi /etc/config/minidlna | ||
+ | </code> | ||
+ | Press **I** on the keyboard to get into edit mode\\ | ||
+ | change the line that reads **list media_dir '/mnt/usb/PirateBox/Shared/'**\\ | ||
+ | to **list media_dir '/opt/piratebox/share/Shared/'**\\ | ||
+ | Press SHIFT+Z, SHIFT+Z on the keyboard to save. | ||
+ | <code> | ||
+ | /etc/init.d/minidlna reload | ||
+ | </code> | ||
+ | to save changes | ||
==== Credits ==== | ==== Credits ==== | ||
* Matthias - for the Piratebox Project and updated code. | * Matthias - for the Piratebox Project and updated code. |