<?xml version="1.0" encoding="utf-8" standalone="yes"?><rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Raspbian on Philly Mesh</title><link>https://prm.boda.dev/tags/raspbian/</link><description>Philly Mesh (Raspbian)</description><generator>Hugo -- gohugo.io</generator><language>en-us</language><lastBuildDate>Mon, 08 Feb 2016 22:17:03 +0000</lastBuildDate><atom:link href="https://prm.boda.dev/tags/raspbian/index.xml" rel="self" type="application/rss+xml"/><item><title>Running cjdns on Raspbian Jessie</title><link>https://prm.boda.dev/2016/02/08/running-cjdns-on-raspbian-jessie/</link><pubDate>Mon, 08 Feb 2016 22:17:03 +0000</pubDate><author>Mike Dank (Famicoman)</author><guid>https://prm.boda.dev/2016/02/08/running-cjdns-on-raspbian-jessie/</guid><description>&lt;p>If you’re like me, you have a few &lt;a href="https://www.raspberrypi.org/">Raspberry Pis&lt;/a> kicking around, waiting for a job to do. I adopted early and purchased (at least one) original Model B with 256MB of RAM. This was a nifty little box four years ago, but has since been overshadowed by its older brother, the revised Model B with 512MB of RAM, and its cousins: the B+ and RPi 2. These originals still have life left in them, and can often be found below the original $35 price tag. When it comes to running cjdns, they do a fantastic job!&lt;/p>
&lt;p>This post assumes you have a Raspberry Pi, power adapter, sd card, and enough smarts to hook the Pi up to your network and feed it a Raspbian image. This should work for any Model B Raspberry Pi, from the original up to the Raspberry Pi 2.&lt;/p>
&lt;h2 id="installation" >Installation
&lt;span>
&lt;a href="#installation" title="Direct Link to Installation">
&lt;svg viewBox="0 0 28 23" height="100%" width="19" alt="" xmlns="http://www.w3.org/2000/svg">&lt;path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" fill="none" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2"/>&lt;path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" fill="none" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2"/>&lt;/svg>
&lt;/a>
&lt;/span>
&lt;/h2>
&lt;p>The Hyperboria documentation offers &lt;a href="https://docs.meshwith.me/install/debian-jessie.html">a guide on installing for Debian Jessie&lt;/a>, but it fails on the Raspberry Pi out of the box. Prior to this, I was running Raspbian Wheezy with few issues in relation to cjdns, but other work I wanted to do had me yearning for a more up-to-date distribution. I grabbed Raspbian Jessie from &lt;a href="https://www.raspberrypi.org/downloads/raspbian/">the official download site&lt;/a> (Release date 2015-11-21), loaded it onto my SD card, and booted up.&lt;/p>
&lt;p>On an original Raspberry Pi, this process takes a while. At this point, start yourself a pot of coffee and then log on to your pi using the default username and password, &lt;strong>pi/raspberry&lt;/strong>. I run headless, so everything will be done from the console over ssh, but that shouldn’t matter too much.&lt;/p>
&lt;p>We are going to install cjdns as a service, so let’s change over into root to make this a little more comfortable.&lt;/p>
&lt;pre tabindex="0">&lt;code>su -
&lt;/code>&lt;/pre>&lt;p>If you have a fresh installation, be sure to run config and expand to fit the full size of your SD card, overclock if you want, and restart the pi when done. After restarting, log in again and change back to root.&lt;/p>
&lt;pre tabindex="0">&lt;code>raspi-config
&lt;/code>&lt;/pre>&lt;p>I also cannot express how important it is to change the default user and root passwords.&lt;/p>
&lt;pre tabindex="0">&lt;code>passwd pi
passwd root
&lt;/code>&lt;/pre>&lt;p>Now, we want to update, upgrade, and install some dependencies.&lt;/p>
&lt;pre tabindex="0">&lt;code>apt-get update
apt-get upgrade
apt-get install nodejs build-essential git
&lt;/code>&lt;/pre>&lt;p>Somewhere during these commands, your coffee should have finished. Go pour a cup and come back to watch the console until everything is tidied up.&lt;/p>
&lt;p>Afterwards, we are going to start building cjdns by pulling down the latest code and building.&lt;/p>
&lt;pre tabindex="0">&lt;code>cd /opt
git clone https://github.com/cjdelisle/cjdns.git
cd cjdns
NO_TEST=1 Seccomp_NO=1 ./do
&lt;/code>&lt;/pre>&lt;p>Pay close attention to this last line. We need to execute ./do in this fashion because of &lt;a href="https://github.com/hyperboria/cjdns/issues/6#issuecomment-162244016">a current issue with the kernel on Raspbian Jessie&lt;/a>.&lt;/p>
&lt;p>After a little wait, the build should finish successfully. Now we want to configure cjdns to run as a daemon, so let’s create a link to the binary, generate a configuration file, and copy over the service file.&lt;/p>
&lt;pre tabindex="0">&lt;code>ln -s /opt/cjdns/cjdroute /usr/bin
(umask 077 &amp;amp;&amp;amp; ./cjdroute --genconf &amp;amp;gt; /etc/cjdroute.conf)
cp contrib/systemd/cjdns.service /etc/systemd/system/
&lt;/code>&lt;/pre>&lt;p>All that’s left is to enable the service and start it up. Afterwards, it should start on every boot-up automatically.&lt;/p>
&lt;pre tabindex="0">&lt;code>systemctl enable cjdns
systemctl start cjdns
&lt;/code>&lt;/pre>&lt;p>If you want to edit your cjdroute.conf for adding peers or… well… anything else, simply edit the file in &lt;strong>/etc/cjdroute.conf&lt;/strong> and restart the service.&lt;/p>
&lt;pre tabindex="0">&lt;code>nano /etc/cjdroute.conf
systemctl restart cjdns
&lt;/code>&lt;/pre>&lt;p>At any point, you can check the status of the service:&lt;/p>
&lt;pre tabindex="0">&lt;code>systemctl
&lt;/code>&lt;/pre>&lt;p>In the output, you should see the following:&lt;/p>
&lt;pre tabindex="0">&lt;code>cjdns.service loaded active running cjdns: routing engine designed for sec...
&lt;/code>&lt;/pre>&lt;h2 id="troubleshooting--debugging" >Troubleshooting &amp;amp; Debugging
&lt;span>
&lt;a href="#troubleshooting--debugging" title="Direct Link to Troubleshooting &amp;amp; Debugging">
&lt;svg viewBox="0 0 28 23" height="100%" width="19" alt="" xmlns="http://www.w3.org/2000/svg">&lt;path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" fill="none" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2"/>&lt;path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" fill="none" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2"/>&lt;/svg>
&lt;/a>
&lt;/span>
&lt;/h2>
&lt;p>If at any point you want to check the output generated by starting cjdns, stop the service and run &lt;strong>cjdroute&lt;/strong> manually.&lt;/p>
&lt;pre tabindex="0">&lt;code>systemctl stop cjdns
/opt/cjdns/cjdroute &amp;lt; /etc/cjdroute.conf
&lt;/code>&lt;/pre>&lt;p>Occasionally, you may get a &lt;em>Configurator&lt;/em> error like this below:&lt;/p>
&lt;pre tabindex="0">&lt;code>1454470218 CRITICAL Configurator.c:97 Failed to make function call [Timed out waiting for a response], error: [UDPInterface_beginConnection]
&lt;/code>&lt;/pre>&lt;p>If this happens, run the following before starting cjdroute again to ensure that the ipv6 kernel module is loaded:&lt;/p>
&lt;pre tabindex="0">&lt;code>modprobe ipv6
&lt;/code>&lt;/pre>&lt;h1 id="conclusion" >Conclusion**
&lt;span>
&lt;a href="#conclusion" title="Direct Link to Conclusion**">
&lt;svg viewBox="0 0 28 23" height="100%" width="19" alt="" xmlns="http://www.w3.org/2000/svg">&lt;path d="M10 13a5 5 0 0 0 7.54.54l3-3a5 5 0 0 0-7.07-7.07l-1.72 1.71" fill="none" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2"/>&lt;path d="M14 11a5 5 0 0 0-7.54-.54l-3 3a5 5 0 0 0 7.07 7.07l1.71-1.71" fill="none" stroke-linecap="round" stroke-miterlimit="10" stroke-width="2"/>&lt;/svg>
&lt;/a>
&lt;/span>
&lt;/h1>
&lt;p>That&amp;rsquo;s all it takes, you now have a node capable of connecting to Hyperboria! Now, all you need to do is find some peers, add them to your configuration file, and join the network!&lt;/p></description></item></channel></rss>