tag:blogger.com,1999:blog-8864439000639267822024-03-13T16:30:49.561+00:00UbuntuHakCool stuff done with or under Ubntu linux including, but not limited to shell scripting, development and improvement of various projects, internet tips & tricks, online privacy, encryption techniques and much more! Purely educational.Unknownnoreply@blogger.comBlogger82125tag:blogger.com,1999:blog-886443900063926782.post-68800746086355335872020-12-26T15:20:00.002+00:002020-12-26T15:20:40.867+00:00E-Mail notifications in FreeNAS using Gmail<p style="text-align: justify;">Setting up email alerts is a smart way of making sure nothing unexpected happens on a FreeNAS server without knowing about it or having to check the UI every now and then. A "should be straigthforward" way ough to be setting up a gmal account as the outgoing email. Nevertheless, it is not as simple as clicking "yeah, sure, email me".</p><h2 style="text-align: justify;">Objective</h2><p style="text-align: justify;">Get a working E-Mail notification from FreeNAS by using a Gmail E-Mail address for sending the messages.<br /></p><h2 style="text-align: justify;">Overview</h2><p style="text-align: justify;">FreeNAS needs an smtp server and corresponding E-Mail account credentials to send E-Mails. E-Mails cannot be sent directly from within FreeNAS without an
E-Mail server. Additionally, using a Gmail address with the corresponding account password does not work either. The steps to get such a setup running are briefly as follows,</p><ol style="text-align: left;"><li>Get a Gmail E-Mail address,</li><li>Allow "App password" access to the E-Mail account, and<br /></li><li>Set up FreeNAS E-Mail service.<br /></li></ol><h2 style="text-align: justify;">Settings in the Google account</h2><p style="text-align: justify;">This is the first step in configuring sending E-Mails through a gmail account. Basically, a new App passsword is required for FreeNAS. Connecting and sending emails via the username and password merely did not work in my case, not even when enabling "Allow less secureapps". So to properly set up access the following needs to be done,</p><ol style="text-align: left;"><li><b>Log in</b> to the Google account.</li><li>Go to <b>Security</b>.<br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH9NwjFd_XqvttKI1eTEq6Q7LJaB9_EpR10zoHb6Du-xsbaUKqTpyZ2fZvFcRk3OPKIhQ05XNiEpATMgWU6ZJ_jJi85wz1q7h0XobJEu5p_Pp1dgLOrS3jEJkjzwSMDnUjdDgoLWOz-xU/s421/Security+tab.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Google account securities tab" border="0" data-original-height="421" data-original-width="310" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH9NwjFd_XqvttKI1eTEq6Q7LJaB9_EpR10zoHb6Du-xsbaUKqTpyZ2fZvFcRk3OPKIhQ05XNiEpATMgWU6ZJ_jJi85wz1q7h0XobJEu5p_Pp1dgLOrS3jEJkjzwSMDnUjdDgoLWOz-xU/w236-h320/Security+tab.PNG" title="Google account securities tab" width="236" /></a></div><br /></li><li><b>Enable 2 Factor Authentication</b> (this is required for step 4!). <br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSp1RXRNBtRtzepmKWZCrrXF_WFm1agI5a_P1-LgdD2Z3qvQqmQ7MSwF3DjyQGct5HClcJ9x9FscYZajZFxpFXMMRAsCrZWVEp7fcqsEtiVuBuvZVwS-1WoKDja8HeqiP2SxXBLdcM4X8/s972/2FA.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Enable two-step verification in the securities tab." border="0" data-original-height="496" data-original-width="972" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSp1RXRNBtRtzepmKWZCrrXF_WFm1agI5a_P1-LgdD2Z3qvQqmQ7MSwF3DjyQGct5HClcJ9x9FscYZajZFxpFXMMRAsCrZWVEp7fcqsEtiVuBuvZVwS-1WoKDja8HeqiP2SxXBLdcM4X8/w320-h163/2FA.png" title="Enable two-step verification." width="320" /></a></div><br /></li><li>Once 2 Factor Authentication is enabled, an option becomes avilable to <b>create App passwords</b>.<br /><br /><div style="text-align: center;"><img alt="App passwords option becomes available afect enabling 2FA" border="0" data-original-height="327" data-original-width="853" height="123" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjHJ7o0xECWt0gLhp8rcZmb3iW6Ax1tRSFF-1RLWEuOnNZqI6VRGoHkEOMxvDsUH2E10spjUe0V9eBsWEGWDc11ZE_Ihkw5cT3wTqzJIezsGqRXJGLdkYRFLWyQ2u8mFqCWzKv6QPn6o4M/w320-h123/App_passwd1b.PNG" title="App passwords option" width="320" /></div></li><li><b>Create a new App password</b> and copy it to the clipboard.<div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxm16icWDGhc-lp6wPjufYRtVwPgYtL97YVvbzqHOuN6YJQ9KHwIHMHJPmwUyYYLeUQXUvaDzNQJsh0DrsZtGhX6afdXl5x9Ln31ESqSQE8KLoTXbzBp2OEtzYIkyINYKVJ_qqpXH7aqo/s720/App_passwd2b.PNG" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Generate a new App password for FreeNAS and copy it to the clipboard." border="0" data-original-height="522" data-original-width="720" height="232" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhxm16icWDGhc-lp6wPjufYRtVwPgYtL97YVvbzqHOuN6YJQ9KHwIHMHJPmwUyYYLeUQXUvaDzNQJsh0DrsZtGhX6afdXl5x9Ln31ESqSQE8KLoTXbzBp2OEtzYIkyINYKVJ_qqpXH7aqo/w320-h232/App_passwd2b.PNG" title="Option to generate a new App password." width="320" /></a></div></li></ol><p>Once this is done, the settings from Gmail side are complete. <br /></p><p style="text-align: justify;"></p><h2 style="text-align: justify;">Settings in FreeNAS</h2><ol style="text-align: left;"><li>Go to <b>System/Email</b> and adjust the settings according to the details below. <br /><br /><div class="separator" style="clear: both; text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNLC8y2qf-evCufqdWJnxMc4PxJNOLs5kBuYKqgyq4PAv31oLg0DcE8GhWME4jFGXVRTk1HHZwUXwsNnvd6n1f1-kRUA7UjKXSXiwuarowzoHRVjeaWAD5et3NmuQNTJPLXUVOTfvaBvQ/s972/FreeNAS+email+settings.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="FreeNAS System/Email settings showing the fields to make it work with Gmail" border="0" data-original-height="496" data-original-width="972" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiNLC8y2qf-evCufqdWJnxMc4PxJNOLs5kBuYKqgyq4PAv31oLg0DcE8GhWME4jFGXVRTk1HHZwUXwsNnvd6n1f1-kRUA7UjKXSXiwuarowzoHRVjeaWAD5et3NmuQNTJPLXUVOTfvaBvQ/w320-h163/FreeNAS+email+settings.png" title="FreeNAS Email settings with Gmail." width="320" /><br /></a></div>From E-Mail: <b>ChooseItToYourLiking</b><br />Outgoing Mail Server: <b>smtp.gmail.com</b><br />Mail Server Port: <b>465</b><br />Security: <b>SSL (Implicit TLS)</b><br />SMTP Authentication: <b>Ticked</b><br />Username: <b>example@gmail.com</b><br />Password: <b>YourAppPassword</b><br /></li></ol><p style="text-align: justify;">Once this is done, a test E-Mail can be sent by clicking "SEND EMAIL". If all above steps were followed, a test notification wil arrive in the E-Mail box associated with the root user (!). Following this, an alert service can be set up as well. Without too much details,<br /></p><ol style="text-align: left;"><li>Go to <b>System/Alert Services</b>.</li><li>Click "<b>Add</b>" and choose <b>Type/Email</b>.</li><li>Fill out your email address and click "<b>SEND TEST ALERT</b>".</li></ol><p>This should be working now as well and the type of alerts cn be configured based on user needs.<br /></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-15154240857873244472020-12-21T13:50:00.004+00:002020-12-21T13:50:57.548+00:00FreeNAS home server backups Done Right<p style="text-align: justify;">There are plenty of guides explaining how to back up FreeNAS - now TrueNAS - servers. Personally, I found them either vague in what they actually back up and what will be the final outcome or they get way too complicated for people of home NAS servers who want something that "just works". So here it is how I am periodically backing up my FreeNAS server to USB external drives.</p><div style="text-align: left;"><h2 style="text-align: left;">Expected Result</h2><div style="text-align: left;"> </div><h4 style="text-align: justify;"><span style="font-size: small;"><span style="font-weight: normal;"></span></span></h4><div style="text-align: justify;">Inspect the following example layout of a <i>Source_Pool</i> and an empty <i>Destination_Pool</i>. I will adhere to this naming in the rest of the post. Also, make sure you understand every command before following the steps. Working with root access is always risky and data can be lost, previous backups mistakenly overwritten.<br /></div><h4 style="text-align: justify;"></h4><div><br /></div></div><div><b>Source_Pool</b><span> <span> </span><span style="color: red;">==>This is the main pool we want to backup.</span></span></div><div><span><span> ---</span></span>Dataset1<span><span> <span> </span></span></span><span style="color: red;">==> This is a dataset <i>within </i>the pool.</span><br /></div><div><span> ---</span>Dataset2</div><div><span> </span><span> </span>---Sub-dataset<br /></div><div><span> </span>---Dataset3<br /></div><p style="text-align: justify;"><b>Destination_Pool</b><span> </span><span style="color: #2b00fe;"><span> ==>This is the destination pool we want to backup TO.</span></span><br /><span> </span>---Backup_Source_Pool<span> </span><span> </span><span style="color: #2b00fe;">==> This is the top-level dataset that will be created of the source pool.</span><br /><span> </span><span> </span>---Dataset1<br /><span> </span><span> </span>---Dataset2<br /><span> </span><span> </span><span> </span>---Sub-dataset<br /><span><span> </span><span> </span></span><span></span>---Dataset3</p><p style="text-align: justify;">Note how the original datasets of the <i>Source_Pool</i> all appear under <i>Destination_Pool/Backup_Source_Pool</i>. This means that another pool (say <i>Source_Pool#2</i>, not shown in the example above) may also be backed up to the <i>Destination_Pool</i>, e.g. to a dataset called <i>Destination_Pool/Backup_Source_Pool#2</i>. This would then also contain the full dataset and child dataset layout of this <i>Source_Pool#2</i>. Provided that the <i>Destination_Pool</i> has enough capacity, several pool dataset may be backed up to for example, a single USB drive.</p><h2 style="text-align: justify;">Considerations</h2><div style="text-align: justify;"> </div><ul style="text-align: justify;"><li>Data deliberately deleted over time from <i>Source_Pool</i> should also be deleted on the <i>Destination_Pool</i> inside the backups. I do not want to hoard data that I deleted for a good reason.</li><li>The snapshot used for backing up data must not be deleted until a newer backup was made using another, newer snapshot. In other words, always keep the latest snapshot of the system. Deleting all snapshots will require a full backup of the entire pool.</li><li>Permissions and ACLs are retained. <br /></li></ul><p>If in any doubt, check <a href="https://manpagez.com/man/8/zfs/" target="_blank"><span style="font-family: courier;">man zfs</span></a>. </p><h2 style="text-align: justify;">Overview</h2><div style="text-align: justify;">The general idea is to create an initial snapshot of the <i>Source_Pool</i> and use <span style="font-family: courier;">zfs send | zfs receive</span> to send it over to the <i>Destination_Pool</i> into an existing dataset named <i>Backup_Source_Pool</i><span>. Once the initial backup is done, future backups can be done as incremental, which</span> requires two snapshots to exist,<span>
where the backup will transfer only the changes between the two snapshots.
In simple terms this means that at the very least two snapshots must
exist on the Source_Pool to use incremental backups.</span></div><ol style="text-align: left;"><li>Identify <i>source </i>and <i>destination </i>datasets where backups should be made <i>from </i>and <i>to</i>.</li><li>Create a snapshot of the source dataset.</li><li>Send and receive dataset stream using <span style="font-family: courier;">zfs send | zfs receive</span> to <i>destination </i>pool.</li><li>For future backups, send <i>incremental </i>backups using the same method.</li></ol><div style="text-align: justify;"><h2><span>Initial Backup</span></h2><div><ol><li>Create an initial snapshot of <i>Source_Pool</i>. I prefer doing this through the UI using a recursive snapshot. (Recursive means that all Datasets within <i>Source_Pool</i><span> will also be snapshotted, otherwise only data directly in the main Dataset directory will be snapshotted!</span> Short: if you want the entire Pool, use recursive.)<br />Note: I highly recommend using and sticking to a naming style for snapshots. I am using,<br /><blockquote><span style="font-family: courier;">Source_Pool<span>@BACKUP-20200814</span></span></blockquote><span>and will adhere to this.</span></li><li><span>Create a dataset called <i>Backup_Source_Pool</i> under the <i>Destination_Pool</i>. I prefer doing this from the UI as well.<br /></span></li><li>Use <span style="font-family: courier;">ssh </span>to log in to the FreeNAS server and verify the snapshot is there,<br /><blockquote><span style="font-family: courier;">zfs list -t snapshot</span></blockquote><p>if thre are too many snapshots, search for the correct one, e.g.<br /> <span style="font-family: courier;"></span></p><blockquote><span style="font-family: courier;">zfs list -t snapshot | grep @BACKUP-20200814</span></blockquote><p></p></li><li>Assuming both <i>Source_Pool</i> and <i>Destination_Pool</i><span> are present and mounted in the system, proceed by making the initial backup. Note: this requires root access, so<br /><span style="font-family: courier;"><blockquote>sudo -i</blockquote></span></span><span><span style="font-family: courier;"><p><span style="font-family: arial;">(<span style="font-family: courier;">sudo zfs send ...</span> Does <i>not </i>work!) </span><br /></p></span></span><blockquote><span><span style="font-family: courier;">zfs send -Rv </span></span><span style="font-family: courier;">Source_Pool<span>@BACKUP-20200814 | zfs receive -Fdu </span>Destination_Pool<span>/</span>Backup_Source_Pool</span></blockquote></li></ol><div><div>A bit of explanation from <a href="https://manpagez.com/man/8/zfs/" target="_blank"><span style="font-family: courier;">man zfs</span></a>,</div><div><b>R</b> -- Generate a replication stream package, which will replicate the
specified filesystem, and all descendent file systems, up to the named
snapshot. When
received, all properties, snapshots, descendent file systems, and clones
are preserved.</div><div><b>v</b> -- Print verbose information about the stream package generated.
</div><div><b>F</b> -- Force a rollback of the filesystem to the most recent snapshot before performing the receive operation.</div><div><b>d</b> -- Use the name of the sent snapshot to determine the name of the new snapshot as described in the paragraph above. See <a href="https://manpagez.com/man/8/zfs/" target="_blank"><span style="font-family: courier;">man zfs</span></a> for more accurate info.<br /></div><div><b>u</b> -- Newly created file system is not mounted. (Translation: when inspecting from the UI, the copied dataset will be visible, however, going over ssh manually to <i>/mnt/</i><span style="font-family: courier;">Backup_Source_Pool </span>will show up empty. No need for panic, the data is there, its is merely not mounted. I usually cannot mount a single directory using <span style="font-family: courier;">zfs mount Backup_Pool</span> - due to I suspect some shares being mounted or similar - but<span style="font-family: courier;"> zfs mount -a</span> works just fine and the data "shows up".</div><div> </div><h2>Incremental Backup</h2><div> </div></div><div>This will only work if, <br /></div><ol><li>you already have an initial backup, and</li><li>you still have the snapshot of that backup (including the snapshots of all Sub-datasets if it was a recursive snapshot). </li></ol><div>Otherwise you will get an error. Unfortunately, this means that if the first Snapshot is no longer available, an incremental backup cannot be made and a new, initial backup has to be made, transferring all the data again. Otherwise, since only the change between the latest and previous snapshot is transferred, the backup speed is greatly increased.<br /></div><div><br /></div><div>Note that the following code will transfer only the differences between two Snapshots and data that was removed from <i>Source_Pool</i> will also be deleted on <i>Destination_Pool</i> during the backup. To make an incremental backup, the -i option is used followed by the old and new snapshot names after one another. </div><div><ol><li>Create a new recursive snapshot, this will be,<br /><span style="font-family: courier;">Source_Pool<span>@BACKUP-20200815</span></span></li><li>Use <span style="font-family: courier;">ssh </span>to log in to the FreeNAS server and check the Snapshots available<span style="font-family: courier;"><br /><blockquote>zfs list -t snapshot | grep Source_Pool@BACKUP</blockquote></span>Hopefully there will be<span style="font-family: courier;">,<br />Source_Pool<span>@BACKUP-2020081<span style="color: red;">4</span></span></span><span style="font-family: courier;"><br />Source_Pool<span>@BACKUP-2020081<span style="color: #2b00fe;">5</span></span></span><br /></li><li><p>Assuming both <i>Source_Pool</i> and <i>Destination_Pool</i><span> are present and mounted in the system, proceed by making the incremental backup. Note: this requires root access, so</span><br /><span></span></p><blockquote><span style="font-family: courier;">sudo -i</span></blockquote><span>(<span style="font-family: courier;">sudo zfs send</span> ... Does <i>not </i>work!)<br /></span><span><span style="font-family: courier;"></span></span><blockquote><span><span style="font-family: courier;">zfs send -Rv <span style="color: red;">-i</span> </span></span><span style="font-family: courier;">Source_Pool<span>@BACKUP-2020081<span style="color: red;">4</span> </span></span><span style="font-family: courier;"><span><span></span><span style="font-family: courier;">Source_Pool<span>@BACKUP-2020081<span style="color: #2b00fe;">5</span></span></span> | zfs receive -Fdu </span>Destination_Pool<span>/</span>Backup_Source_Pool</span></blockquote><span style="font-family: courier;"></span><p></p></li></ol></div><div></div><div>Note that here the <b>-i</b> argument is added which stands for "incremental backup", <a href="https://manpagez.com/man/8/zfs/" target="_blank"><span style="font-family: courier;">man zfs</span></a>. This requires two distinct snapshots to exists on the <span style="font-family: courier;">Source_Pool</span> and the older of the two snapshots to exist on the <span style="font-family: courier;">Destination_Pool</span>.<br /></div><div><b>i</b> -- Generate an incremental stream from <i>snapshot1</i> to <i>snapshot2</i>. The incremental source <i>snapshot1</i> can be specified as the last component of the snapshot name (for example, the part after the "@"), and it is assumed to be from the same file system as <i>snap</i><i>shot2</i>.</div><div><br /></div><div>Similarly to the initial backup, the <i>Destination_Pool</i> is unmounted when done.</div><div> </div><div><h2>Snapshot keeping strategy</h2><div>Since for the incremental backups at least two Snapshots are needed, I always keep a minimum of two recursive snapshots of my system. This is a balance between storage space and ability to create backups or roll back to previous snapshots.<br /></div><div><br /></div><div>Technically between backups one can just keep a single<i> </i>Snapshot on the <i>Source_Pool</i>. Then, when backup day arrives, make a new Snapshot, do an incremental backup between the two Snapshots - the older of which exists on the <i>Destination_Pool</i> - and thendelete again the older snapshot of the two from <i>Source_Pool</i>.<br /></div><div><br /></div><div>In other words, for incremental backups to work, a Snapshot must not be deleted until <i>another backup</i> was made since that snapshot.</div><div><br /></div></div><div><span><span></span></span></div></div></div><div style="text-align: justify;"><h2><span>Reference</span></h2><div><span> </span></div><div><span>Not really necessary perhaps, but for simplicity here are some excerpts from <a href="https://linux.die.net/man/8/zfs" target="_blank"><span style="font-family: courier;">man zfs</span></a><span style="font-family: courier;"> </span></span>relating to<span><span style="font-family: courier;"> zfs send </span></span>and <span><span style="font-family: courier;">zfs receive.</span></span><br /></div></div><div style="text-align: justify;"><dl compact="compact"><dt><b>zfs send</b> [<b>-DvRp</b>] [<b>-</b>[<b>iI</b>] <i>snapshot</i>] <i>snapshot</i>
</dt><dd>Creates a stream representation of the second <i>snapshot</i>, which is written to standard output. The output can be redirected to a file or to a different
system (for example, using <b><a href="https://linux.die.net/man/1/ssh">ssh</a></b>(1). By default, a full stream is generated.
<p><b>-D</b>
</p></dd><dd>Perform <b>dedup</b> processing on the stream. Deduplicated streams cannot be received on systems that do not support the stream deduplication
feature.
</dd><dd><b>-i</b> <i>snapshot</i>
</dd><dd>Generate an incremental stream from the first <i>snapshot</i> to the second <i>snapshot</i>. The incremental source (the first <i>snapshot</i>) can be
specified as the last component of the snapshot name (for example, the part after the <b>@</b>), and it is assumed to be from the same file system as the
second <i>snapshot</i>.
<p>If the destination is a clone, the source may be the origin snapshot, which must be fully specified (for example, <b>pool/fs@origin</b>, not just
<b>@origin</b>).
</p></dd><dd><b>-I</b> <i>snapshot</i>
</dd><dd>Generate a stream package that sends all intermediary snapshots from the first snapshot to the second snapshot. For example, <b>-I @a fs@d</b> is similar to
<b>-i @a fs@b; -i @b fs@c; -i @c fs@d</b>. The incremental source snapshot may be specified as with the <b>-i</b> option.
</dd><dd><b>-R</b>
</dd><dd>Generate a replication stream package, which will replicate the
specified filesystem, and all descendent file systems, up to the named
snapshot. When
received, all properties, snapshots, descendent file systems, and clones
are preserved.
<p>If the <b>-i</b> or <b>-I</b> flags are used in conjunction with the <b>-R</b> flag, an incremental replication stream is generated. The current values of
properties, and current snapshot and file system names are set when the stream is received. If the <b>-F</b> flag is specified when this stream is received,
snapshots and file systems that do not exist on the sending side are destroyed.
</p></dd><dd><b>-p</b>
</dd><dd>Send properties.
</dd><dd><b>-v</b>
</dd><dd>Print verbose information about the stream package generated.
</dd><dd>The format of the stream is committed. You will be able to receive your streams on future versions of <b>ZFS</b>. </dd><dd> </dd><dt><b>zfs receive</b> [<b>-vnFu</b>] <i>filesystem</i>|<i>volume</i>|<i>snapshot</i><b></b></dt><dt><b><br />
zfs receive</b> [<b>-vnFu</b>] [<b>-d</b> | <b>-e</b>] <i>filesystem</i>
</dt><dd>Creates a snapshot whose contents are as specified in the
stream provided on standard input. If a full stream is received, then a
new file system is created
as well. Streams are created using the <b>zfs send</b> subcommand, which by default creates a full stream. <b>zfs recv</b> can be used as an alias for <b>zfs
receive</b>.
<p>If an incremental stream is received, then the destination file
system must already exist, and its most recent snapshot must match the
incremental stream's
source. For <b>zvols</b>, the destination device link is destroyed and recreated, which means the <b>zvol</b> cannot be accessed during the <b>receive</b>
operation.
</p><p>When a snapshot replication package stream that is generated by using the <b>zfs send -R</b> command is received, any snapshots that do not exist on the
sending location are destroyed by using the <b>zfs destroy -d</b> command.
</p><p>The name of the snapshot (and file system, if a full stream is
received) that this subcommand creates depends on the argument type and
the <b>-d</b> or
<b>-e</b> option.
</p><p>If the argument is a snapshot name, the specified <i>snapshot</i> is created. If the argument is a file system or volume name, a snapshot with the same name
as the sent snapshot is created within the specified <i>filesystem</i> or <i>volume</i>. If the <b>-d</b> or <b>-e</b> option is specified, the snapshot name
is determined by appending the sent snapshot's name to the specified filesystem. If the <b>-d</b> option is specified, all but the pool name of the sent
snapshot path is appended (for example, <b>b/c@1</b> appended from sent snapshot <b>a/b/c@1</b>), and if the <b>-e</b> option is specified, only the tail of
the sent snapshot path is appended (for example, <b>c@1</b> appended from sent snapshot <b>a/b/c@1</b>). In the case of <b>-d</b>, any file systems needed to
replicate the path of the sent snapshot are created within the specified file system.
</p><p><b>-d</b>
</p></dd><dd>Use all but the first element of the sent snapshot path
(all but the pool name) to determine the name of the new snapshot as
described in the paragraph
above.
</dd><dd><b>-e</b>
</dd><dd>Use the last element of the sent snapshot path to determine the name of the new snapshot as described in the paragraph above.
</dd><dd><b>-u</b>
</dd><dd>File system that is associated with the received stream is not mounted.
</dd><dd><b>-v</b>
</dd><dd>Print verbose information about the stream and the time required to perform the receive operation.
</dd><dd><b>-n</b>
</dd><dd>Do not actually receive the stream. This can be useful in conjunction with the <b>-v</b> option to verify the name the receive operation would use.
</dd><dd><b>-F</b>
</dd><dd>Force a rollback of the file system to the most recent snapshot
before performing the receive operation. If receiving an incremental
replication stream (for
example, one generated by <b>zfs send -R -[iI]</b>), destroy snapshots and file systems that do not exist on the sending side.
</dd></dl></div>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-59337128064443084502020-11-08T23:03:00.000+00:002020-11-08T23:03:12.553+00:00One or more devices has experienced an unrecoverable error. An attempt was made to correct the error. Applications are unaffected.<div style="text-align: left;">This is not message I wanted to see in my FreeNAS GUI when running brand new disks, but oh well. <br /></div><div style="text-align: left;"><h2 style="text-align: left;">First scrub on July 19 2020</h2><div style="text-align: left;">I discovered the error on July 29 2020 when moving some 300 GB data to one of my mirrored
pools. After the initial panic of "what is this?!" I logged in to my
server over ssh and checked what has happened with <span style="font-family: courier;">zpool status</span>. <br /></div></div><div style="text-align: left;"><font face="courier"></font></div><blockquote style="text-align: left;"><div><font face="courier">zpoll status</font></div><div><font face="courier">pool: Tank<br />state: ONLINE<br />status: One or more devices has experienced an unrecoverable error. An<br /> attempt was made to correct the error. Applications are unaffected.<br />action: Determine if the device needs to be replaced, and clear the errors<br /> using 'zpool clear' or replace the device with 'zpool replace'.<br /> see: <a href="http://illumos.org/msg/ZFS-8000-9P">http://illumos.org/msg/ZFS-8000-9P</a><br /> <b>scan: resilvered 24.8M</b> in 0 days 00:00:01 with 0 errors on Sun Jul 19 00:00:32 2020<br />config:<br /><br /> NAME STATE READ WRITE CKSUM<br /> SafeHaven ONLINE 0 0 0<br /> mirror-0 ONLINE 0 0 0<br /> gptid/blip_disk1.eli ONLINE 0 0 <b><font color="#FF0000">3</font></b><br /> gptid/</font><font face="courier"><font face="courier">blip_disk2</font>.eli ONLINE 0 0 0<br /><br />errors: No known data errors</font></div></blockquote><div style="text-align: left;"><font face="courier"></font><br /></div><div style="text-align: left;"><br /></div><div style="text-align: justify;">Well, well, well. It seems that there were a few MB of data missmatch between the members of the mirror. As these are new disks, I am not particularly paniced for the moment, especially after reading the link above and reflecting a bit on recent events.</div><div style="text-align: justify;"> </div><div style="text-align: justify;"><h3>The likely culprit</h3></div><div style="text-align: left;"><br /></div><div style="text-align: justify;">During a maintenance/upgrade about two weeks ago one of the drives "fell out" of the pool due to a loosely attached SATA power cable and therefore my pool became "DEGRADED" (another word that one does not see with great pleasure in the GUI...). Since this pool was at the time used for the system log, as well as for my jails, the remaining one disk was still carrying out read/write operations thereby getting out of sync with the other - at the time OFFLINE - drive. In the end I managed to get the disk back in the pool, however, I imagine that the changes that happened on the first disk were not mirrored automatically upon re-ataching the second disk. That July 19 midnight seems like a scrub, which must have caught the data missmatch and fixed it.<br /></div><br /><div style="text-align: justify;">In this case it is probably not a huge issue. I cleared the error message by dismissing it in the GUI and from the terminal as well via,</div><div style="text-align: justify;"><font face="courier"><blockquote>sudo zpool clear Tank gptid/blip_disk1.eli</blockquote></font></div><div style="text-align: justify;">and will continue to monitor the situation.</div><div style="text-align: justify;"><br /></div><div style="text-align: justify;"><h2>Another scrub on Aug 9 2020</h2><p>The scrub this time also caught some things, and <span style="font-family: courier;">zpool status</span> gave the following.<br /></p></div><div style="text-align: justify;"><span style="font-family: courier;">pool: <font>Tank</font><br /> state: ONLINE<br />status: One or more devices has experienced an unrecoverable error. An<br /> attempt was made to correct the error. Applications are unaffected.<br />action: Determine if the device needs to be replaced, and clear the errors<br /> using 'zpool clear' or replace the device with 'zpool replace'.<br /> see: <a href="http://illumos.org/msg/ZFS-8000-9P">http://illumos.org/msg/ZFS-8000-9P</a><br /> <b>scan:</b> <b>scrub repaired 12K</b> in 0 days 06:29:41 with 0 errors on Sun Aug 9 06:53:43 2020<br />config:<br /><br /> NAME STATE READ WRITE CKSUM<br /> SafeHaven ONLINE 0 0 0<br /> mirror-0 ONLINE 0 0 0<br /> gptid/<font>blip_disk1</font>.eli ONLINE 0 0 <span style="color: red;">3</span><br /> gptid/<font>blip_disk2</font>.eli ONLINE 0 0 0<br /><br />errors: No known data errors</span></div><div style="text-align: justify;"><span style="font-family: courier;"> </span></div><div style="text-align: justify;">Now, during a nighly scub, another 12K was discovered and repaired. This was again on the same disk as previously and I am still wondering if this is not some leftover of the previously described issue. Perhaps something that was not caught last time? According to <a href="https://www.ixsystems.com/community/threads/yikes-scrub-repaired-172k-in-26h-with-0-errors.18147/" target="_blank">Yikues, scrub repaired 172K</a> it could be anything or nothing since I am running server-grade hardware with ECC memory. Either way, out of precaution I am doing the following:</div><ul style="text-align: left;"><li>create a snapshot,</li><li>refresh my backup, </li><li>schedule a long SMART test and</li><li>(if time allows) run a memtest.</li></ul><p style="text-align: justify;"><u><b>Note:</b></u> I know that some just love recommending running a memtest. However, looking at the issue, statistically, it is extremely unlikely that it is a memory issue as proper memory - which server-grade memory is - should pass qality checks after manufacturing and they really rarely go bad.<br /></p><p style="text-align: left;">If the SMART tests will be passed, I will call it a day and keep observing the system. If the SMART test throws back some errors or if the error happens another time on the same drive, I will contact the retailer as the drive is well withing garantee.</p><h3 style="text-align: left;">Drive S.M.A.R.T. status </h3><p style="text-align: left;">Checking the drive SMART status with</p><p style="text-align: left;"></p><blockquote style="text-align: left;"> <span style="font-family: courier;">sudo smartctl -a /dev/ada1</span> </blockquote>revealed no apparent errors with the disk. SMART tests previously all completed without errors.<br /><p style="text-align: left;"></p><p style="text-align: left;"><span style="font-family: courier;">SMART Self-test log structure revision number 1<br />Num Test_Description Status Remaining LifeTime(hours) LBA_of_first_error<br /># 1 Short offline Completed without error 00% 1404 -<br /># 2 Extended offline Completed without error 00% 1329 -<br /># 3 Short offline Completed without error 00% 1164 -<br /># 4 Short offline Completed without error 00% 996 -<br /># 5 Short offline Completed without error 00% 832 -<br /># 6 Short offline Completed without error 00% 664 -<br /># 7 Short offline Completed without error 00% 433 -<br /># 8 Short offline Completed without error 00% 265 -<br /># 9 Extended offline Completed without error 00% 190 -<br />#10 Extended offline Completed without error 00% 18 -<br />#11 Short offline Completed without error 00% 0 -</span></p><p style="text-align: left;"><span style="font-family: courier;"></span></p><h3 style="text-align: left;">Memtest</h3><div style="text-align: left;">Came back clean. I am not particularly surprised here.<br /></div><h2 style="text-align: left;">Status on 08 November 2020</h2><div style="text-align: justify;">A few months have passed since I started writing this post. In the meanwhile I was monitoring the situation and did not discover any further issues. The pool is running fine and no further scrubs reported any errors. I am therefore concluding that the issue was caused most likely by the above malfunction and has nothing to do with the drive itself.<br /></div><p style="text-align: left;"><br /></p>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-60011990892661737522020-07-24T23:30:00.000+01:002020-07-24T23:30:43.899+01:00Syncthing jail on FreeNAS: "RuntimeError: mount_nullfs:"<br />
<h3>
Reason</h3>
<div style="text-align: justify;">
This error arises when one tries to first stop a jail, add new mount point and then try to start the jail back up. This then presents an error message and the jail will not start up. I presume in my FreeNAS-11.2-U8 the underlying issue is that adding a new mount point does not automatically create the destination directory, hence the error message.</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjrZP77MQXgZclhEASwGYKAHsEFhb3wWildrc7v-Vkve0kPoaqirJHkoP2XZY5zOXGLTOm0_1BS20_Y50V3oYbKdh0DTccIHWCEtOrN_DEy4M8sQWrMyufebERpqN_QuEqR4ZVhsijBkE/s1600/Jail_runtime_error.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="240" data-original-width="602" height="127" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgjrZP77MQXgZclhEASwGYKAHsEFhb3wWildrc7v-Vkve0kPoaqirJHkoP2XZY5zOXGLTOm0_1BS20_Y50V3oYbKdh0DTccIHWCEtOrN_DEy4M8sQWrMyufebERpqN_QuEqR4ZVhsijBkE/s320/Jail_runtime_error.PNG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Runtime error message when trying to start up the jail upon folloing incorrect steps to set up a new Syncthing sahre.</td></tr>
</tbody></table>
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;">Error: Traceback (most recent call last):</span><br /><span style="font-family: "Courier New", Courier, monospace;"> File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 166, in call_method</span><br /><span style="font-family: "Courier New", Courier, monospace;"> result = await self.middleware.call_method(self, message)</span><br /><span style="font-family: "Courier New", Courier, monospace;"> File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1093, in call_method</span><br /><span style="font-family: "Courier New", Courier, monospace;"> return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)</span><br /><span style="font-family: "Courier New", Courier, monospace;"> File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1037, in _call</span><br /><span style="font-family: "Courier New", Courier, monospace;"> return await self._call_worker(name, *args)</span><br /><span style="font-family: "Courier New", Courier, monospace;"> File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1058, in _call_worker</span><br /><span style="font-family: "Courier New", Courier, monospace;"> return await self.run_in_proc(main_worker, name, args, job)</span><br /><span style="font-family: "Courier New", Courier, monospace;"> File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 990, in run_in_proc</span><br /><span style="font-family: "Courier New", Courier, monospace;"> return await async_run_in_executor(loop, executor, method, *args, **kwargs)</span><br /><span style="font-family: "Courier New", Courier, monospace;"> File "/usr/local/lib/python3.6/site-packages/middlewared/utils/asyncio_.py", line 41, in async_run_in_executor</span><br /><span style="font-family: "Courier New", Courier, monospace;"> raise result</span><br /><span style="font-family: "Courier New", Courier, monospace;">RuntimeError: mount_nullfs: /mnt/POOL/iocage/jails/Syncthing/root/media/Sync: Resource deadlock avoided</span><br /><span style="font-family: "Courier New", Courier, monospace;">jail: /sbin/mount -t nullfs -o rw /mnt/POOL/Syncthing /mnt/POOL/iocage/jails/Syncthing/root/media/Sync: failed</span></blockquote>
<br />
<h3>
Solution</h3>
<div style="text-align: justify;">
It follows then that the correct way to add a new share to Syncthing in an iocage jail is to first create the directory inside the jail itself where the dataset will be mounted to. This is the crucial step. On my system, by default, this was somewhere in </div>
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;">/mnt/POOL/iocage/jail/Syncthing/root/media/Sync/SHARE-NAME</span></blockquote>
<div style="text-align: justify;">
however, this may vary for you. So log in via ssh to you FreeNAS server, <span style="font-family: "Courier New", Courier, monospace;">cd </span>to the Syncthing jail and <span style="font-family: "Courier New", Courier, monospace;">mkdir </span>a new directory. After this, the jail can be stopped and a new moint point added where the <i>source </i>is the storage pool and the <i>destination </i>is the previously created new directory. Starting the jail afterwards will work just fine and the rest can be done from the Syncthing GUI.</div>
<br />
If the above issue is already present, remove the "falsely added" mount point in the FreeNAS GUI and start again.Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-78376100291234186032018-06-14T12:32:00.000+01:002018-06-14T12:32:07.345+01:00Screen tearing in Ubuntu with xfce4 using intel HD4000 graphics<div style="text-align: justify;">
Recently I switched back from Unity desktop environment to xfce4 and I noticed a screen tearing when watching movies and even slightly when scrolling through websites. Needless to say, it is quite annoying and it should not be happening.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
My laptop has a decent Intel core i5 CPU with Intel HD4000 graphics, which should be more than capable of playing back movies perfectly, let alone dispay websites. Hence the newly discovered screen tearing must be a side-effect of switching to xfce4. Initially I thought it was caused by some new driver that got installed or rather replaced during the switch, but there were no signs.</div>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">lspci | grep VGA</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">00:02.0 VGA compatible controller: Intel Corporation 3rd Gen Core processor Graphics Controller (rev 09)</span></div>
</blockquote>
<div style="text-align: justify;">
</div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">dpkg -l | grep intel</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">ii xserver-xorg-video-intel 2:2.99.917+git20160325-1ubuntu1.2 amd64 X.Org X server -- Intel i8xx, i9xx display driver</span></div>
</blockquote>
<div style="text-align: justify;">
<br /></div>
<h2 style="text-align: justify;">
Solution</h2>
<div style="text-align: justify;">
After scouring the internet for possible causes such as malconfigured xorg config or wrong drivers and trying to fix these, I saw vertical sync mentioned somewhere and enabling it might help. In xfce4 this feature is found in <i>Settings/Window Manager Tweaks/Compositor/Synchronize drawing to the vertical blank</i>, see in the screenshot below.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRMd99cEpfiNLqEIwsY5s8yEPJOlr2oQKrKXTWvSacup8tCEm5547Qckfh8cTs_E0SwO6GYQOGVNWpPcL4PAsKDmdbUb6XQh8URWZjqe30VzKklYtr_XAVXGw9vUGHUesu-ehxQDqop9s/s1600/Screenshot+from+2018-05-27+11-23-24.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Synchronize drawing to the vertical sync" border="0" data-original-height="643" data-original-width="634" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgRMd99cEpfiNLqEIwsY5s8yEPJOlr2oQKrKXTWvSacup8tCEm5547Qckfh8cTs_E0SwO6GYQOGVNWpPcL4PAsKDmdbUb6XQh8URWZjqe30VzKklYtr_XAVXGw9vUGHUesu-ehxQDqop9s/s320/Screenshot+from+2018-05-27+11-23-24.png" title="Vertical sync" width="315" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Window manager Tweaks</td></tr>
</tbody></table>
Make sure to tick the selected "Synchronize drawing to the vertical blank" tickbox and the tearing should be gone.</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-52604545722510705302018-06-12T20:09:00.002+01:002018-06-12T20:09:51.488+01:00Set date and time in raspbian<h2>
Problem </h2>
My new installation of raspbian stretch had its time off. The easiest way of setting this right I found was using <span style="font-family: "Courier New", Courier, monospace;">timedatectl</span>.<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;">timedatectl<br /> Local time: Tue 2018-06-12 18:27:41 UTC<br /> Universal time: Tue 2018-06-12 18:27:41 UTC<br /> RTC time: n/a<br /> Time zone: Etc/UTC (UTC, +0000)</span><br />
<span style="font-family: "Courier New", Courier, monospace;">Network time on: yes<br />NTP synchronized: yes</span><br />
<span style="font-family: "Courier New", Courier, monospace;">RTC in local TZ: no</span></blockquote>
<br />
The date was correct but the actual time was off. Checking the output of <span style="font-family: "Courier New", Courier, monospace;">timedatectl</span>, the time zone was here off, so that was the obvious problem.<br />
<br />
<h2>
Solution</h2>
Checking the help of <span style="font-family: "Courier New", Courier, monospace;">timedatectl </span>quickly led to a resolution.<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;">timedatectl -h<br />timedatectl [OPTIONS...] COMMAND ...<br /><br />Query or change system time and date settings.<br /><br /> -h --help Show this help message<br /> --version Show package version<br /> --no-pager Do not pipe output into a pager<br /> --no-ask-password Do not prompt for password<br /> -H --host=[USER@]HOST Operate on remote host<br /> -M --machine=CONTAINER Operate on local container<br /> --adjust-system-clock Adjust system clock when changing local RTC mode<br /><br />Commands:<br /> status Show current time settings<br /> set-time TIME Set system time<br /> set-timezone ZONE Set system time zone<br /> list-timezones Show known time zones<br /> set-local-rtc BOOL Control whether RTC is in local time<br /> set-ntp BOOL Enable or disable network time synchronization</span></blockquote>
<br />
<ol>
<li>List the available timezones that can be set with,<br /><span style="font-family: "Courier New", Courier, monospace;">timedatectl list-timezones</span><br />and scroll through the list to find the correct one.</li>
<li>Set your current timezone with,<br />t<span style="font-family: "Courier New", Courier, monospace;">imedatectl set-timezone Zone/City</span></li>
</ol>
No reboot is required, changes take effect right away. Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-614329966937250182018-05-10T21:58:00.000+01:002018-06-12T21:19:24.485+01:00Install Gridcoinresearch wallet on the Raspberry Pi 3B<div style="text-align: justify;">
I previously wrote about <a href="http://ubuntuhak.blogspot.nl/2015/11/gridcoin-headless-wallet-on-ubuntu-vps.html" target="_blank">how to get Gridcoinresearch running under Ubuntu</a>. Since then, the project has advanced and in most cases you can simply install the wallet from a PPA.</div>
<div>
<div style="text-align: justify;">
I came to realize that this was not the case with my Raspberyy Pi 3 B, running Rasbian stretch. When trying to add a PPA as recommended by <a href="https://code.launchpad.net/~gridcoin/+archive/ubuntu/gridcoin-stable" target="_blank">Launchpad Gridcoin-stable</a>:</div>
<blockquote class="tr_bq">
<i><b>Stable builds for ordinary users for</b> i386, amd64 and <b>armhf</b>. This PPA will lag leisure releases by up to one day to ensure stability. Mandatory upgrades will be released immediately.</i></blockquote>
The following happens.<br />
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo add-apt-repository ppa:gridcoin/gridcoin-stable</span><span style="font-family: "courier new" , "courier" , monospace;">Traceback (most recent call last):</span><span style="font-family: "courier new" , "courier" , monospace;"> File "/usr/bin/add-apt-repository", line 95, in <module></span><span style="font-family: "courier new" , "courier" , monospace;"> sp = SoftwareProperties(options=options)</span><span style="font-family: "courier new" , "courier" , monospace;"> File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 109, in __init__</span><span style="font-family: "courier new" , "courier" , monospace;"> self.reload_sourceslist()</span><span style="font-family: "courier new" , "courier" , monospace;"> File "/usr/lib/python3/dist-packages/softwareproperties/SoftwareProperties.py", line 599, in reload_sourceslist</span><span style="font-family: "courier new" , "courier" , monospace;"> self.distro.get_sources(self.sourceslist)</span><span style="font-family: "courier new" , "courier" , monospace;"> File "/usr/lib/python3/dist-packages/aptsources/distro.py", line 89, in get_sources</span><span style="font-family: "courier new" , "courier" , monospace;"> (self.id, self.codename))</span><span style="font-family: "courier new" , "courier" , monospace;">aptsources.distro.NoDistroTemplateException: <b>Error: could not find a distribution template for Raspbian/stretch</b></span></blockquote>
<span style="font-family: "courier new" , "courier" , monospace;"><b><br />
</b></span> Hence, lets compile from source.<br />
<br />
<h2>
<span style="color: red;">Update 12/06/2018</span></h2>
<div style="text-align: justify;">
The latest release of Gridcoin switched to using <a href="https://www.gnu.org/software/autogen/" target="_blank">autogen </a>instead of the old <span style="font-family: "Courier New", Courier, monospace;">make -f makefile</span> process. The install and update process is less tedious this was, but it takes quite long on a Raspberry Pi 3B. The general method for building and installing it is,</div>
./autogen.sh </div>
<div>
./configure</div>
<div>
make</div>
<div>
make install</div>
<div>
</div>
<div>
However, to succeed on Raspbian, some packages need to be installed first. Proceed as follows.</div>
<div>
</div>
<div>
<h3>
1. </h3>
</div>
<div>
BerkleyDB4.8 needs to be installed, exactly! So basically what is available from apt (libdb5.x) is not good. I found a good resource for installing this from source at <a href="https://askubuntu.com/questions/393289/how-to-install-libdb4-8-dev-or-equivalent-on-13-10" target="_blank">askubuntu.com</a>. Below is the solution that worked on my Raspberry Pi.</div>
<div>
<div class="answercell post-layout--right">
<div class="post-text" itemprop="text">
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;">wget 'http://download.oracle.com/berkeley-db/db-4.8.30.NC.tar.gz'</span><span style="font-family: "Courier New", Courier, monospace;">tar -xzvf db-4.8.30.NC.tar.gz </span><span style="font-family: "Courier New", Courier, monospace;"><br />cd db-4.8.30.NC/build_unix/</span><span style="font-family: "Courier New", Courier, monospace;"><br />../dist/configure --enable-cxx</span><span style="font-family: "Courier New", Courier, monospace;"><br />make</span><div class="post-text" itemprop="text">
<span style="font-family: "Courier New", Courier, monospace;">make install </span></div>
</blockquote>
</div>
<div class="post-text" itemprop="text">
<br />
And then tell the system where to find db4.8<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;">export BDB_INCLUDE_PATH="/usr/local/BerkeleyDB.4.8/include"</span><span style="font-family: "Courier New", Courier, monospace;"><br />export BDB_LIB_PATH="/usr/local/BerkeleyDB.4.8/lib"</span><div class="post-text" itemprop="text">
<span style="font-family: "Courier New", Courier, monospace;">ln -s /usr/local/BerkeleyDB.4.8/lib/libdb-4.8.so /usr/lib/libdb-4.8.so </span></div>
</blockquote>
</div>
<h3>
2.</h3>
After this the building can begin. The first few steps are simple,</div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<div>
</div>
<blockquote class="tr_bq">
<div>
<span style="font-family: "Courier New", Courier, monospace;">sudo apt-get install autoconf </span></div>
<div>
<span style="font-family: "Courier New", Courier, monospace;">git clone https://github.com/gridcoin-community/Gridcoin-Research</span></div>
<div>
<span style="font-family: "Courier New", Courier, monospace;">cd Gridcoin-Research</span><span style="font-family: "Courier New", Courier, monospace;">./autogen.sh</span></div>
</blockquote>
<div>
When trying to run ./configure I got into trouble with BerkleyDB4.8 still not being detected or perhaps superceeded by a higher version. The solution here was to set the environment variable and link CPPFLAGS and LDFLAGS before running ./configure as,<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;">env CPPFLAGS='-I/usr/local/BerkeleyDB.4.8/include' LDFLAGS='-L/usr/local/BerkeleyDB.4.8/lib' ./configure</span></blockquote>
Finally,<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New", Courier, monospace;">make</span></blockquote>
<br />
<div style="text-align: justify;">
<u><b>Note:</b></u> As usual, you can run <span style="font-family: "Courier New", Courier, monospace;">make -j4</span> to run it on 4 threads, however I had a lot of system hungs with my Raspberry Pi at this point. Maybe the RAM ran out, I am not certain. See if it works for you, but I would recommend you set up some temporary swap as descibed below in "Setting up additional Swap".</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: center;">
--- UPDATE END ---</div>
</div>
<div>
<br />
<h3>
TL;DR</h3>
For those who understand commands and want to get things running qucikly.<br />
<br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get install ntp git build-essential libssl-dev libdb-dev libdb++-dev libqrencode-dev libcurl4-openssl-dev libzip4 libzip-dev libboost1.62-all-dev libminiupnpc-dev<br />
sudo dd if=/dev/zero of=/mnt/2GB.swap bs=1024 count=2097152<br />
sudo mkswap /mnt/2GB.swap<br />
sudo swapon /mnt/2GB.swap<br />
git clone https://github.com/gridcoin/Gridcoin-Research<br />
cd ~/Gridcoin-Research/src<br />
chmod 755 leveldb/build_detect_platform <br />
make -f makefile.unix -j 2 USE_UPNP=- -e PIE=1<br />
strip gridcoinresearchd<br />
sudo cp gridcoinresearchd /usr/bin/gridcoinresearchd <br />
sudo swapoff -a</span><br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"></span></blockquote>
</div>
<h2 style="text-align: justify;">
Installation</h2>
<div style="text-align: justify;">
Although, installing the client is described on the Github page <a href="https://github.com/gridcoin/Gridcoin-master/blob/master/CompilingGridcoinOnLinux.txt" target="_blank">[1]</a> of the project and following it step-by-step will result, in most cases, in a perfect installation, for the raspberry pi it can get tricky.<br />
<br /></div>
<div style="text-align: justify;">
<h3>
Install dependencies</h3>
<div>
Nothing special here, just the dependencies. First do a </div>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get update && sudo apt-get upgrade</span></blockquote>
<div>
and then</div>
</div>
<blockquote class="tr_bq">
<span style="background-color: white;"><span style="font-family: "courier new" , "courier" , monospace; text-align: justify;">sudo apt-get install ntp git build-essential libssl-dev libdb-dev libdb++-dev libqrencode-dev </span><span style="font-family: "courier new" , "courier" , monospace; text-align: justify;">libcurl4-openssl-dev libzip4 libzip-dev libboost1.62-all-dev </span></span><span style="font-family: "courier new" , "courier" , monospace;">libminiupnpc-dev</span></blockquote>
<div>
<h3>
Setting up additional Swap</h3>
<div style="text-align: justify;">
I ran into issues with memory during compiling, especially with multiple threads. You can try to skip this step and see if it works, otherwise lets create a 2 GiB swap file. The commands take about 2-4 minutes to finish, so be patient.</div>
<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo dd if=/dev/zero of=/mnt/2GB.swap bs=1024 count=2097152</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo mkswap /mnt/2GB.swap</span> </blockquote>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo swapon /mnt/2GB.swap</span></blockquote>
<br />
This will create a 2GiB /mnt/2GB.swap file that will be used during compiling.<br />
<br /></div>
<div>
<h3>
Clone and compile gridcoinresearchd from Github</h3>
<div>
<div style="text-align: justify;">
Everything is ready to pull gridcoinresearchd from Github and proceed with building it.</div>
</div>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">git clone https://github.com/gridcoin/Gridcoin-Research</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">cd ~/Gridcoin-Research/src</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">chmod 755 leveldb/build_detect_platform </span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">make -f makefile.unix -j 2 USE_UPNP=- -e PIE=1</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">strip gridcoinresearchd</span></blockquote>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo cp gridcoinresearchd /usr/bin/gridcoinresearchd</span></blockquote>
To start gridcoinresearchd type<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">gridcoinresearchd </span></blockquote>
</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b style="text-align: start;">Note:</b><span style="text-align: start;"> The compiling (<span style="font-family: "courier new" , "courier" , monospace;">make</span>) takes a while. Be patient.</span><br />
<span style="text-align: start;"><br />
</span></div>
<div style="text-align: justify;">
<b>Tip:</b> "gridcoinresearchd" is a system command now and can be called quickly by starting to type it "grid..." and pressing [TAB]. Also, type <span style="font-family: "courier new" , "courier" , monospace;">gridcoinresearchd help</span> to get a list of available commands with the headless client. The -j 2 option tells make to use 2 CPU cores, this helps speeding up the compiling. Some general practice says that it is fine to use number of CPU x 1.5 to get a good parallel performance, however when using 4-6 threads I ran out of memory and got errors.<br />
<br />
<h3>
Turn off swap</h3>
Swap is no longer needed after compiling, so it can be turned off. This helps prolonging the SD card's lifespan by preventing writing to it too often.<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo swapoff -a</span></blockquote>
</div>
<h3 style="text-align: justify;">
</h3>
<h3 style="text-align: justify;">
</h3>
<h2 style="text-align: justify;">
Troubleshooting</h2>
<div>
<div style="text-align: justify;">
If any dependencies are missing (or, of course, something else is wrong) you will be greeted by an army of error messages. For example,</div>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">gridcoin upgrader.h:4:42: fatal error: curl/curl.h: No such file or directory #include <curl/curl.h> // for downloading</span></blockquote>
</div>
<div style="text-align: justify;">
means that there is an issue with curl. It took me a while, but it was not actually curl, but libcurl that has been missing. After installing it with <span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get install</span> <span style="background-color: white; font-family: "courier new" , "courier" , monospace;">libcurl4-openssl-dev</span>, the compiling got past this point.<br />
<br />
Or something like this<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">gridcoin compilation terminated. makefile.unix:137: recipe for target 'obj/rpcrawtransaction.o' failed make: *** [obj/rpcrawtransaction.o] Error 1</span></blockquote>
Here if I remember the issue was a missing boost library. <span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get install</span> <span style="background-color: white; font-family: "courier new" , "courier" , monospace;">libboost1.62-all-dev</span> fixed the problem in this case<span style="background-color: white; font-family: "courier new" , "courier" , monospace;">.</span><br />
<br />
Of course, these are just two examples, but the rule applies. Check the last few lines of the error message, and see what is missing. You can check whether a package is installed with <span style="font-family: "courier new" , "courier" , monospace;">dpkg -l | grep <PACKAGENAME></span>.<br />
<br />
Of course, if you get stuck somewhere you can feel free to leave a comment below.<br />
<br />
Sources<br />
<a href="https://github.com/gridcoin/Gridcoin-master/blob/master/CompilingGridcoinOnLinux.txt" target="_blank">[1]</a> - <a href="https://github.com/gridcoin/Gridcoin-master/blob/master/CompilingGridcoinOnLinux.txt" target="_blank">https://github.com/gridcoin/Gridcoin-master/blob/master/CompilingGridcoinOnLinux.txt </a> </div>
<div style="text-align: justify;">
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-84176631082191364672017-10-01T11:19:00.003+01:002020-07-24T23:34:39.791+01:00Windows Share Permissions Done Right in FreeNAS<div style="text-align: justify;">
The scenario is that you have a FreeNAS machine - for reference I am running FreeNAS-11.0-U2 - and you want to have a multi-user system where different users have different permissions to access shares over a local network. Here I will show a quick and basic setup of a new share and setting its permissions. Then I will explain two common issues that are encountered and how to resolve them:<br />
<ul>
<li>Everybody can see and read the shares over the Windows network</li>
<li>I have set up the users, added them to the proper group, but they still cannot access a Dataset</li>
</ul>
<br /></div>
To begin with, the basic steps for creating a new network share is as follows:<br />
<ol>
<li>Create and manage users and groups </li>
<li>Create and share the Datasets</li>
</ol>
<h2>
Create and Manage Users and Groups</h2>
<div style="text-align: justify;">
It is probably easier to start with this. So for example we want to have 3 users, Alice, Bob and Charlie. They should all be granted access to some common shared directories and have restricted access to some other directories.</div>
<div style="text-align: justify;">
<ol>
<li>Create a <b>Group</b> called "<b>Shared</b>". This group will be the owner of later directories (Datasets) accessible to all of the users.<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAXMAAAD/CAIAAACM3aHSAAAbXklEQVR4nO3d/1MU9+HHcf6KTifO5KOTiDEfJRg4EYIgJ0VFwAPBQ4E7BT+rKJ5BDhRBhRhsld6Qj6FNbOI3DKl8SlvaGSomiEKYj7afNJomqXhg8bs2lFiV8/Cths8P77293b3dOwjvBe7u9Zj3ZI5lb3cve/tkd1EvZPfu3RUVFeXl5WVlZaWlpSUlJVaREoAJlD8WFotl3bp1siWszl27atWqLRvk07W3euG0hasVp3Apc6fNTeFKSmSP6RwLxc8TFrJ64TT3ZC5l7sLV/H+FKe6lTCpaidLS0rKysvLy8oqKit27d1dXV4dE6XQYGBgYDEdlZSVfFhsAwLjRnpSXl/Nl2Q8AMG60J1arlS/L2wAA40Z7snXrVr4s1QAA40Z7UlRUFCLccQEAGCfak8LCQr4sZQAA40Z7snHjRr4sxeNWWFiYk5OTk5NTWFg4mukAMLm2bdtWIv3za6NRUlKybds2tWXKy7LFl40bN+bl5WVmZmZnZ3McJ/vu5s2bs7KywsLCwsLCsrKyNm/e7H2652IzXBSXDwDMvSlVUlJis9kaGhoaGhpsNltZWRn98siRIwc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m81mk8mUx0IuwNilj8Xq1avT09NlS0hJMyQnJ2dnyaePRebi8Jki4YszXQuPmTlz5syZMSmyueiE3NzMxeHumd3zz5w5MyYmxjWX+3nh4eHip7rX6JroD/Ly8kwmk9lszs/P5ziuqKiouLi4vLz8/wH/tuwgNsVyagAAAABJRU5ErkJgggA=" style="margin-left: auto; margin-right: auto;" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Creating a new group called Shared.</td></tr>
</tbody></table>
</li>
<li><b>Create the users Alice, Bob and Charlie</b> and add them to the <b>group Shared</b>.<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkaINJ63RLpFCB9GddAhT60v0odF8xQRIaZRGizI98aQ1aeODXh17XJitbC57vHgLMp3Kinw5xY21ANeUKy6_RkpOBr0CYX6as4f9nqrVezENQX16MtyIisr6Tlw-deT53yHiV2ShU_w4/s1600/AliceUser.PNG" style="margin-left: auto; margin-right: auto;"><img alt="Creating a new user and adding immediately to the Shared group" border="0" data-original-height="669" data-original-width="718" height="298" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkaINJ63RLpFCB9GddAhT60v0odF8xQRIaZRGizI98aQ1aeODXh17XJitbC57vHgLMp3Kinw5xY21ANeUKy6_RkpOBr0CYX6as4f9nqrVezENQX16MtyIisr6Tlw-deT53yHiV2ShU_w4/s320/AliceUser.PNG" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Adding the new user Alice, at the same time assigning her to the Shared group.</td></tr>
</tbody></table>
</li>
</ol>
</div>
<h2>
Create and Share the Datasets </h2>
<div style="text-align: justify;">
There are plenty of guides on this and it is not so complicated once you get the hang of it. For reference take a look at <a href="https://doc.freenas.org/9.3/freenas_sharing.html" target="_blank">doc.freenas.org</a>, <a href="https://forums.freenas.org/index.php?threads/simple-example-of-how-to-configure-share-permissions-freenas-9.35276/" target="_blank">forums.freenas.org</a> or <a href="http://tekbloq.com/2016/08/20/how-to-configure-windows-share-folder-cifssmb-service-on-freenas/" target="_blank">tekblog</a>. Here just for the sake of introduction the basic idea.</div>
<ol>
<li><b>Create a new Dataset</b> called "Common" as a <b>Windows share</b>.<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRfySCBQzKWu2jEm-7ZhJLypkWB-gC7WDfjEKV4ML4eznjhnf85mDKxOvT-Hxs0tFeuflPEAnsz0bVkk6CyXPGLgO2-FNsxdlBa3BYsf76xcdOp7MlS9EFrAQP-Y_RMdGqbvsalZYZy04/s1600/CreateNewDataset.PNG" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="455" data-original-width="557" height="261" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiRfySCBQzKWu2jEm-7ZhJLypkWB-gC7WDfjEKV4ML4eznjhnf85mDKxOvT-Hxs0tFeuflPEAnsz0bVkk6CyXPGLgO2-FNsxdlBa3BYsf76xcdOp7MlS9EFrAQP-Y_RMdGqbvsalZYZy04/s320/CreateNewDataset.PNG" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Creating a new Dataset called Common.</td></tr>
</tbody></table>
</li>
<li><b>Change the permissions</b> of the newly created Dataset and set the <b>Owner (user) as root</b> and the <b>Owner (group) the Shared</b> group.<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH7lsFv9UxWn176U2PRYwEwxLhmnMU6bVn-usaw3r3dP8kDvRstdKxdU6zJ1s22WqYqAVgKq59YZz66kgoUn6TgZ7tHjubEkk4Ctm018Mr8O-kkRTGqOzt-DyrSoZ5jfs6Tg6gZM1kW0U/s1600/ChangePermissionOfNewDataset.PNG" style="margin-left: auto; margin-right: auto;"><img border="0" data-original-height="542" data-original-width="416" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhH7lsFv9UxWn176U2PRYwEwxLhmnMU6bVn-usaw3r3dP8kDvRstdKxdU6zJ1s22WqYqAVgKq59YZz66kgoUn6TgZ7tHjubEkk4Ctm018Mr8O-kkRTGqOzt-DyrSoZ5jfs6Tg6gZM1kW0U/s320/ChangePermissionOfNewDataset.PNG" width="245" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Changing the permissions of the new Datatset.</td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
</li>
<li><b>Share the newly create Dataset. </b>This makes it available over the network.<br /><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img alt="Creating a new Windows (SMB) share" height="297" src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAdkAAAG5CAIAAABN0dkPAAAgAElEQVR4nOyd+Vsb17n4/Rfoufd+e5e09RZjFu8GhEAIhIRYJUAggUBiEQLEJsQmCYR2AQKxXN8mbnPTrE7iJG7Se93F8RLvcRIndmI36WJjsjaLG8dpkxjbmTaX7w8jjWakGYlFMJL8fp7z+JEOM+e8Z+adzxydEXhNm6YXChQoUKDQW9ZMAgAAAHQDLgYAAKAfcDEAAAD9rJkAAAAA6AZcDAAAQD/g4pWlVa1e98P7tqSmMzgCBif3B5zcH2YJ1mcLNnHz4nPyt/AKdvALkgWFyYLC7by8hCz+ugwuIyWDsXYd3YEDoeFxuVKJdP3adaUlJeyMDLrDuedISkxisTL4fAE3h7eEwucLWKyMpMQkusfhIQpcbLZYNBqt0ThkMpvNZovLNUZ3RIsg7v77169dt35z0nq2II7FTWBxt7J52zP5u7IEydw8Jq8gnV/IyRNy8oqZXMH29KzNu5j/b2MC41/+bWpq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bPHxJRfAwBAfWMymRobG/fv39/U1EREZrO5ra3NZrN1d3fvam9vb2pqam1tNZvN77z7i+bm5ubm5nfe/fnevXubAQAAsKalpcVsNre2tlosFpvN5nA4enp6dnV2dh44cMBms3V0dPzK9F57e7vFYvml6Tf79u2zWCwWi6UdAAAAC5REtVqtHR0dNputq6uru7u7p6fn0KFD/wfcgvQ0sr6dfAAAAABJRU5ErkJgggA=" style="margin-left: auto; margin-right: auto;" title="" width="320" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Creating a new SMB (Windows) sahre for the newly created Dataset</td></tr>
</tbody></table>
</li>
</ol>
At this point all 3 users have access to the Common share over the network, by default \\freenas.local\Common. This is the basic setup and it will work on freshly created datasets. If you have previosuly changed any permissions on parent Datasets the read the section below for explaining the issues. <br />
<ul>
</ul>
<h2>
General Errors and Solution </h2>
<div style="text-align: justify;">
A brief section explaining some (trivial) problems I encountered and found it hard to get an explanation.</div>
<br />
<h3>
Everybody can see and read the share over the network</h3>
<div style="text-align: justify;">
By default when making Windows shares in FreeNAS the group "Everyone" is added to a share and hence all users who can log in can actually view the share. The solution is to attach the volume in a Windows amchine as the owner of the dataset, right-click the folder, go to permissions and remove the group "Everybody" from the access list. This prevents LAN users from seeing the sahres all together.</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS5Bq8ujYifG-C26S9u5xKRf-2p2UxVWGnaJrDov4NDePwzpc-4-_R4cw2MtK1xP6hRssJ_h78kgfv-prHi7FFtRBrOSq8okNSJrmD9JGeX1iOkHFwZHmm9Qf3zkEHyKp93ocfMyS0uOA/s1600/Storage+Share.PNG" style="margin-left: auto; margin-right: auto;"><img alt="Checking user and group permissions for the main Dataset" border="0" data-original-height="473" data-original-width="600" height="252" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjS5Bq8ujYifG-C26S9u5xKRf-2p2UxVWGnaJrDov4NDePwzpc-4-_R4cw2MtK1xP6hRssJ_h78kgfv-prHi7FFtRBrOSq8okNSJrmD9JGeX1iOkHFwZHmm9Qf3zkEHyKp93ocfMyS0uOA/s320/Storage+Share.PNG" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">By default, the group "Everyone" is added to FreeNAS Windows shares.</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkPs4qnOddVN5fjMPtmbbqps5zEj82gCFLCp5xLdDhoip4eGkR_ljsjLOloRunUN0njGJsQTF62y-hBVE5PlWjVBSe4NocMRjLA1G79S7yBaiysTXQzqnsqe3WdqEU0Eaof6ZKzW4hPWQ/s1600/RemoveEveryone.PNG" style="margin-left: auto; margin-right: auto;"><img alt="Permissions settings for the main Dataset" border="0" data-original-height="450" data-original-width="363" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjkPs4qnOddVN5fjMPtmbbqps5zEj82gCFLCp5xLdDhoip4eGkR_ljsjLOloRunUN0njGJsQTF62y-hBVE5PlWjVBSe4NocMRjLA1G79S7yBaiysTXQzqnsqe3WdqEU0Eaof6ZKzW4hPWQ/s320/RemoveEveryone.PNG" title="" width="258" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">To deny access of local network users without explicit permissions to view the shared Datasets, remove the "Everyone" group from the permissions tab.</td></tr>
</tbody></table>
<div style="text-align: justify;">
If you have sub-folders in the datase, you will get a prompt asking you if you want to change the permissions recursively, you can say yes.</div>
<h3>
I have set up the users, added them to the proper group, but they still cannot access a Dataset</h3>
<div style="text-align: justify;">
This can happen if a parent Dataset is shared and some of its sub-datasets are also shared separately. The issue comes when the sub-dataset has to be shared with an user, but the parent dataset has to be restricted. It took me a while to figure out - as it is often not mentioned - but the parent dataset in FreeNAS has to have the same Owner (group) as the sub-dataset you want to share. Lets look at the following simple share setup as an example.</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8Y2vc0rxIIFcbbDARZxHaDjxcGUaRBSaX8YSy43mPj8XXGQlpapXM4lGjrhli3fRWJrlYukdTYLiovpSozb1Z7Nu350d0nbInQ2i7AoCY0Bsha_Zcwm4-o_sPFMBDCFrjEHNr_TJXejg/s1600/Share12.PNG" style="margin-left: auto; margin-right: auto;"><img alt="Storage Dataset with Music and Series sub-datasets." border="0" data-original-height="90" data-original-width="694" height="81" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8Y2vc0rxIIFcbbDARZxHaDjxcGUaRBSaX8YSy43mPj8XXGQlpapXM4lGjrhli3fRWJrlYukdTYLiovpSozb1Z7Nu350d0nbInQ2i7AoCY0Bsha_Zcwm4-o_sPFMBDCFrjEHNr_TJXejg/s640/Share12.PNG" title="" width="640" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Example share setup, where Storage Dataset has 2 sub-datatsets.</td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
If I wanted to share <i>just </i>the Music sub-dataset with Alice, I would need to do the following,<br />
<ul>
<li>Create a new group, e.g. called "Shared"</li>
<li>Add Alice to the group Shared</li>
<li>Make "Shared" the Owner (group) of the Music dataset</li>
<li>Make "Shared" the Owner (group) of the Storage parent Dataset (this is usually forgotten!)</li>
<li>To restrict Alice's access to the Series dataset, make sure that it is owned by another group in which Alice is not a member.</li>
</ul>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-25800008346675330812017-10-01T00:21:00.002+01:002018-01-09T15:48:50.129+00:00Run Storjshare in a FreeNAS Jail<div style="text-align: justify;">
Not really a Debian/Ubuntu thing as per say, but since recently I built a FreeNAS system, I though it would be useful to rent out an unused 2 TB disk. So here it goes, Storjshare daemon inside a FreeNAS-11.0-U2 jail.</div>
<br />
I am assuming that you know what <a href="https://storj.io/share.html" target="_blank">storjshare </a>is, basic experience with its terminal (non-GUI) version and that you have hands-on experince with <a href="http://www.freenas.org/" target="_blank">FreeNAS</a>.<br />
<br />
<h2>
<b><span style="color: red;">Update (2018 Jan 9):</span></b></h2>
I ran into a range of errors during an update. Here are my observations and the solutions I found.<br />
<ol>
<li>Installing via <span style="font-family: "courier new" , "courier" , monospace;">nvm </span>did not work for me, instead I manually installed the dependencies,<br /><span style="font-family: "courier new" , "courier" , monospace;">pkg install npm<br />npm install -g npm3</span><br />Currently this would install the following node and npm versions,<br /><span style="font-family: "Courier New", Courier, monospace;">node v9.3.0<br />npm3 3.10.10<br />npm 5.3.0</span><br />Since npm install the latest version of node automatically, manual installation of node is not necessary.</li>
<li>Updating storjshare after thisworks using,<br /><span style="font-family: "courier new" , "courier" , monospace;">npm3 install storjshare-daemon --global --no-optional</span><br />(Yes, that is <span style="font-family: "Courier New", Courier, monospace;">npm3 </span>and <i><u>not</u></i> <span style="font-family: "Courier New", Courier, monospace;">npm</span>. I seem to have run into an infinite number of troubles with that.)<span style="font-family: "courier new" , "courier" , monospace;"><br /></span></li>
<li>Permission errors with npm can be fixed by <a href="https://docs.npmjs.com/getting-started/fixing-npm-permissions" target="_blank">changing npm's default directory</a></li>
<li>Currently running,<br /><span style="font-family: "Courier New", Courier, monospace;">storjshare --version<br />daemon: 5.3.0, core: 8.5.0, protocol: 1.2.0</span></li>
</ol>
If any packages are reported missing when installing <span style="font-family: "Courier New", Courier, monospace;">storjshare-daemon</span> via <span style="font-family: "Courier New", Courier, monospace;">npm3</span>, remember to install them by,<br /><span style="font-family: "Courier New", Courier, monospace;">npm3 install -g <package><br /></span>instead of,<br />
<span style="font-family: "Courier New", Courier, monospace;"></span><span style="font-family: "Courier New", Courier, monospace;">npm install -g <package></span><br />
<ol>
</ol>
<h2>
TL;DR (aka Advanced users) </h2>
<ol>
<li>Create jail and assign storage space</li>
<li>In jail terminal<br />
<span style="font-family: "courier new" , "courier" , monospace;">pkg install npm git</span></li>
<li>Then install <span style="font-family: "Courier New", Courier, monospace;">npm3 </span>with,<span style="font-family: "courier new" , "courier" , monospace;"><br />npm install -g npm3</span></li>
<li>Install storjsahre via npm,<br />
<span style="font-family: "courier new" , "courier" , monospace;">npm3 install storjshare-daemon </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">--global</span> </span><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "courier new" , "courier" , monospace;">--no-optional</span></span></li>
<li>Start the daemon and connect a farmer node<br />
<span style="font-family: "courier new" , "courier" , monospace;">storjshare-daemon<br />
storjshare start --config yourconfig.jso</span>n</li>
</ol>
Not clear enough? Read below.<br />
<h2>
Create a Jail and add some space</h2>
<ol>
<li>Go to<b> <i>Jails/Add Jail</i></b>. No fancy setting required, probably name it something useful like Storjshare<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj2nRav2mMZbSL4qIX2GOUDwVCRnjDeVMHeikqu7dLE28ajVsNFtJ_UZR7WibpQBd1L17bZiYuQ2B_3TOepB4DcFsg2f3CYccHX401wZlPV0YwgF9yQI7-6hYbbpajVY30jhNDz0QvQAw/s1600/AddNewJail.PNG" style="margin-left: auto; margin-right: auto;"><img alt="Adding a new jail in FreeNAS" border="0" data-original-height="192" data-original-width="473" height="129" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhj2nRav2mMZbSL4qIX2GOUDwVCRnjDeVMHeikqu7dLE28ajVsNFtJ_UZR7WibpQBd1L17bZiYuQ2B_3TOepB4DcFsg2f3CYccHX401wZlPV0YwgF9yQI7-6hYbbpajVY30jhNDz0QvQAw/s320/AddNewJail.PNG" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Add a new jail "Storj" where the service will run.</td></tr>
</tbody></table>
</li>
<li>Assign storage place to the jail. Go to <i><b>Jail/Storage/Add Storage</b></i>. Select the source, aka the drive or directory to store the future files and the destination. The destionation could be e.g. <i>/mnt/Storjshare</i> and you can ask to create the new directory.<br />
<span id="goog_704533489"></span><span id="goog_704533490"></span></li>
</ol>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj71M0zIIkEG6PRNWtWpjENJx2olrbuSS26p1MToWH1Y4dCdFLKPdQKnS7Qgp5H6G9C_8uRd7hzON6kZnd9aItbRRTzFQu5BOfhz4lHR9GwgeMgZ1Kyc6nMXVcC-4QLCxv6d66qtiS-Lps/s1600/AddStorage1.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Creating a new jail in the UI" border="0" data-original-height="120" data-original-width="319" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj71M0zIIkEG6PRNWtWpjENJx2olrbuSS26p1MToWH1Y4dCdFLKPdQKnS7Qgp5H6G9C_8uRd7hzON6kZnd9aItbRRTzFQu5BOfhz4lHR9GwgeMgZ1Kyc6nMXVcC-4QLCxv6d66qtiS-Lps/s1600/AddStorage1.PNG" title="" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Adding storage space to an existing jail.</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-Oqp80T-lXojBiTMO9HCpEMwBAwfewQCrFuuiTQZKGZITC3qm6Q_yiS6F7Kiu0CeVY9UFVRmXEvAEcLCbtD8dcGjkI6aiG6QMOUuCxw7Uj6jvoY3P4VdWmIcatNCj0mQr3eSmZd21_mc/s1600/AddStorage.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Allocating storage space from a Dataset to the newly created jail" border="0" data-original-height="293" data-original-width="411" height="228" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi-Oqp80T-lXojBiTMO9HCpEMwBAwfewQCrFuuiTQZKGZITC3qm6Q_yiS6F7Kiu0CeVY9UFVRmXEvAEcLCbtD8dcGjkI6aiG6QMOUuCxw7Uj6jvoY3P4VdWmIcatNCj0mQr3eSmZd21_mc/s320/AddStorage.PNG" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Assigning the source (drive space) of Drive1/Storjshare to the jail's /mnt/Storjshare mount point.</td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<br />
The jail is ready and set, proceed to the next step.<br />
<h2>
Installing storjshare</h2>
<div style="text-align: justify;">
Now I did not follow the <a href="https://github.com/Storj/storjshare-daemon" target="_blank">standard instructions</a> as installing node the described way did not seem to work. Instead I manually installed the required node version via <span style="font-family: "courier new" , "courier" , monospace;"><i>pkg</i></span>. We need the LTS version 6 of node and we can check for this. You can either log in via ssh to the jail or simply launch a terminal from the UI on the Jails tab.</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOCWCruPVPd7qAdj2CodTgfhPYoDXOnY0ui_2UdfqkpIKMiRHRhws27OW_d6yzcuKt3426czAiVN_bRsswyauDbupIuS5Urtc818ZWzUEH5mGwJZw-6j2ifcOK-lOD_rdfybvurb3e_Lw/s1600/JailStart.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="UI snippet showing how to start a shell from the web browser" border="0" data-original-height="82" data-original-width="277" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiOCWCruPVPd7qAdj2CodTgfhPYoDXOnY0ui_2UdfqkpIKMiRHRhws27OW_d6yzcuKt3426czAiVN_bRsswyauDbupIuS5Urtc818ZWzUEH5mGwJZw-6j2ifcOK-lOD_rdfybvurb3e_Lw/s1600/JailStart.PNG" title="" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Conveniently launching a terminal from the UI.</td></tr>
</tbody></table>
<div style="text-align: justify;">
Once the terminal is open, lets install the pre-requisites first, followed by storjshare.</div>
<ol><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg670hb1Trh2KXveI9GEFYPsixIYM2lOKISjuay4Sz6x63sCFaO91bq5roOnicOaixVwF-NXDW60tCTxPtcHirV8ysIt08Ygu8pB_t_mOt4QpRU-3xoj5DVtAMRiRIaqS-0yfdgz4Seyx8/s1600/pkg+install+npm3.PNG" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;"></a>
<li>Search for availabel node versions via,<br />
<span style="font-family: "courier new" , "courier" , monospace;">pkg search node</span><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpnwc0L1UMH0V7kZqkLqmlDVghHIaIKhFiedVfEMRSLUe1ViJsuSc6YRrFXYJyPxjYBLQSS2TZxOSzKdk1G_P_0eOwrY7YYnph2bmSFgX3nDKDBUKM83QSp9ho0wDdX6ydNy3FmFKvI8M/s1600/pkg+search+node.PNG" style="margin-left: auto; margin-right: auto;"><img alt="pkg search node output in the shell" border="0" data-original-height="458" data-original-width="588" height="310" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhpnwc0L1UMH0V7kZqkLqmlDVghHIaIKhFiedVfEMRSLUe1ViJsuSc6YRrFXYJyPxjYBLQSS2TZxOSzKdk1G_P_0eOwrY7YYnph2bmSFgX3nDKDBUKM83QSp9ho0wDdX6ydNy3FmFKvI8M/s400/pkg+search+node.PNG" title="" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">pkg search node returns a list of available packages, notice the node6-6.11.3-1.</td></tr>
</tbody></table>
<span style="font-family: "courier new" , "courier" , monospace;"></span></li>
<li>The node version we need is node6-6.11.3-1 as shown above. This can be installed with,<br />
<span style="font-family: "courier new" , "courier" , monospace;">pkg install node6-6.11.3-1</span><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6Ft6qL2R0KU08bnlPPlS8IYhtveP2pbaddJ0LZ6JFS6HYTErp262DSLY5Ht_eqIZ9eWc2tV1IAVaYhzCQQGA4y4pbrqi30vZsgH8ua890X39eaUinZwplxzAotw7y_ZpbRFY2FCcZBoY/s1600/pkg+install+node6.6.11.3_1.PNG" style="margin-left: auto; margin-right: auto;"><img alt="Installing node6 LTS using pkg install" border="0" data-original-height="464" data-original-width="590" height="313" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg6Ft6qL2R0KU08bnlPPlS8IYhtveP2pbaddJ0LZ6JFS6HYTErp262DSLY5Ht_eqIZ9eWc2tV1IAVaYhzCQQGA4y4pbrqi30vZsgH8ua890X39eaUinZwplxzAotw7y_ZpbRFY2FCcZBoY/s400/pkg+install+node6.6.11.3_1.PNG" title="" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Installing node6 with pkg.</td></tr>
</tbody></table>
<span style="font-family: "courier new" , "courier" , monospace;"></span></li>
<li><span style="font-family: inherit;">At the end you will be prompted to isntall npm3, so do,<br />
<span style="font-family: "courier new" , "courier" , monospace;">pkg install npm</span></span><table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfTRxoHnCczSyxIvg3OmxgcqijwUOMEjekGlBpNNBQqDD_0oy3kyv3MuAoXL5qSsGeQQnIzbdiIiNJpGvqxMSN1x5iprkHW3H1VtENUII0LG5SRwdr9B115gcvOvkC6qubo6-UGZ838H0/s1600/pkg+install+npm3.PNG" style="margin-left: auto; margin-right: auto;"><img alt="Installing npm via pkg install" border="0" data-original-height="463" data-original-width="587" height="315" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhfTRxoHnCczSyxIvg3OmxgcqijwUOMEjekGlBpNNBQqDD_0oy3kyv3MuAoXL5qSsGeQQnIzbdiIiNJpGvqxMSN1x5iprkHW3H1VtENUII0LG5SRwdr9B115gcvOvkC6qubo6-UGZ838H0/s400/pkg+install+npm3.PNG" title="" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Installing npm3 after node6.</td></tr>
</tbody></table>
Since npm3 can no longer be found directly through PKG, to install it do,<br /><span style="font-family: "Courier New", Courier, monospace;">npm install -g npm3</span><br />
<span style="font-family: inherit;"></span><span style="font-family: inherit;"></span><span style="font-family: inherit;"></span><span style="font-family: inherit;"></span></li>
<li><span style="font-family: inherit;"> These should be completed so install the other required packages as well,<br />
<span style="font-family: "courier new" , "courier" , monospace;">pkg install git</span></span></li>
<li><span style="font-family: inherit;"> Start installing storjshare as per the githug guide,<br />
<span style="font-family: "courier new" , "courier" , monospace;">npm3 install storjshare-daemon </span></span><span style="font-family: inherit;"><span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: inherit;"><span style="font-family: "courier new" , "courier" , monospace;">--global </span></span>--no-optional</span></span><br />
A few warnings will be present, but for all functionality it will work.</li>
</ol>
<div style="text-align: justify;">
<u><i><b>Note:</b></i></u> Above the <span style="font-family: "courier new" , "courier" , monospace;">--no-optional</span> was added to the install command as a suggestion from <a href="https://github.com/Storj/storjshare-daemon/issues/147#issuecomment-304491441" target="_blank">github </a>as the dtrace package fails to build on FreeBSD at the moment. Since the package is not necessary for storjshare, to avoid annoying - and non-relevant - error messages, this modeule can be ommited. When building without the additional <span style="font-family: "courier new" , "courier" , monospace;">--no-optional</span> a similar error will be thrown, although storjshare would still run:</div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">Error: Cannot find module './build/Release/DTraceProviderBindings'</span></div>
</blockquote>
<h2>
Running storjshare</h2>
This is somewhat beyond the scope of the guide, however here is a quick guide on setting up a simple storjshare farming node.<br />
<ol>
<li>Create your config file with the help of<code> storjsahre --help</code><blockquote class="tr_bq">
<code><span style="font-family: "courier new" , "courier" , monospace;">Usage: storjshare-create [options]</span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;"></span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;">generates a new share configuration</span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;"></span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;">Options:</span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;"></span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;">-h, --help output usage information</span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;">--storj <addr> specify the STORJ address (required)</span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;">--key <privkey> specify the private key</span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;">--storage <path> specify the storage path</span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;">--size <maxsize> specify share size (ex: 10GB, 1TB)</span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;">--rpcport <port> specify the rpc port number</span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;">--rpcaddress <addr> specify the rpc address</span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;">--maxtunnels <tunnels> specify the max tunnels</span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;">--tunnelportmin <port> specify min gateway port</span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;">--tunnelportmax <port> specify max gateway port</span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;">--manualforwarding do not use nat traversal strategies</span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;">--logdir <path> specify the log directory</span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;">--noedit do not open generated config in editor</span></code><br />
<code><span style="font-family: "courier new" , "courier" , monospace;">-o, --outfile <writepath> write config to path</span></code><br />
<code></code></blockquote>
For example,<br />
<code>storjsahre-create --key myPayoutAddress --storage /mnt/StorjShare --size 2TB --logdir /root/ -o settings.json</code> </li>
<li>After the config file was created, start the daemon with,<br />
<code>storjshare daemon</code></li>
<li>Finally, start the farming node using the previos settings,<code><br />
storjshare start --config settings.json </code><code></code><span style="font-family: inherit;"><code> </code></span><code></code><pre><span style="font-family: inherit;"><code> </code></span></pre>
</li>
</ol>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpbK4WAxKrv5KxfoQS-zPkz-A_fEM4-zZynjQGEE9XVC-fJNirY4HFZswI1dGSz0PcAbskaTcx46LNhvwtvTGMq7jdj4sSlvzq6hYM1Zprnsm-hFVUKQpmLmRU_S7aYfHOSJboZlJtn48/s1600/StorjShare_noerror.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="storjshare status output from the FreeNAS jail" border="0" data-original-height="235" data-original-width="943" height="98" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjpbK4WAxKrv5KxfoQS-zPkz-A_fEM4-zZynjQGEE9XVC-fJNirY4HFZswI1dGSz0PcAbskaTcx46LNhvwtvTGMq7jdj4sSlvzq6hYM1Zprnsm-hFVUKQpmLmRU_S7aYfHOSJboZlJtn48/s400/StorjShare_noerror.PNG" title="" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Storjshare inside a FreeNAS jail, runign without problems.</td></tr>
</tbody></table>
<br />
<u><i><b>Note:</b></i></u> Specifying a logfile can be necessary. During my tryouts I have encountered some trouble with the log directory not being accessible by the jail's user.<br />
<br />
Happy farming!Unknownnoreply@blogger.com1tag:blogger.com,1999:blog-886443900063926782.post-83322702510866181182017-05-04T22:17:00.000+01:002017-05-04T22:17:28.509+01:00Install Money Manager EX in Ubuntu 16 - MMEX<img src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi2Ab76mNP626FwGJf3O0EUc5lUOCwgs2GPYrwycTUU2i_M9rf8DIEPfUziUX3Rg2D4has-_sCSBLmsR4vtPr_n2CAeFfUHA2sS864Hl4-Scu7NxQYyQE9sivqNplADmn84HQSRchHKVuk/h120/mmex.png" style="display: none;" /> <br />
<div style="text-align: justify;">
Money Manager EX is a nice tool to keep track of personal finances and expenses. And while installers exist for windows, in Linux one has to compile the software alone. This has proven to be somewhat more difficult than expected, but with the right dependencies and following the guide it is possible.</div>
<br />
<h2>
Compile from git repository and install</h2>
Following the <a href="https://github.com/moneymanagerex/moneymanagerex/blob/master/doc/INSTALL.Ubuntu.md" target="_blank">Ubuntu guide from Github</a> one needs to do,<br />
<ol>
<li>Install dependencies <br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get update && sudo apt-get upgrade</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get install git build-essential automake libwxbase3.0-dev libwxgtk3.0-dev libwxgtk-webview3.0-dev python-dev build-essential cmake git libgtk-3-dev libwebkitgtk-dev libwxgtk3.0-dev libwxgtk-webview3.0-dev libwxsqlite3-3.0-dev</span></blockquote>
<div style="text-align: justify;">
(In the github documentation the latter <i>libwsqlite3-3.0-dev</i> is not mentioned, however it is necessary for compiling. Without this I was getting errors while compiling) </div>
</li>
<li>Clone the git repository<br />
<blockquote>
<span style="font-family: "courier new" , "courier" , monospace;">git clone --recursive https://github.com/moneymanagerex/moneymanagerex</span></blockquote>
<div style="text-align: justify;">
(I found that the <i>--recursive</i> parameter is important, otherwise I got some files missing in the end) </div>
</li>
<li>For the release (no debugging build) configure and compile as<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">cd moneymanagerex/build</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">mkdir release </span><br />
<span style="font-family: "courier new" , "courier" , monospace;">cd release </span><br />
<span style="font-family: "courier new" , "courier" , monospace;">cmake -DCMAKE_BUILD_TYPE=Release ../../ </span><br />
<span style="font-family: "courier new" , "courier" , monospace;">make package</span></blockquote>
</li>
<li>After this you can install it with<br />
<blockquote>
<span style="font-family: "courier new" , "courier" , monospace;">sudo make install</span></blockquote>
</li>
<li>and finally run from the terminal window with<br />
<blockquote>
<span style="font-family: "courier new" , "courier" , monospace;">mmex</span></blockquote>
</li>
</ol>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdQuMLhVPtpV1sD4xmQBtNJAB-nzO93jST7-196xRKlXZh4gBhZ2_PYdCeuQxikiVnLfq-LcaKR1-UYw6x448WbFU_3Bm2752sv6pniW360TQwzANFk8Iy8pin2QOxfCH5qxE_PnURzkY/s1600/Screenshot+from+2017-05-04+23-00-23.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjdQuMLhVPtpV1sD4xmQBtNJAB-nzO93jST7-196xRKlXZh4gBhZ2_PYdCeuQxikiVnLfq-LcaKR1-UYw6x448WbFU_3Bm2752sv6pniW360TQwzANFk8Iy8pin2QOxfCH5qxE_PnURzkY/s320/Screenshot+from+2017-05-04+23-00-23.png" width="237" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">MMEX running under Ubuntu 16</td></tr>
</tbody></table>
<br />
<u><b>Note:</b></u> For <span style="font-family: "Courier New",Courier,monospace;">make</span> you can pass the argument "<span style="font-family: "Courier New",Courier,monospace;">-j x</span>" where x is the number of threads to use.<br />
<br />
<h2>
Creating a desktop launcher</h2>
Create a file called Mmex.desktop (yes, <i>.desktop</i>) on your desktop.<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">nano ~/Desktop/Mmex.desktop</span></blockquote>
Paste the following into the file<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">#!/usr/bin/env xdg-open <br />
[Desktop Entry] <br />
Version=1.0 <br />
Type=Application <br />
Terminal=false <br />
Exec=mmex <br />
Name=Mmex <br />
Comment=Money Manager<br />
Icon=/usr/local/share/icons/hicolor/scalable/apps/mmex.svg</span></blockquote>
Make the file executable with<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">chmod +x ~/Desktop/Mmex.desktop</span></blockquote>
You should be left with the following, a nice desktop launcher. <br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrvyOCm-sdJBQuolOpVh2CkzKKqZQMJhqfR9z0lcv81_vWykwfmkhyd_Vgpm1cAWmyJpDE24m16iuox4fjwss2Nh9DvKiiBYasjtPLdtV49gn02ZaNzKPJxsp_lm5e88CrzPG7Y3EXqr0/s1600/Screenshot+from+2017-05-04+22-00-08.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="198" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjrvyOCm-sdJBQuolOpVh2CkzKKqZQMJhqfR9z0lcv81_vWykwfmkhyd_Vgpm1cAWmyJpDE24m16iuox4fjwss2Nh9DvKiiBYasjtPLdtV49gn02ZaNzKPJxsp_lm5e88CrzPG7Y3EXqr0/s400/Screenshot+from+2017-05-04+22-00-08.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Mmex desktop launcher and the location of the Icon</td></tr>
</tbody></table>
<b>What is what?</b><br />
<i>Exec</i> - command that gets executed<br />
<i>Name</i> - The visible name of the file (hence you don't see the .desktop extension)<br />
<i>Comment</i> - Additional comment if you like<br />
<i>Icon</i> - path to the icon to display, otherwise blank launcher image <br />
<br />
<br />
<br />
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-81980833355465083332017-05-01T10:50:00.000+01:002017-05-01T10:50:07.832+01:00A job is running for dev-mapper-cryptswap1.deviceIf you notice that booting Ubuntu takes a long time and you see the following error message on the booting screen after pressing 'ESC',<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">A job is running for dev-mapper-cryptswap1.device (50s / 1m30s)</span> </blockquote>
<h2>
</h2>
<div style="text-align: justify;">
This is caused by the system looking for an encrypted swap partition, however most likely you have not created one. Which is normal, now when a lot of RAM is available, and a swap partition is not necessary. This is all due to a misconfiguration entry in the fstab, which tells the system to try and mount the said (non existing) partition.</div>
<h2>
Solution</h2>
<div style="text-align: justify;">
The solution is to remove or comment out the "cryptswap" entries from <span style="font-family: "Courier New",Courier,monospace;">/etc/fstab</span> and <span style="font-family: "Courier New",Courier,monospace;">/etc/crypttab</span>.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
This can be done easily by editing the above mentioned files as commenting out the lines that say cryptswap by placing a "#" in front of the matching lines.</div>
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">sudo nano /etc/fstab</span><br />
<span style="font-family: "Courier New",Courier,monospace;">sudo nano /etc/crypttab</span></blockquote>
<div style="text-align: justify;">
The result is shown below in the image, where the lines referring to the cryptswap partition are already commented out. </div>
<br />
<b>Reminder</b>: 'CTRL + O' saves the file, 'CTRL + X' exits the nano text editor.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM-3pPqBs_KC1aeN7FNWWZlQuTV36ufkADctCpgF1dTGUNnaaYypVseERlemKwXudUuP-_vEWPmkjdZR5ZO1kHjyrTb41bWlR1vQ1eaXvGDGAm8MvMKhOIGlCIE7GEcg7I9cq-A0Vvi9g/s1600/Screenshot+from+2017-05-01+11-42-10.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="191" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjM-3pPqBs_KC1aeN7FNWWZlQuTV36ufkADctCpgF1dTGUNnaaYypVseERlemKwXudUuP-_vEWPmkjdZR5ZO1kHjyrTb41bWlR1vQ1eaXvGDGAm8MvMKhOIGlCIE7GEcg7I9cq-A0Vvi9g/s320/Screenshot+from+2017-05-01+11-42-10.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Both <span style="font-family: "Courier New",Courier,monospace;">fstab</span> and <span style="font-family: "Courier New",Courier,monospace;">crypttab</span> have an entry for cryptswap1, shown as already commented out</td></tr>
</tbody></table>
<div class="separator" style="clear: both; text-align: center;">
</div>
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-26972913473821028572017-01-24T20:26:00.000+00:002017-01-24T20:26:52.313+00:00Install Steam Controller on Ubuntu 16.04<div style="text-align: justify;">
I have a Steam controller that I use every now and then and wanted to try it on Ubuntu 16.04. However, <b>the operating system did not recognize the controller automatically, as of 22.01.2017 on a fresh install of Ubuntu 16.04</b>. Luckily, it can be added quickly without any extensive troubleshooting.</div>
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirxgRhiQW5VLzKzpUfe0VA5_ecaKUNsJUk95Lq15GdcRIxHSlHbNcodZF-Z0v6V3GhU7EETgev6DJZqWMDKF4rdYsVC9SpDLJ4razN9sR6bpN_hCOTZTLGD9FLNhvbc7TGagMInJvsSdQ/s1600/Screenshot+from+2017-01-22+11-23-12.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Detecting the steam controller in ubuntu" border="0" height="208" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEirxgRhiQW5VLzKzpUfe0VA5_ecaKUNsJUk95Lq15GdcRIxHSlHbNcodZF-Z0v6V3GhU7EETgev6DJZqWMDKF4rdYsVC9SpDLJ4razN9sR6bpN_hCOTZTLGD9FLNhvbc7TGagMInJvsSdQ/s400/Screenshot+from+2017-01-22+11-23-12.png" title="Steam controller" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Ubuntu 16.04 detecting the Steam controller for the first time.</td></tr>
</tbody></table>
<h2>
Add a Controller</h2>
<div style="text-align: justify;">
Referring to an earlier post from November 2016 on <a href="http://askubuntu.com/questions/686214/how-do-i-get-a-steam-controller-working" target="_blank">AskUbuntu.com</a> the solution is quite straightforward and applies to a fresh 16.04 install.<br />
<br />
<ol>
<li>To install the controller we have to add a new device manually with udev,<br /><blockquote>
<span style="font-family: "courier new" , "courier" , monospace;">sudo gedit /lib/udev/rules.d/99-steam-controller-perms.rules </span></blockquote>
</li>
<li>There is no such file by default, so the above command will create it. Simply copy the following into it,<br /><blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"># This rule is needed for basic functionality of the controller in Steam and keyboard/mouse emulation<br />SUBSYSTEM=="usb", ATTRS{idVendor}=="28de", MODE="0666"<br /><br /># This rule is necessary for gamepad emulation; make sure you replace '<span style="color: red;">GROUP</span>' with a group that the user that runs Steam belongs to<br />KERNEL=="uinput", MODE="0660", GROUP="<span style="color: red;"><span style="font-family: "courier new" , "courier" , monospace;">GROUP</span></span>", OPTIONS+="static_node=uinput"<br /><br /># Valve HID devices over USB hidraw<br />KERNEL=="hidraw*", ATTRS{idVendor}=="28de", MODE="0666"<br /><br /># Valve HID devices over bluetooth hidraw<br />KERNEL=="hidraw*", KERNELS=="*28DE:*", MODE="0666"<br /><br /># DualShock 4 over USB hidraw<br />KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="05c4", MODE="0666"<br /><br /># DualShock 4 wireless adapter over USB hidraw<br />KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="0ba0", MODE="0666"<br /><br /># DualShock 4 Slim over USB hidraw<br />KERNEL=="hidraw*", ATTRS{idVendor}=="054c", ATTRS{idProduct}=="09cc", MODE="0666"<br /><br /># DualShock 4 over bluetooth hidraw<br />KERNEL=="hidraw*", KERNELS=="*054C:05C4*", MODE="0666"<br /><br /># DualShock 4 Slim over bluetooth hidraw<br />KERNEL=="hidraw*", KERNELS=="*054C:09CC*", MODE="0666"</span></blockquote>
Make sure to replace GROUP with the user's group that will run Steam. In
most installations your username and group will be username:username, hence
your username will suffice. If in doubt, you can check what groups you belong to simply by,<br /><blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">groups username</span></blockquote>
</li>
<li>Unplug the controller adapter if it was plugged in. </li>
<li>Re-plug the controller adapter. </li>
</ol>
That should be it. Enjoy gaming.<br />
<ol>
</ol>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-75997006949836141932017-01-21T23:10:00.003+00:002018-02-19T17:46:57.411+00:00Install Cura 2.x on Ubuntu 16.04Cura is a slicer software that prepares your 3D drawings for printing. Installing the latest version on Ubuntu 16.04 was not as easy as downloading the .deb file and installing it from the official site at: <a href="https://ultimaker.com/en/products/cura-software">https://ultimaker.com/en/products/cura-software.</a><br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVTrWanWetNtL-tOPc2VPCMJX-zNhGwCo8t__Yq9jkXGlgAp01HcF3LylG9uFObZ_Mc3XzwbXbKfpGvtxx1fO2wqRzXl8CPr-NH4yP4L0yfM8YXHg5DzcSWLH3bf8BujlbWDYIExpbTBQ/s1600/Screenshot+from+2017-01-22+00-04-02.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="217" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjVTrWanWetNtL-tOPc2VPCMJX-zNhGwCo8t__Yq9jkXGlgAp01HcF3LylG9uFObZ_Mc3XzwbXbKfpGvtxx1fO2wqRzXl8CPr-NH4yP4L0yfM8YXHg5DzcSWLH3bf8BujlbWDYIExpbTBQ/s400/Screenshot+from+2017-01-22+00-04-02.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Cura 2.x running under Ubuntu 16.04</td></tr>
</tbody></table>
<h2>
Install Cura 3.x + (Update 2018.02.19)</h2>
<div style="text-align: justify;">
It was brought to my attention that the below repository may not be actively maintained any longer. Also, currently Cura 3.2.1 can be downloaded from the official website, see below, as an App Image. Hence running it is as easy as,</div>
<ol>
<li>Download the latest Cura version from <a href="https://ultimaker.com/en/products/ultimaker-cura-software">https://ultimaker.com/en/products/ultimaker-cura-software</a> </li>
<li>Make the downloaded app image file executable,<br /><span style="font-family: "Courier New", Courier, monospace;">chmod a+x Cura-3.2.1.AppImage</span> </li>
<li>Run the App,<br /><span style="font-family: "Courier New", Courier, monospace;">./Cura-3.2.1.AppImage</span></li>
</ol>
<div style="text-align: justify;">
Now, this is only a read-only app image, so it will not come up in your dash searches. You can still make an alias for it or even make a desktop launcher if you prefer.</div>
<h2>
Install from repository (Depreciated)</h2>
Firstly, since Cura depends on python 3.x, let's get the dependencies first,<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get install python3 python3-dev python3-<span style="font-family: "courier new" , "courier" , monospace;">s</span>ip</span></blockquote>
Then <a href="https://launchpad.net/~thopiekar/+archive/ubuntu/cura" target="_blank">add the following repository</a>,<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo add-apt-repository ppa:thopiekar/cura</span></blockquote>
Finally, update packages list and install cura.<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get update && sudo apt-get install cura</span></blockquote>
After this you should be able to run cura either with the command <span style="font-family: "courier new" , "courier" , monospace;">cura</span> from the terminal or from searching through dash.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp2sneFg7yhD6LMx-t1HOH0PpjpBLm1eo0rLGn9Z00V2SHN9N2XTB_uNmAtcb2nSzGqH1LdhsYOF0fuL1bfZHZjKmGMIvdpBjw8xGN9j3qgLGqa7Lp1qY3bMIgOsRreEEG6jBexAZQtzc/s1600/Screenshot+from+2017-01-21+23-56-52.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Cura" border="0" height="275" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjp2sneFg7yhD6LMx-t1HOH0PpjpBLm1eo0rLGn9Z00V2SHN9N2XTB_uNmAtcb2nSzGqH1LdhsYOF0fuL1bfZHZjKmGMIvdpBjw8xGN9j3qgLGqa7Lp1qY3bMIgOsRreEEG6jBexAZQtzc/s320/Screenshot+from+2017-01-21+23-56-52.png" title="Cura" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Launch Cura from Ubuntu dash,</td></tr>
</tbody></table>
<br />Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-28482134067677917752017-01-07T15:28:00.000+00:002017-01-07T15:28:29.540+00:00Send email with PHP and crontab on reboot in Ubuntu<div style="text-align: justify;">
Even with the best VPS services reboots can happen: maintenance, hardware upgrade, kernel upgrade. Most of the time users are warned in advance so that they can prepare for the service outage. However, it can happen that there is a reboot and you did not know about it or simply forgot. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
I just added a small php script to my server to send me an email if it was rebooted. This way I can log in ASAP and restart services that do not start automatically.</div>
<div style="text-align: justify;">
<br /></div>
<h2 style="text-align: justify;">
Send email via PHP</h2>
<div style="text-align: justify;">
This assumes that you have php installed on your Ubuntu instance.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
A simple php program to send emails can look like this:</div>
<div style="text-align: justify;">
<br /></div>
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;"><?php</span><br /><span style="font-family: "Courier New",Courier,monospace;">$to = "email@address.com";</span><br /><span style="font-family: "Courier New",Courier,monospace;">$subject = "Reboot";</span><br /><span style="font-family: "Courier New",Courier,monospace;">$txt = '</span><br /><span style="font-family: "Courier New",Courier,monospace;"></span><br /><span style="font-family: "Courier New",Courier,monospace;">Hello, your server has been rebooted and services have most likely stopped.</span><br /><span style="font-family: "Courier New",Courier,monospace;">If this reboot was unscheduled please log in to restart services.</span><br /><span style="font-family: "Courier New",Courier,monospace;"></span><br /><span style="font-family: "Courier New",Courier,monospace;">Have a nice day!</span><br /><span style="font-family: "Courier New",Courier,monospace;">';</span><br /><span style="font-family: "Courier New",Courier,monospace;"></span><br /><span style="font-family: "Courier New",Courier,monospace;"></span><br /><span style="font-family: "Courier New",Courier,monospace;">// To send HTML mail, the Content-type header must be set</span><br /><span style="font-family: "Courier New",Courier,monospace;">$headers = 'MIME-Version: 1.0' . "\r\n";</span><br /><span style="font-family: "Courier New",Courier,monospace;">$headers .= 'Content-type: text/html; charset=iso-8859-1' . "\r\n";</span><br /><span style="font-family: "Courier New",Courier,monospace;"></span><br /><span style="font-family: "Courier New",Courier,monospace;">//More headers</span><br /><span style="font-family: "Courier New",Courier,monospace;">$headers = "From: server@server.com" . "\r\n" .</span><br /><span style="font-family: "Courier New",Courier,monospace;">"CC: ";</span><br /><span style="font-family: "Courier New",Courier,monospace;"></span><br /><span style="font-family: "Courier New",Courier,monospace;">mail($to,$subject,$txt,$headers);</span><br /><span style="font-family: "Courier New",Courier,monospace;">?></span></blockquote>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
It is kind of self-explanatory, but just to explain quickly: </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<b>to</b>: email address of the recipient</div>
<div style="text-align: justify;">
<b>subject</b>: subject of the email</div>
<div style="text-align: justify;">
<b>text</b>: main body of the email until the final semicolon (;). Note that you can also send html-based emails. To do this, simply used the html codes such as,</div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "Courier New",Courier,monospace;">$text = '<html></span></div>
<div style="text-align: justify;">
<span style="font-family: "Courier New",Courier,monospace;"><head> </span></div>
<div style="text-align: justify;">
<span style="font-family: "Courier New",Courier,monospace;"></head></span></div>
<div style="text-align: justify;">
<span style="font-family: "Courier New",Courier,monospace;"><body></span></div>
<div style="text-align: justify;">
<span style="font-family: "Courier New",Courier,monospace;">This is a html <br> message!</span></div>
<div style="text-align: justify;">
<span style="font-family: "Courier New",Courier,monospace;"></body></span></div>
<div style="text-align: justify;">
<span style="font-family: "Courier New",Courier,monospace;"></html>'</span></div>
</blockquote>
<div style="text-align: justify;">
<b>headers</b>: sets the message header. You can write any email address in the "from" field.</div>
<div style="text-align: justify;">
<b>mail($to,$subject,$txt,$headers);</b> : sends the email with the previously defined variables above.</div>
<div style="text-align: justify;">
<br /></div>
<h3 style="text-align: justify;">
Create and test</h3>
<ol>
<li>You can save the above in a .php file. (I prefer to have a MyScripts directory in my /home, just to keep everything organized.)</li>
<li>Test if the program is working. <br /><blockquote>
<span style="font-family: "Courier New",Courier,monospace;">sudo -u www-data php -f rebootMail.php</span></blockquote>
This will call php, as the user "www-data", and launch the specified file. If your web server's default user is not www-data, adjust accordingly.</li>
</ol>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<u><b>Note:</b></u> If you have a web server running, you can run the above php program from your web browser. Simply copy the rebootMail.php into your <span style="font-family: "Courier New",Courier,monospace;">/var/www</span> (or wherever your web server's <span style="font-family: "Courier New",Courier,monospace;">/</span> is) and visit serveraddress.com/rebootMail.php. If you have done everything correctly, you should receive an email. Although, in this case the php program can be executed by anyone visiting it's web address.</div>
<h2 style="text-align: justify;">
Auto-launch program on reboot </h2>
<div style="text-align: justify;">
This can be done either via <span style="font-family: "Courier New",Courier,monospace;">crontab</span> or using <span style="font-family: "Courier New",Courier,monospace;">/etc/rc.local</span>. Let's do it via crontab.</div>
<ol>
<li>To edit existing cron scheduled tasks (no sudo needed),<blockquote>
<span style="font-family: "Courier New",Courier,monospace;">crontab -e</span> <span style="font-family: "Courier New",Courier,monospace;"></span><br /><span style="font-family: "Courier New",Courier,monospace;"></span><blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;"></span></blockquote>
</blockquote>
</li>
<li>In a new line at the end of the file add,<blockquote>
<span style="font-family: "Courier New",Courier,monospace;">@reboot /usr/bin/php /path/to/rebootMail.php </span></blockquote>
</li>
<li>Save changes and exit the nano editor,<br /><span style="font-family: "Courier New",Courier,monospace;">Ctrl + O<br />Ctrl + X</span></li>
</ol>
<div style="text-align: justify;">
Done. If all done correctly, you should now receive an email on every reboot. To make sure everything is well configured, you should reboot your server manually once and confirm that it works.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<u><b>Note:</b></u> If your php is not installed in <span style="font-family: "Courier New",Courier,monospace;">/usr/bin</span>, adjust the path accordingly.</div>
<div style="text-align: justify;">
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-28263361811896500532016-09-11T12:18:00.005+01:002016-09-11T12:18:52.427+01:00Change Banana Pi M3 CPU Frequency<div style="text-align: justify;">
This is a short script for changing the CPU clock rate of the Banana Pi M3 in the allowable steps between 480 MHz to 1.8 GHz.</div>
<br />
<h2>
Motivation</h2>
<div style="text-align: justify;">
Since the Banana Pi M3 heats quite a bit at 1.8 GHz (even with heat sinks), lowering the CPU frequency can bring these temperatures down. The clock rate can be tuned between 480 MHz and 1.8 GHz by default, possibly up to 2 GHz when the CPU voltages are adjusted and unlocked. </div>
<br />
<div style="text-align: justify;">
<u><b>Note:</b></u> This script only adjusts the speed up to 1.8 GHz.</div>
<br />
<h2>
How-to</h2>
<ol>
<li>Download the script from <a href="http://pastebin.com/1EyQKfXP" target="_blank">Pastebin</a> [<a href="http://pastebin.com/download/1EyQKfXP" target="_blank">Direct Download</a>] </li>
<li>Copy it over to your Banana Pi M3<br /><blockquote>
<span style="font-family: "Courier New",Courier,monospace;">scp BananaPiM3_FrequencyChanger.sh user@bananapi:/home/remoteuser/</span></blockquote>
</li>
<li>Make it executable<br /><blockquote>
<span style="font-family: "Courier New",Courier,monospace;">chmod +x BananaPiM3_FrequencyChanger.sh</span></blockquote>
</li>
<li>Run it with<br /><blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">./BananaPiM3_FrequencyChanger.sh</span></blockquote>
</li>
</ol>
<br />
<b><u>Optional:</u></b> Add an alias in your <i>.bash_aliases</i> to call it faster!<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">echo "alias frequency='./BananaPiM3_FrequencyChanger.sh'" >> .bash_aliases</span></blockquote>
Apply the changes with, <br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">source .bashrc</span></blockquote>
From now on you can call the script with<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">frequency</span></blockquote>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7ZurTzzZ9EUc8WpT_br9eDcNfmpr7hFsjPxrcRMecyov6utsKe7yKS8tE3alE74oM8Krg59allXQfdHCeV5WLrHt9E7aNUcYwp_hhlBlD6NJSIbYcHH0cnWtOCLtvHbuziqRZlScfDdU/s1600/Screenshot+from+2016-09-11+13-12-19.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Screenshot of the script in action." border="0" height="191" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi7ZurTzzZ9EUc8WpT_br9eDcNfmpr7hFsjPxrcRMecyov6utsKe7yKS8tE3alE74oM8Krg59allXQfdHCeV5WLrHt9E7aNUcYwp_hhlBlD6NJSIbYcHH0cnWtOCLtvHbuziqRZlScfDdU/s320/Screenshot+from+2016-09-11+13-12-19.png" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Screenshot of the script, setting my board's frequency to 1 GHz.</td></tr>
</tbody></table>
<br />
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-20646420963312293972016-08-31T22:46:00.000+01:002016-09-01T19:42:40.664+01:00Large Heat Sink on Banana Pi M3<div style="text-align: justify;">
So while I was playing with the idea of <a href="http://ubuntuhak.blogspot.com/2016/08/running-boinc-on-banana-pi-m3.html" target="_blank">running BOINC</a> - on my otherwise mostly idle - octa-core Banana Pi M3, I remembered that the previously added tiny heat sink will probably not do much good. The CPU is still easily heating to 65-67 degrees Celsius even with a CPU clock rate set to 1GHz and under moderate load.</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIqbO2nrAzO9wQskum9DDn8PXBdIRtdDMxCRRGCZjI-S8NzWf2yH7bk-P40ci_YpqWH7stu5otIzcDIPOEgwF72gbRAthZ6aQjx9UbRNMSt10cEN8meoKRqVflK_LN76gAbqaCPxtAds0/s1600/IMG_20160415_184610.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Small heat sink installed on my Banana Pi M3" border="0" height="236" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhIqbO2nrAzO9wQskum9DDn8PXBdIRtdDMxCRRGCZjI-S8NzWf2yH7bk-P40ci_YpqWH7stu5otIzcDIPOEgwF72gbRAthZ6aQjx9UbRNMSt10cEN8meoKRqVflK_LN76gAbqaCPxtAds0/s320/IMG_20160415_184610.jpg" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Small heat sink installed on my Banana Pi M3</td></tr>
</tbody></table>
<div style="text-align: justify;">
<h3>
Sizing </h3>
I started looking around in my "random parts box" and found a roughly 5*5 cm aluminium heat sink, with a slight plateau on the bottom, in the centre line where something used to be attached. Unfortunately, there isn't any mounting opportunity on the board and everything is tightly packed. The CPU and the RAM are the same height, but some parts directly next to them are slightly higher and this puts a limit on how large the heat sink can be. I measured and a roughly 3.5*2.5 cm heat sink should give enough clearance from nearby parts. I had to cut my heat sink into pieces, but it worked.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisfRLwh0tHwDVpCueVC88YUagXvOQvxRVKiD5bg90BlXJoqnpG0_m1HRHKS3ZOem3uk0Gew25Y7lm4zoRbEsOqBcm6jG0FDA4QXUlAlQIiaSRd5g0r5JegiGvXBRvgl0tECfUnqxVmcps/s1600/IMG_20160831_182153+-+Copy.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Heat sink cut into 3 parts. 1 scrap and 2 useful sides." border="0" height="277" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEisfRLwh0tHwDVpCueVC88YUagXvOQvxRVKiD5bg90BlXJoqnpG0_m1HRHKS3ZOem3uk0Gew25Y7lm4zoRbEsOqBcm6jG0FDA4QXUlAlQIiaSRd5g0r5JegiGvXBRvgl0tECfUnqxVmcps/s320/IMG_20160831_182153+-+Copy.png" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Heat sink cut into 3 parts. Bottom one is scrap, left and right are the right size.</td></tr>
</tbody></table>
<h3>
Mounting </h3>
I cleaned and polished the cut edges a bit and made sure it fits on the board. I put a grain of thermal paste on both the CPU and RAM and aligned the part carefully. It fits just right and the paste also gives a bit of mechanical stability, although not much. It is not visible on the pictures, but to hold the heat sink in place I have used 2 pea-sized balls of glue
on the side of the heat sink close to the GPIO pins. Ideally I would have used a glue gun, but since I do not have one, I used the 2 component Pattex glue paste.<br />
<br />
As you can see below, the heat sink has an odd-shape with one "arm" extending over the eMMC storage (to the right), whereas contact is only made on the left side with the CPU and RAM. I realize it is an oddly shaped heat sink, but the shape allowed me to use a surface area as large as possible.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR_SIwl5YX4sqJ_DIqsz82iWEcCC34PD3xza1kejlzOv3azLX1O5yCdHPaviB6sfHSPYmgcO0RS6cbs3pQQeqeOT1_-gc6JPNAWKJe2L4B7dAdd-afhQFa1WAAgWIkSuRD2DSxGgZ6h6c/s1600/IMG_20160831_182245+-+Copy.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiR_SIwl5YX4sqJ_DIqsz82iWEcCC34PD3xza1kejlzOv3azLX1O5yCdHPaviB6sfHSPYmgcO0RS6cbs3pQQeqeOT1_-gc6JPNAWKJe2L4B7dAdd-afhQFa1WAAgWIkSuRD2DSxGgZ6h6c/s320/IMG_20160831_182245+-+Copy.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Large heat sink mounted on the Banana Pi M3.</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnzQ_bUM41oSeIN2Fur912Is8beuAl14ASrXZPnyBVpwUNyq_CMBHjJ7cwxcmopZDghyphenhyphenIzhfK_qD4glp7uCGFGvE16calWVznIDxUL1BB9Zw1j22-GJ3Yh93Q6QnbBwZ_3MCu-DkwBYJY/s1600/IMG_20160831_182250+-+Copy.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="240" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhnzQ_bUM41oSeIN2Fur912Is8beuAl14ASrXZPnyBVpwUNyq_CMBHjJ7cwxcmopZDghyphenhyphenIzhfK_qD4glp7uCGFGvE16calWVznIDxUL1BB9Zw1j22-GJ3Yh93Q6QnbBwZ_3MCu-DkwBYJY/s320/IMG_20160831_182250+-+Copy.jpg" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Large heat sink mounted on the Banana Pi M3. Side view.</td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
It is an odd shape, yes, but it is the added thermal mass and the surface area that matters.<br />
<h3>
Result</h3>
<ul>
<li>I have been running BOINC on 6 cores at 100% load, using a clock frequency of 1GHz for about 45 minutes and the temperature seems to have maxed out at 62-63 degrees Celsius. Ambient temperature of 27 degrees Celsius.</li>
<li>The heat sink seems to sit tightly, despite the agreeably dodgy mounting. I wish I could have added some screws, but there simply isn't enough space.</li>
<li>The possible drawback is that since the heat sink covers both the RAM and CPU, it is quite likely that it is in fact <i>heating </i>the RAM. I am not sure if this is the case - or to what degree as the RAM was usually hot as well, just checking by touching - nevertheless, I'll keep an eye on this.</li>
</ul>
</div>
<div style="text-align: justify;">
I will do a bunch of testing to see what temperatures I get at different CPU speeds and number of cores used. Stay tuned.</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-18322051407402614242016-08-31T22:43:00.000+01:002016-08-31T22:47:59.998+01:00Running BOINC on Banana Pi M3<div style="text-align: justify;">
So I have my Banana Pi M3 sitting on my shelf, pretty much only serving as a <a href="http://ubuntuhak.blogspot.com/2016/05/banana-pi-m3-v12-first-tests.html" target="_blank">low-power file server with samba shares</a>. 8 cores, doing nothing 99% of the time. So I though, why not run BOINC on it and contribute to science projects a bit?</div>
<div style="text-align: justify;">
<br /></div>
<h2 style="text-align: justify;">
Hardware</h2>
<ul>
<li>Banana Pi M3 (clocked down to 1GHz)</li>
<li>Seagate 2 TB HDD</li>
<li><a href="https://drive.google.com/file/d/0B_YnvHgh2rwjeHFRSEV2WTU3b3M/view?usp=sharing" target="_blank">Debian Jessie</a>, as shown below.</li>
</ul>
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">lsb_release -a</span></div>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">No LSB modules are available.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Distributor ID: Debian</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Description: Debian GNU/Linux 8.5 (jessie)</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Release: 8.5</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Codename: jessie</span></blockquote>
<span style="font-family: "courier new" , "courier" , monospace;">uname -a</span><br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">Linux bananapi 3.4.39-BPI-M3-Kernel #22 SMP PREEMPT Wed Mar 16 12:07:48 CST 2016 armv7l GNU/Linux</span></blockquote>
<br />
<h3>
Install</h3>
Installation is pretty straightforward and worked for me out of the box on the above mentioned installation. <br />
<ol>
<li><span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get update && sudo apt-get upgrade</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get install boinc-client</span></li>
</ol>
<br />
<h3>
Running</h3>
<div style="text-align: justify;">
Now I don't have a screen attached to my Banana Pi M3, so I didn't download the boinc manager. There is the text interface tool, called <i>boinctui</i>, however I made the experience that it doesn't allow to connect to BAM! account manager. Hence I would rather connect from another machine on my local network with the boinc manager.</div>
<div style="text-align: justify;">
Furthermore, I would strongly recommend using an account manager (<a href="https://boincstats.com/">https://boincstats.com</a>) and making a new "Work Preference" setting especially for the Banana Pi / other ARM devices. I have assigned 6 CPU cores total and a maximum usage of 100%. Also, the CPU clock rate of my device is throttled down to 1GHz to avoid overheating. (Yes, 8 cores heat quite a bit) Like this I am getting up to 63 degrees Celsius, <a href="http://ubuntuhak.blogspot.com/2016/08/large-heat-sink-on-banana-pi-m3.html" target="_blank">thanks to my new over-sized heat sink</a>!</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
To allow a remote boinc manager to connect I am running the client with the following command: </div>
<div style="text-align: justify;">
<br /></div>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">boinc --daemon --dir /path/to/BOINC/directory --no_gpus --allow_remote_gui_rpc </span></blockquote>
<br />
<div style="text-align: justify;">
As you can see I have a <span style="font-family: "courier new" , "courier" , monospace;">--dir</span> option in there, which specifies the BOINC default directory. I have specified this on my 2 TB HDD so that there is plenty of space and not the 8 GB eMMC is used. It is running smoothly.</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifx6yaseVRhyLl8RRTIm-YxeCgFxI_WDgXfkmjmofq5luv5-vZwXLt0abPDbaR8QxDCZebYlyeLD0x6rpLpyc5jzHGuYfhFi5Bi0D_zNOjDi8u385TiW7U6yNB3gKa3OP6cN0SFlhN5_Y/s1600/BOINC1.PNG" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Running BOINC on my Banana Pi M3, currently 6 cores at 1 GHz." border="0" height="129" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEifx6yaseVRhyLl8RRTIm-YxeCgFxI_WDgXfkmjmofq5luv5-vZwXLt0abPDbaR8QxDCZebYlyeLD0x6rpLpyc5jzHGuYfhFi5Bi0D_zNOjDi8u385TiW7U6yNB3gKa3OP6cN0SFlhN5_Y/s320/BOINC1.PNG" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Running BOINC on my Banana Pi M3, currently 6 cores at 1 GHz.</td></tr>
</tbody></table>
<div style="text-align: justify;">
<br /></div>
<br />
<h3>
<span style="font-family: inherit;">Connect remotely</span></h3>
<div style="text-align: justify;">
On your remote machine launch Boinc manager and go to File/Select Computer. In the popup window enter the IP address of the Banana Pi and the password. The latter is stored in the default BOINC directory under <span style="font-family: "courier new" , "courier" , monospace;">/Boinc/directory/gui_rpc_auth.cfg</span>. You can edit this simply with </div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">sudo nano <span style="font-family: "courier new" , "courier" , monospace;">/Boinc/directory/gui_rpc_auth.cfg</span></span></div>
</blockquote>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYYfoWA7FsPK-_YR6Ny4b3m07ckLX1YAfx-jnn2909LA8m-Bs1rTIeGJdcHdFT4RJWyeRbPXWRSQ7HtWHYZ5Enq4eR8GowT9-NiKkOUo-uW4VwF96e9m9zMAit8l2yrQLxdAzfgIsNRbw/s1600/Screenshot+from+2016-08-30+20-47-00.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Select computer to control with Boinc manager" border="0" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgYYfoWA7FsPK-_YR6Ny4b3m07ckLX1YAfx-jnn2909LA8m-Bs1rTIeGJdcHdFT4RJWyeRbPXWRSQ7HtWHYZ5Enq4eR8GowT9-NiKkOUo-uW4VwF96e9m9zMAit8l2yrQLxdAzfgIsNRbw/s1600/Screenshot+from+2016-08-30+20-47-00.png" title="Boinc manager/File" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Select computer to control with Boinc manager.</td></tr>
</tbody></table>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
After this you can easily add an account manager and synchronize with the projects and settings as per configured at <a href="https://boincstats.com/">https://boincstats.com</a>. This way you can remotely adjust the settings as needed later on.</div>
<br />
<h2>
Considerations</h2>
<h3>
HDD spin up/down timeout</h3>
<div style="text-align: justify;">
By default you may have noticed that an attached hard drive is on continuously, it doesn't enter sleep/stand-by mode. To avoid this, I have added the following to my <span style="font-family: "courier new" , "courier" , monospace;">/etc/rc.local</span></div>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo hdparm -S 25 /dev/sdb</span></blockquote>
<div style="text-align: justify;">
This tells the drive to spin down if there was no activity in the last 25*5 seconds. Now if you have done the same, the smart thing to do (I guess) would be to limit how often the boinc client can access the drive. I don't want it to have access every 60 seconds and spin up the drive for 5 seconds to write something and then wait 60 seconds again. This would be wasteful in terms of drive lifetime. Hence I would recommend setting the "Write to disk at most" parameter in the client settings to reasonably value. I am testing 1000 seconds for the moment.</div>
<div style="text-align: justify;">
This can be configured in your BAM! account at <a href="https://boincstats.com/en/bam/workPreferences/">https://boincstats.com/en/bam/workPreferences/</a>.<br />
<br /></div>
<h3>
CPU clock settings</h3>
<div style="text-align: justify;">
At the maximum of 2 GHz the 8 cores produce quite a bit of heat and therefore would continuously throttle back the whole device. Therefore I would recommend setting the maximum frequency a bit lower. The relevant system directory is /sys/devices/system/cpu/cpu0/cpufreq.</div>
<div style="text-align: justify;">
To see the available frequencies</div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_available_frequencies </span></div>
</blockquote>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
I have made the following script that sets up my CPU clockrate on every boot. From this you can easily deduct how to set what.</div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">#!/bin/sh<br /><br />#Sets the CPU's core frequency</span></div>
</blockquote>
<br />
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">echo ondemand > /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor<br />echo 1000000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_max_freq<br />echo 480000 > /sys/devices/system/cpu/cpu0/cpufreq/scaling_min_freq<br />echo 25 > /sys/devices/system/cpu/cpufreq/ondemand/up_threshold<br />echo 10 > /sys/devices/system/cpu/cpufreq/ondemand/sampling_down_factor</span></div>
</blockquote>
You can save this script, make it executable with<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo chmod +x script.sh</span></blockquote>
And then call it from e.g.<span style="font-family: "courier new" , "courier" , monospace;"> /etc/rc.local</span> to run at system boot. <br />
<br />
<div style="text-align: justify;">
You can experiment a bit to see what is best.<br />
<br />
<h3>
Heating</h3>
Check out my post to see how I have resolved this issue.<br />
<a href="http://ubuntuhak.blogspot.com/2016/08/large-heat-sink-on-banana-pi-m3.html" target="_blank">Large Heat Sink on the Banana Pi M3</a>.</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-40983731977366599622016-05-01T16:57:00.000+01:002016-05-01T16:57:46.901+01:00Cannot set password for user with adduserRecently with my Banana Pi M3 I was having multiple issues while installing. One of them was an error message when trying to set up a new user. See the error message below.<span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><br />
<span style="font-family: inherit;"></span></span></span></span></span><br />
<blockquote class="tr_bq">
<span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">C<span style="font-family: "courier new" , "courier" , monospace;">urrent password: </span></span></span></span></span></span></span><br />
<span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: "courier new" , "courier" , monospace;">New password: </span></span></span></span></span></span></span><br />
<span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: "courier new" , "courier" , monospace;">New password (again): </span></span></span></span></span></span></span><br />
<span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: "courier new" , "courier" , monospace;">passwd: Authentication token manipulation error</span></span></span></span></span></span></span><br />
<span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: "courier new" , "courier" , monospace;">passwd: password unchanged</span></span></span></span></span></span></span></blockquote>
<h2>
<span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">Smyptoms</span></span></span></span></span></span></h2>
<span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">When adding a new user with</span></span></span></span></span></span><br />
<blockquote class="tr_bq">
<pre name="code">sudo adduser $user</pre>
</blockquote>
<span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">The syste<span style="font-family: inherit;">m does not accept <span style="font-family: inherit;">a pass<span style="font-family: inherit;">word and produces the above message.</span></span></span></span></span></span></span></span></span><br />
<h2>
<span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">Solution</span> </span></span></span></span></span></span></h2>
<div style="text-align: justify;">
I have found that removing the (non existing ?) password from the user is the only way to solve the problem quickly. It is a weird thing, I have no clue what is causing this.</div>
While logged in as any user with root privileges (sudo), delete the<span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"> <span style="font-family: "courier new" , "courier" , monospace;">$user</span> password,</span></span></span></span></span></span></span></span></span></span><br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">sudo passwd -d $user</span></span></span></span></span></blockquote>
And set a new password for<span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"> <span style="font-family: "courier new" , "courier" , monospace;">$user,</span></span></span></span></span></span></span></span></span></span></span><br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"><span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">sudo passwd $user</span></span></span></span></span></blockquote>
It should work now. <span class="co0"><span style="font-family: inherit;"><br />
</span></span><br />
<span class="co0"><span style="font-family: inherit;">Credit go<span style="font-family: inherit;">es to <span style="font-family: inherit;"><a href="https://askubuntu.com/questions/57620/getting-an-authentication-token-manipulation-error-when-trying-to-change-my-us" target="_blank">Askubuntu.com</a>. Thanks!</span></span><br />
</span></span>Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-88965486713701515492016-05-01T16:50:00.003+01:002016-05-01T16:50:59.850+01:00Banana Pi M3 (v1.2) - First Tests<div style="text-align: justify;">
This is a short summary of my experience with my newly obtained Banana Pi M3 (v.1.2) board. I am touching on the following topics,<br />
<ul>
<li>Operating systems</li>
<ul>
<li>Installing an OS on the internal eMMC storage (no SD cards finally!)</li>
<li>Expanding the file system to the whole eMMC size</li>
</ul>
<li>The Hardware</li>
<ul>
<li>What power supply to get </li>
<li>Read & Write speeds from/to 2.5" HDD</li>
<li>Encrypted containers and their speeds </li>
</ul>
<li>Temperatures</li>
<ul>
<li>Passive cooling with heat sink</li>
<li>Forced cooling with a small USB fan</li>
<li>Controlling CPU frequency to limit heat generation</li>
</ul>
</ul>
<br />
So three weeks ago on Thursday I have received my Banana Pi M3 v.1.2 board. In my excitement - despite not having slept enough for the previous 2 weeks - I have started to write OS .img files to different SD cards to quickly try out my new toy before going to bed. Well, long story short I have managed to dd my laptop's / (/home was on a separate partition, so it was not a major issue, but still annoying). To reinstall so I had to burn some of those DVD things that were so popular about 10 years ago. The good news is, now I'm running Ubuntu 16.04, an update that was due anyway for my (previous) 12.04 system.<br />
<br />
<h2>
My project aims</h2>
<h3>
No SD cards please!</h3>
I had quite a bit of bad luck with continuously failing class 10, branded SD cards with my Raspberry Pi B previously. Therefore, I was happy to see a single board computer on the market that has an on-board storage. One of my main motivations hence was to work without the need for (permanent) SD cards.<br />
<br />
<h3>
Home theatre PC </h3>
I have a now old Raspberry Pi B running <a href="http://kodi.tv/" target="_blank">Kodi</a> that serves as my HTPC (if I can say that) connected to a TV. The Banana Pi M3 would be primarily an upgrade to this system that would hopefully add that snappy & fast response and uninterrupted video playback even at high bit rate videos.<br />
<br />
<h3>
Cheap file server</h3>
On the other had, I am running out of storage space on my devices and currently I cannot go for a proper NAS;something worthwhile buying that would last for years is over 600€. Unfortunately, I cannot afford that right now. Until I do, I'd love to use the BPi M3 with an external HDD as a samba share as well as backup storage for my files. Support for encryption would be a big plus.<br />
<br />
<h3>
Others</h3>
I am also planning to run a few additional services here, mainly scripts and bots automatizing some tasks for me.</div>
<div style="text-align: justify;">
<br /></div>
<h2 style="text-align: justify;">
First look</h2>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuKRIGQBvf8Cy-D8qi8UzQdE-uRWY2TFaHtJsqZ4Ft5_ikWkVE2pPgROI8q85gbbGvswg7a0QIuiKC0cdYXysPKfdTHaIdbvtZh_od6Z7ps4eYiPiN9eSgnNvR7WCsSqPDDu5yxcDYbmQ/s1600/BPi+-+Copy.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Banana Pi M3 v1.2 board." border="0" height="224" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjuKRIGQBvf8Cy-D8qi8UzQdE-uRWY2TFaHtJsqZ4Ft5_ikWkVE2pPgROI8q85gbbGvswg7a0QIuiKC0cdYXysPKfdTHaIdbvtZh_od6Z7ps4eYiPiN9eSgnNvR7WCsSqPDDu5yxcDYbmQ/s320/BPi+-+Copy.png" title="Banana Pi M3 v1.2 board." width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Banana Pi M3 v1.2 board. Note the micro USB as well as the 5V jack plug on the bottom left corner. Both can supply power, however it is advised to use the jack plug.</td></tr>
</tbody></table>
<span id="goog_767879572"></span><span id="goog_767879573"></span><br />
<div style="text-align: justify;">
The technical specifications can be found at <a href="http://www.banana-pi.org/m3.html" target="_blank">banana-pi.org</a>, so I won't detail these. However, a few important things that are easy to skim over before you decide to buy,</div>
<ul>
<li style="text-align: justify;"><b>The "SATA" connector actually uses a SATA to USB bridge</b>, hence the speed is limited by the USB 2.0 hub's theoretical speed of 480 Mbps. Sad.</li>
<li style="text-align: justify;">The newest board (as far as I know, v1.2) has <b><i>both</i> a micro USB OTG and a 5 V DC input</b>. <b>Do not power the board via micro USB</b>. I have a 2A micro USBpower
supply, but I wasn't able so far to detect a SATA connected external 2TB
2.5" HDD. Using a a 5V DC jack power supply has resolved this. </li>
<li style="text-align: justify;">The board uses a <b>micro SD card</b>. </li>
<li style="text-align: justify;"><b>Boots readily from the on-board eMMC</b>. There is an 8 GB (7.3 GB) on-board eMMC flash storage. I could burn a linux image in it easily using dd, but I couldn't boot the board without the SD card in it for a while. Repeating the same process <i>exactly</i> has resolved the problem. Somehow (I reckon it was some OS image issue). </li>
</ul>
<h2>
Operating System</h2>
<div style="text-align: justify;">
<div id="ubuntu-mate-1510-for-bpim3-gpu-powervr-sgx544mp-20160317">
This is a tricky part. There are <a href="http://www.banana-pi.org/m3-download.html" target="_blank">images available</a> (<a href="https://bananapi.gitbooks.io/bpi-m3/content/linux_for_kernel_34.html" target="_blank">also here</a>) to download where I have gone with the most recent ones to try as earlier this year and end of 2015 there was quite a a bit of negative feedback about bugs. </div>
<div id="ubuntu-mate-1510-for-bpim3-gpu-powervr-sgx544mp-20160317">
<br /></div>
<div id="ubuntu-mate-1510-for-bpim3-gpu-powervr-sgx544mp-20160317">
Ubuntu Mate 15.10 for BPI-M3 GPU PowerVR SGX544MP (<i>20160317</i>) is <i>probably damaged</i>/broken as I have tried writing it to the flash storage and it always failed to boot. On some occasions the file system was already corrupted and / could not be mounted on boot. </div>
<br />
I have decided to go for <a href="https://drive.google.com/file/d/0B_YnvHgh2rwjeHFRSEV2WTU3b3M/view?usp=sharing" target="_blank">Debian Jessie 8.4</a> from above and flashed it to the on-board eMMC. I strongly recommend this (latest, as of now) OS image. No more SD cards!<br />
<div class="separator" style="clear: both; text-align: center;">
<a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP6u1r4o6Ol8aN-Y8-NLqOqGTjXlBpG0SwVT0MT3MDh1XYzATy3IMT_WYHRyLkQbsjcsGPUlteoCvvCPtkiUdw8P9BLoSlOUNSd4tcVlg15DV4DS6Ij4UM4lfqeeEiCmZkAN5cQkO3gOs/s1600/Screenshot+from+2016-04-15+19-06-00.png" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Debian Jessie 8.4" border="0" height="113" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgP6u1r4o6Ol8aN-Y8-NLqOqGTjXlBpG0SwVT0MT3MDh1XYzATy3IMT_WYHRyLkQbsjcsGPUlteoCvvCPtkiUdw8P9BLoSlOUNSd4tcVlg15DV4DS6Ij4UM4lfqeeEiCmZkAN5cQkO3gOs/s400/Screenshot+from+2016-04-15+19-06-00.png" title="My Operating system of choice" width="400" /></a></div>
At this point I have to say that I have been unable to install kodi on Debian Jessie after many days of trying. I figure that the gpu is still not properly supported.<br />
<h3>
</h3>
<h3>
Summary</h3>
There is continuous development and a new Ubuntu 16.04 LTS image should be coming out soon, stay tuned! Currently, support is quite low. I would only advise for developers and people who would like to tinker with an upcoming hardware. <br />
<br />
<h2>
Writing to the on-board eMMC storage</h2>
Let us leave SD cards behinds as this was one of my main motivations over buying a newer model of Raspberry Pi. I had to throw out and reinstall too many SD cards to start using them again. The Banana Pi M3 has a net of 7.3 GB on-board flash storage. To write an image to it, first you have to boot from an SD card. This is well explained in other tutorials, but the method is same in all cases,<br />
<ol>
<li>Download an .img file</li>
<li>Find out what is the device number of the SD card /flash storage</li>
<li>Write image with dd</li>
</ol>
So, respectively if you are on a Linux machine or already booted the banana Pi from an SD card,<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">lsblk</span></blockquote>
will list the devices you have. On your computer the SD card probably shows up as <span style="font-family: "courier new" , "courier" , monospace;">/dev/sd</span>b whereas if you are running the Banana Pi the internal storage will likely be <span style="font-family: "courier new" , "courier" , monospace;">/dev/mmcblk0</span> and the SD card shows up as <span style="font-family: "courier new" , "courier" , monospace;">/dev/mmcblk1</span>.<br />
<br />
I am pretty sure <span style="font-family: "courier new" , "courier" , monospace;">mmcblk0</span> is the flash and <span style="font-family: "courier new" , "courier" , monospace;">mmcblk1</span> the SD card by default on every board. To write a .img file to the flash storage you do as you normally would with an SD card,<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo dd if=/debian-jessie-8.4.img of=/dev/mmcblk0 bs=1M</span></blockquote>
Where<br />
if - input file, the img file you want to write<br />
of -output file, in this case the internal storage<br />
<br />
Once finished, you can run <span style="font-family: "courier new" , "courier" , monospace;">lsblk</span> again to confirm that partitions have been written. You should see something like on the image below.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyGTbi-Ql6HeGIcM6wr3CwPI609-lYtFkUpAEjGH2LpXuNaHgp-STKFigawovTZ8HTVITglBbJhyccQQVQQPX9AuQxp8hwKQqvXZj2ePNOlVXLIARaXuSu-eXU3wvAOYw7JZo8QdZNnSE/s1600/Screenshot+from+2016-04-16+11-13-42.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Banana Pi eMMC and SD card partitions" border="0" height="133" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjyGTbi-Ql6HeGIcM6wr3CwPI609-lYtFkUpAEjGH2LpXuNaHgp-STKFigawovTZ8HTVITglBbJhyccQQVQQPX9AuQxp8hwKQqvXZj2ePNOlVXLIARaXuSu-eXU3wvAOYw7JZo8QdZNnSE/s400/Screenshot+from+2016-04-16+11-13-42.png" title="Banana Pi partitions" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Banana Pi with Debian 8.4. mmcblk0 stand for the internal storage whereas mmcblk1 shows an inserted SD card. p1 & p2 stand for partitions one and two, respectively.</td></tr>
</tbody></table>
<br />
<br />
<u><b>Note:</b></u> You can specify a block size of 1-10 MB if you want for dd, but it is not necessary. Use e.g. <span style="font-family: "courier new" , "courier" , monospace;">bs=1M</span> at the end of the dd command.<br />
Also, dd doesn't have any status indicator of the process. If it doesn't give you an error, it is running. Let it finish.<br />
<br />
<u><b>Warning:</b></u> dd is dangerous, so make sure you are writing to the good partition with it, it can easily overwrite other data. I take no responsibility if you delete anything.<br />
<br />
<h3>
Expanding the file system</h3>
Sometimes the .img file you write to the SD card to eMMC storage is smaller than the actual storage space you have. However, in this case some of the space will be unrecognised and hence cannot be used until you expand the file system. You can do this directly from the Banana Pi while running, it will require one reboot. This will NOT delete any data from your SD card or the on-board eMMC storage.<br />
<br />
<u><b>Explanation:</b></u><br />
What happens here is the following: The first partition mmcblk0<b>p1</b> is the boot partition and it occupies the first X sectors of the "disk". The second partition starts with the following sector and occupies some amount of sectors, however not until the last one. Hence part of the space is not "seen" by the device. Herein lies the problem. What we have to do is that we have to redefine this second partition and specify to last until the last sector on the disk. Essentially we have to delete the second partition (mmcnlk0p2) and recreate it, such that it starts immediately after the first partition (like before). However, this time we tell the OS to make the partition last until the end of the disk, that is the last sector. This process does not cause data loss as the partition is not formatted, only expanded to free space after the current sectors.<br />
<br />
There is a nice tutorial on how to do this on <a href="http://gleenders.blogspot.com/2014/08/banana-pi-resizing-sd-card-root.html" target="_blank">gleenders.blogspot.com</a>. The steps you have to do to expand the on-board storage on the Banana Pi is pretty much the same,<br />
<ol>
<li><span style="font-family: "courier new" , "courier" , monospace;">sudo fdisk -l</span><br />Check from the output which one is the eMMC storage. I assume here its <span style="font-family: "courier new" , "courier" , monospace;">/dev/mmcblk0</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">sudo fdisk /dev/mmcblk0</span></li>
<li>Press "p" to list partition table on the device. You will most likely see 2 partitions, with the second one being several GB in size. Remember the last sector of the first partition. The second one needs to be deleted, set to start right after the end of the first partition and last until the last sector. </li>
<li>Press "d" to delete a partition and select the second one.</li>
<li>Press "n" to create a new partition and choose "p" for primary". Specify the first sector of the partition starting right after the first partition (you should still see this information above in your terminal window). The last sector should be the last sector of the drive.</li>
<li>Press "w" for writing the partition table</li>
<li>Reboot your Banana Pi,<br /><span style="font-family: "courier new" , "courier" , monospace;">sudo shutdown -r now</span></li>
<li> Log in via ssh and resize the partition finally with,<br /><span style="font-family: "courier new" , "courier" , monospace;">sudo resize2fs /dev/mmcblk0p2</span></li>
</ol>
<u><b>Note:</b></u> This does not delete any data from the drive, if done correctly.<br />
<h2>
Hardware</h2>
<h3>
Power supply</h3>
Initially I have tried to power the board from a micro USB port, however this was unsatisfactory as it was unable to power a 2.5" HDD. Next, I have ordered a 5V 3A DC jack power supply, and this worked perfectly. I got a multi-adapter power supply for 16€ from <a href="http://www.amazon.de/gp/product/B00Z9P4T8U/ref=as_li_tl?ie=UTF8&camp=1638&creative=19454&creativeASIN=B00Z9P4T8U&linkCode=as2&tag=ubuntuhakblog-21" target="_blank">Amazon.de</a>. It comes with plenty of adapters and I can re-use it later on for other projects if I need.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="http://ecx.images-amazon.com/images/I/51ip3R4WBOL._SY355_.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" src="http://ecx.images-amazon.com/images/I/51ip3R4WBOL._SY355_.jpg" height="200" width="200" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">KFD universal network adapter, 5V 3A power supply that works well with the Banana Pi M3 (Also comes with a bunch of adapters, so can be used for other projects as well)</td></tr>
</tbody></table>
<u><b>Note:</b></u> When you are buying a power supply, make sure you get the right adapter at the end! Refer to <a href="https://bananapi.gitbooks.io/bpi-m3/content/bpim3powerinterface.html" target="_blank">BPi M3 DC Power Interface</a>.<br />
<br />
<h3>
2.5" Hard Drives</h3>
At least using the latest Debian Jessie (8.4) hot plugging of HDDs is allowed (the raspberry Pi B reboots if you connect a HDD as it creates a power surge). Using my DC power jack cable I can have a <a href="http://www.amazon.de/gp/product/B00MBLX332/ref=as_li_tl?ie=UTF8&camp=1638&creative=19454&creativeASIN=B00MBLX332&linkCode=as2&tag=ubuntuhakblog-21" rel="nofollow" target="_blank">2 TB 2.5" Seagate HDD</a> connected and powered via one of the USB ports. Of course, it can be connected and powered via the SATA connector as well.<br />
<b><br /></b>
<b>Writing to the Hard Drive</b><br />
Copying over via Gigabit Ethernet from my Linux laptop I got an average speed of 14.6 MB/s. This was roughly the same when copying from Windows as well.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinFymSzoreOyvVRHIlteofMmdXQmnuL7lMzUyMX8AAelkL8QOmocjF1eKNkg2mrNh-nXJTMWGRlOOI03UJpFAvDC_AZzinYlq2y8n2IkLfr9PUHnOsNQePXhTprz7sl2Bg9Bt5rfEQuR8/s1600/Screenshot+from+2016-04-22+19-59-40.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="14.6 MB/s write speed to HDD" border="0" height="80" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEinFymSzoreOyvVRHIlteofMmdXQmnuL7lMzUyMX8AAelkL8QOmocjF1eKNkg2mrNh-nXJTMWGRlOOI03UJpFAvDC_AZzinYlq2y8n2IkLfr9PUHnOsNQePXhTprz7sl2Bg9Bt5rfEQuR8/s320/Screenshot+from+2016-04-22+19-59-40.png" title="Write speed to HDD" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Write speed to 2.5" Seagate HDD via Gigabit LAN connection. 14.6 MB/s</td></tr>
</tbody></table>
<div class="de1">
</div>
<div class="de1">
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><img border="0" height="65" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhYxlrjqcKLGynmNa58zDzBS4XT4GudG6GpQmSUhp4ZFJFqPW0boapJ2FLxyO0mpG5SN0DwNZDOSgbba_MMm3ugC_syDGvy-n1ce2IRRw4xwDNt1nzol8VJN8fTTzAfLqMogEkHqw9HaG8/s320/Screenshot+from+2016-04-24+22-35-20.png" style="margin-left: auto; margin-right: auto;" width="320" /></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Write speed to 2.5" Seagate HDD EncFS conatined via Gigabit LAN connection. 5.7 MB/s</td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<div style="text-align: center;">
</div>
<span style="font-family: inherit;"><b>Readi<span style="font-family: inherit;">ng from the Hard Dr<span style="font-family: inherit;">ive</span></span></b></span><br />
Again, copying to my laptop from the HDD via gigabit Ethernet connection resulted in read speeds close to that of the write speed, 13.3 MB/s. Interesting that it is lower than the write speed, I assume it is just some fluctuation and that it is the same, limited by the USB connection. The Read speed from the EncFS container was not severely affected, it was around 9 MB/s.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDmEAvsvWpN7OiJvxMB93WY_pTO9NRWy6WYRSKjHfqlMk_pSaDmKMSZm1T3x1eM6A2EC_MHgj-ncKIXFT06sOOom5ru42TKAfHKmkuXza8fHZ9PBopZjKBCPy-KSeOwQbs-drKpbBaQ4E/s1600/Screenshot+from+2016-04-24+22-39-49.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Read speed of 13.3 MB/s" border="0" height="78" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjDmEAvsvWpN7OiJvxMB93WY_pTO9NRWy6WYRSKjHfqlMk_pSaDmKMSZm1T3x1eM6A2EC_MHgj-ncKIXFT06sOOom5ru42TKAfHKmkuXza8fHZ9PBopZjKBCPy-KSeOwQbs-drKpbBaQ4E/s320/Screenshot+from+2016-04-24+22-39-49.png" title="Read Speed from unencrypted HDD" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Read speed from 2.5" Seagate HDD via Gigabit LAN connection. 13.3 MB/s</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRzAV35Ygt1J9akYR5GE5B_u59rM5QWCozxRCAoh1BU7djxcJ92cc9O8Os6ikx1_swH_-pZ0J7A7AXl9ltJcbR1R6ckcmTwf4WW6uzYG7KYH3aOsp1d702usrMTmuqu1Ovc_oC_HyelgQ/s1600/Screenshot+from+2016-04-24+22-55-05.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Read speed of 8.7 MB/s from EncFS" border="0" height="72" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjRzAV35Ygt1J9akYR5GE5B_u59rM5QWCozxRCAoh1BU7djxcJ92cc9O8Os6ikx1_swH_-pZ0J7A7AXl9ltJcbR1R6ckcmTwf4WW6uzYG7KYH3aOsp1d702usrMTmuqu1Ovc_oC_HyelgQ/s320/Screenshot+from+2016-04-24+22-55-05.png" title="EncFS" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Read speed from 2.5" Seagate HDD EncFS conatner via Gigabit LAN connection. 8.7 MB/s</td></tr>
</tbody></table>
<br />
<br />
<span class="co0"><span style="font-family: inherit;"><u><b>Note:</b></u> Possible hardware "bug" is that after powering down the board, the HDD is still powered on, whether it is<span style="font-family: inherit;">connected via the S<span style="font-family: inherit;">ATA o<span style="font-family: inherit;">r the USB port</span></span></span>. Only <span style="font-family: inherit;">wa<span style="font-family: inherit;">y</span> to power down the HDD is to disconnect it from the board</span>. Furthermore, <span style="font-family: inherit;">if the board is powered down, USB HDD is plugged it, even though the HDD power<span style="font-family: inherit;">s up automatically, the board won't power up. The HDD has to be disconnected, the board started and finally the HDD can be plugged in again.</span></span></span></span><br />
<br />
<span class="co0"><span style="font-family: inherit;"><b>Encrypt<span style="font-family: inherit;">ed Hard Drive</span> </b></span></span></div>
<div class="de1">
<br /></div>
<div class="de1">
<span class="co0"><span style="font-family: inherit;">Connecting
the drive with the new power supply was easy and <span style="font-family: inherit;">the BP<span style="font-family: inherit;">i M3 </span></span>recognized
it straight away. <span style="font-family: inherit;">T</span>he two options I am still considering for <span style="font-family: inherit;">encryption</span> are,</span></span></div>
<ul>
<li><span class="co0"><span style="font-family: inherit;"><b><a href="https://veracrypt.codeplex.com/" target="_blank">veracrypt</a></b> (after Truecrypt has been discontinued)<br /><span style="font-family: inherit;">I have managed to install <span style="font-family: inherit;">the command line version of it to the BPi M3 without problem<span style="font-family: inherit;"> and could mount the 2 TB HDD. The write speed over Samba shares <span style="font-family: inherit;">has spiked and then quickly d<span style="font-family: inherit;">ropped to 0 <span style="font-family: inherit;">in all my tests<span style="font-family: inherit;"> and <span style="font-family: inherit;">eventually got interrupted. This seemed like a dead en<span style="font-family: inherit;">d and I didn't test any fur<span style="font-family: inherit;">ther.</span></span></span></span></span></span></span></span></span></span></span></span></li>
<li><span class="co0"><span style="font-family: inherit;"><b>EncFS</b><br /><span style="font-family: inherit;"><span style="font-family: inherit;">Can be <a href="http://ubuntuhak.blogspot.com/2014/09/how-to-encrypt-files-and-directories-in.html" target="_blank">set up relatively simply</a>, however reduces the write speeds to the drive <span style="font-family: inherit;">to 30% of the original</span></span><span style="font-family: inherit;"><span style="font-family: inherit;">. </span></span></span></span></span></li>
</ul>
<span class="co0"><span style="font-family: inherit;">Veracrypt,
as far as I know, offers a higher level of security than an EncFS, however EncFS scales pretty nicely with written data and I
wouldn't need to <span style="font-family: inherit;">convert an <span style="font-family: inherit;">entire </span></span>1.7 TB drive<span style="font-family: inherit;">. (I have used a computer to do it over USB 3.0 and <span style="font-family: inherit;">i</span>t t<span style="font-family: inherit;">ook</span> 14-15 hours) If anyone h<span style="font-family: inherit;">as </span>managed to get decent speeds writing to a Veracrypt containe<span style="font-family: inherit;">r</span>, I would <span style="font-family: inherit;">be happy to hear it!</span></span></span></span><br />
<span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"> </span></span> </span></span><br />
<h2>
Temperatures</h2>
The CPU can be clocked up to 1.8 GHz dynamically, depending on the load, whereas the minimum running frequency is 480 MHz. Of course, the higher the load on the CPU, the higher the frequency will be scaled by cpufreq and consequently it will get hotter.<br />
<br />
<b>
</b>
The CPU gets pretty hot just by idling, so some sort of cooling is advised, if not compulsory. The idle temperature I got was around 53 degrees C. Temporarily I was using a small externally powered USB fan, but then decided to get a small heat sink from Amazon, which has proven to work well on my Raspberry Pi B previously. 14 x 14 mm heat sink fits perfectly on the CPU.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-o8ezIO_r_kmwwGsDelvZcS9GMWgf_XrVCsuHuOW-Ak7kJ6u53ouqOn0o9B5iZXwByqrr4TOB9NbUPQJLQuU59zPNe62TcCOJe4KsoPJ0hNTKUiUTHnw972abGHM3vMmRAGrdQlq35vA/s1600/IMG_20160415_184610.jpg" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="14 x 14 mm black aluminium heat sink from Amazon" border="0" height="295" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj-o8ezIO_r_kmwwGsDelvZcS9GMWgf_XrVCsuHuOW-Ak7kJ6u53ouqOn0o9B5iZXwByqrr4TOB9NbUPQJLQuU59zPNe62TcCOJe4KsoPJ0hNTKUiUTHnw972abGHM3vMmRAGrdQlq35vA/s400/IMG_20160415_184610.jpg" title="Banana Pi M3 board with a heat sink added on the CPU" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Banana Pi M3 board with a heat sink added on the CPU</td></tr>
</tbody></table>
<h3>
<b>
Passive cooling</b></h3>
With the small Aluminium heat sink the CPU's temperature started off at 40 C and then slowly rose to 52 C when idle. Running an apt-get update has ramped up this temperature to 57 C. Therefore, I'm planning on buying a small plastic case where I can fit the Banana Pi M3, a 2.5" HDD and also a cooling fan that can be powered with under 5 V (to reduce speed and collateral noise).<br />
<br />
Heat sink of my choice (as visible on the picture above) is from <a href="http://www.amazon.de/gp/product/B00VG1VF7Y/ref=as_li_tl?ie=UTF8&camp=1638&creative=19454&creativeASIN=B00VG1VF7Y&linkCode=as2&tag=ubuntuhakblog-21" target="_blank">Amazon.de</a>. The dimensions 14 x 14 mm fit the processor perfectly, so feel free to buy anything you deem fit.<br />
<br />
<h3>
<b>
Software solution</b></h3>
CPU scaling is a "soft" solution that can be applied and I also recommend this. The frequency of the cores can be scaled from 480 MHz to 1.8 GHz. However, if you want to run all 8 cores at 1.8 GHz, you need forced cooling (fan), otherwise cpufreq throttles back the frequency and perhaps also shuts off some cores.<br />
<br />
With my heat sink and limiting the CPU frequency to 1 GHz, the CPU gets to 53 C during a simple apt-get upgrade.<br />
<br />
Maxing out all the 8 cores, with my CPU cooler heat sink I got up to 67 C at 1 GHz. Since it was 2 a.m., I decided to put a fan nearby and set the maximum frequency to 1.6 GHz to speed up compiling. This has reached a steady temperature of 51 C, however I have to say this is not sustainable as the small USB fan I am using is annoyingly loud. With the same fan and process, at 1 GHz the CPU stabilizes at 40C. A moderate 1 GHz should be roughly the maximum one could use with some heat sink, without forced cooling. Without one, I would perhaps go as low as 700 MHz to avoid overheating. Operating with default settings and no heat sink or cooling, the CPU easily reaches 65 C where it gets throttled back.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwKWJrUjW_qTOHLZSd4XDuJHcM-JAJrBO-qF9AjsP2kXehC9AG6YmUIlkH-pxVnBGlUKNJXiabOOg2eNc6nmmokq8K1BbGjjvqCeirglmsCE7TExLJfXhXlVZSMGmgDv8GBO6lMKeaQtA/s1600/Screenshot+from+2016-04-17+02-22-57.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Maxing out all 8 cores" border="0" height="300" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiwKWJrUjW_qTOHLZSd4XDuJHcM-JAJrBO-qF9AjsP2kXehC9AG6YmUIlkH-pxVnBGlUKNJXiabOOg2eNc6nmmokq8K1BbGjjvqCeirglmsCE7TExLJfXhXlVZSMGmgDv8GBO6lMKeaQtA/s400/Screenshot+from+2016-04-17+02-22-57.png" title="Maxing out all 8 cores" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Maxing out all 8 cores (set to 1.6 GHz) while compiling Kodi from source</td></tr>
</tbody></table>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSz8VA_JMAH-V0Rn1Nasj9Lpv3raYrnfL6ybZSG3Cx-3VVQwtnOhElS4AQygcgaqMg-hrf2E0N9DSVzOvbu4jnI0cWLx-qifSFR-HTr2j-189TOgyDWxo5RrGcNpSlCExtZCAW0iLKUAg/s1600/Screenshot+from+2016-04-17+02-30-32.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="1.6 GHz with heat sink and fan 51 C" border="0" height="65" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEgSz8VA_JMAH-V0Rn1Nasj9Lpv3raYrnfL6ybZSG3Cx-3VVQwtnOhElS4AQygcgaqMg-hrf2E0N9DSVzOvbu4jnI0cWLx-qifSFR-HTr2j-189TOgyDWxo5RrGcNpSlCExtZCAW0iLKUAg/s400/Screenshot+from+2016-04-17+02-30-32.png" title="1.6 GHz with heat sink and fan 51 C" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">CPU at 1.6 GHz heats to 51 C when using heat sink and USB fan cooling maxing out all 8 cores </td></tr>
</tbody></table>
My final setting is 1 GHz with just the heat sink, no fan. If the temperature gets to 65 C, the OS throttles the cores back. However, this only happens if all 8 cores are running at 100% e.g. when compiling stuff from source.<br />
<br />
<h3>
Is it worth to get a heat sink?</h3>
Well. What I have observed is that without the heat sink the CPU's temperature spikes within seconds over 60C when maxing out all cores. Compared to this, with heat sinks it has a larger thermal mass, and some additional heat transfer to the ambient air and therefore a more smooth heating up and cooling down. I would say it is a slight improvement, especially if only spikes happen on the CPU and not running continuously at 100%.<br />
<br />
If the plan is to use a fan, I would say there is no need to spend money on such a small heat sink.<br />
<div style="text-align: justify;">
In general, getting a heat sink is most likely not needed at all. I would not buy it again, instead I would simply limit the CPU frequency and trust the device (since it should be built in such a way that it doesn't melt when I use it, right?).</div>
<br />
<h2>
<span class="co0"><span style="font-family: inherit;">Troub<span style="font-family: inherit;">l<span style="font-family: inherit;">eshooting</span></span></span></span></h2>
<span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">There were s<span style="font-family: inherit;">ome issues while installing and configuring, I hope my experience will help others resolve<span style="font-family: inherit;"> their problems quicker!</span></span></span></span></span></span></span><br />
<span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"> </span></span></span> </span></span></span></span><br />
<h3>
<span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">Welcome to Emergency mode!</span></span></span></span></h3>
<div class="separator" style="clear: both; text-align: center;">
<a href="http://i.stack.imgur.com/7Dhyo.jpg" imageanchor="1" style="margin-left: 1em; margin-right: 1em;"><img alt="Welcome to emergency mode" border="0" src="http://i.stack.imgur.com/7Dhyo.jpg" height="300" title="Emergency mode" width="400" /></a></div>
<br />
<span class="co0"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;"><span style="font-family: inherit;">If there is an entry in /etc/<span style="font-family: inherit;">fstab that cannot be executed at boot, the boot <span style="font-family: inherit;">from the flash storage will fail. E.g. if you define a HDD in /etc/fstab and then try to boot without it connected, the Banana pi won't boot. Commenting it out in <span style="font-family: inherit;">fstab resolves the problem otherwise you are greeted with the "Welcome in emergency mode" message. <span style="font-family: inherit;">(<a href="https://forum.manjaro.org/index.php?topic=7424.0" target="_blank">source</a>)</span></span></span></span></span></span></span></span></span><br />
<br />
<br />
As usual, if you have any questions, do not hesitate to ask. Also, if you have any cool project going on with the Banana Pi (and/or have managed to get Kodi running), I would be happy to hear it!</div>
<div style="text-align: justify;">
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-36325631509989884152016-04-30T07:57:00.000+01:002016-04-30T07:57:15.839+01:00"Invalid VPN secret" and only "add PPTP" in Network-manager<div style="text-align: justify;">
I will give the solution here to 2 annoying problems that I have encountered in Ubuntu 16.04 with VPN settings. </div>
<div style="text-align: justify;">
<br /></div>
<h2 style="text-align: justify;">
Problem</h2>
<div style="text-align: justify;">
<i>The VPN connection to ... has failed because of invalid VPN secrets.</i></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<i>Network manager has no option to add openVPN, only point to point tunneling protocol connections.</i></div>
<div style="text-align: justify;">
<br /></div>
<h2 style="text-align: justify;">
Solution</h2>
<div style="text-align: justify;">
These two issues are related, or I strongly assume, and the solution is to install some packages,</div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "Courier New",Courier,monospace;">sudo apt-get install network-manager-openvpn network-manager-openvpn-gnome
network-manager-pptp
network-manager-vpnc</span></div>
</blockquote>
<div style="text-align: justify;">
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV4NVeQGpkw1nVv52yqLg0vc7psVAYvZoJwnoWpDpaQI89yEnX4-XjTy3Rg7qXbQinm-BIeElHQElfG8ihMyX3x3QwM0bMtOfh-GpeFxctTEhdmXcWhtX0yDk30jsQCe0I0yC6u0CGJyk/s1600/Screenshot+from+2016-04-30+08-43-19.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="OpenVPN appears in network manager after installing selected packages" border="0" height="308" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjV4NVeQGpkw1nVv52yqLg0vc7psVAYvZoJwnoWpDpaQI89yEnX4-XjTy3Rg7qXbQinm-BIeElHQElfG8ihMyX3x3QwM0bMtOfh-GpeFxctTEhdmXcWhtX0yDk30jsQCe0I0yC6u0CGJyk/s320/Screenshot+from+2016-04-30+08-43-19.png" title="OpenVPN in network-manager" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">After installing the above packages, OpenVPN is back in the network manager.</td></tr>
</tbody></table>
<div style="text-align: justify;">
To aply changes you may have to restart the network manager with</div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "Courier New",Courier,monospace;">sudo service network-manager restart </span></div>
</blockquote>
<div style="text-align: justify;">
or simply reboot your computer. </div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Thanks to <a href="http://askubuntu.com/questions/760664/ubuntu-16-04-openvpn" target="_blank">askubuntu.com</a>. You can also set up easily a <a href="https://www.google.com/url?sa=t&rct=j&q=&esrc=s&source=web&cd=1&cad=rja&uact=8&ved=0ahUKEwj8-vH93rXMAhUDCpoKHcQBBnwQFggdMAA&url=http%3A%2F%2Fubuntuhak.blogspot.com%2F2014%2F11%2Fvpn-autoconnect-at-startup-in-ubuntu.html" target="_blank">VPN autoconnect at boot</a> after this.</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-2026981867840562112016-02-14T18:52:00.000+00:002016-02-14T18:52:09.430+00:00ownCloud 8.1 APCu Memcache error<div style="text-align: justify;">
Yet another error I encountered while tweaking my ownCloud installation on my VPS at <a href="https://billing.internetovizija.com/?affid=437" target="_blank">time4vps.eu</a>. I was trying to enable the APCu memory caching to improve performance on my ownCloud 8.1 running with php 5.5.9 on an Ubuntu 14.04 server. </div>
<h2 style="text-align: justify;">
Problem </h2>
<div style="text-align: justify;">
I was following the guide and instructions found under <a href="https://doc.owncloud.org/server/8.1/admin_manual/configuration_server/caching_configuration.html" target="_blank">doc.owncloud.org</a>, however I quickly encountered a problem. Upon installing php5-apcu with</div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "Courier New",Courier,monospace;">sudo apt-get install php5-apcu </span></div>
</blockquote>
<div style="text-align: justify;">
and enabling it as per the guide, I was greeted with a white screen when trying to log in to owncloud. No error messages, it seemed the server just didn't load. No entries in logs under <i>/var/log/</i>. Interesting.</div>
<br />
<h2>
Solution</h2>
<div style="text-align: justify;">
It took me a while to figure out what happened, finally I stumbled upon this <a href="https://github.com/owncloud/core/issues/14386" target="_blank">github issue 14386</a>.</div>
<br />
<div style="text-align: justify;">
Basically it turns out that in Ubuntu 14.04 if you install php5-apcu with <span style="font-family: "Courier New",Courier,monospace;">apt-get install </span>you will get APCu version 4.0.2 and the required version for ownCloud is 4.0.6 at least. Hence you need to remove the one installed form the repository and install a later version manually.</div>
<br />
To check if this is indeed your issue do,<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">sudo dpkg -s php5-apcu</span></blockquote>
This should return the currently installed php5-apcu version. If this is older than 4.0.6 then continue reading.<br />
<ol>
<li>Remove the old APCu version (if installed via apt-get) with<br /><span style="font-family: "Courier New",Courier,monospace;">sudo apt-get remove php5-apcu</span></li>
<li>Go to <i>http://mirrors.kernel.org/ubuntu/pool/universe/p/php-apcu/</i> and copy the link to a version 4.0.6 at least which corresponds with your system's architecture.</li>
<li><span style="font-family: "Courier New",Courier,monospace;">cd /tmp/</span></li>
<li><span style="font-family: "Courier New",Courier,monospace;">sudo wget http://mirrors.kernel.org/ubuntu/pool/universe/p/php-apcu/php5-apcu_4.0.7-1build1~ubuntu14.04.1_amd64.deb</span><br />(since my system is amd64 architecture)</li>
<li><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial,Helvetica,sans-serif;">Install manually with dpkg</span><br />sudo dpkg -i php5-apcu_4.0.7-1build1~ubuntu14.04.1_amd64.deb</span></li>
<li><span style="font-family: "Courier New",Courier,monospace;"><span style="font-family: Arial,Helvetica,sans-serif;">Remove downloaded file</span><br />sudo rm php5-apcu_4.0.7-1build1~ubuntu14.04.1_amd64.deb</span></li>
<li><span style="font-family: inherit;">Restart your apache2 server<br /><span style="font-family: "Courier New",Courier,monospace;">sudo /etc/init.d/apache2 restart</span></span> </li>
</ol>
<b><u>Note:</u></b> Make sure you download the correct .deb file, i.e. amd64 or i386. <br />You can check what kind of system you have with <span style="font-family: "Courier New",Courier,monospace;">uname -a</span>.<br />
<h2>
Additional to ownCloud Caching Guide</h2>
<div style="text-align: justify;">
In addition to the official <a href="https://doc.owncloud.org/server/8.1/admin_manual/configuration_server/caching_configuration.html" target="_blank">doc.ownCloud.org</a> guide you might have to adjust some settings in your /etc/php5/cli/php.ini if your installation is still not working. First check if apc.enable is "On" in your php.</div>
<br />
Check,<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">php -i</span></blockquote>
And look for<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">apc.enable_cli => On => On</span><br /><span style="font-family: "Courier New",Courier,monospace;">apc.enabled => On => On</span></blockquote>
If any of them is Off then this is your problem. Edit your php.ini with,<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">sudo nano /etc/php5/cli/php.ini</span></blockquote>
and copy the following into the file,<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">;;;;;;;;;;;;;;;;;;</span><br /><span style="font-family: "Courier New",Courier,monospace;">;Memory chacing ;</span><br /><span style="font-family: "Courier New",Courier,monospace;">;;;;;;;;;;;;;;;;;;</span><br /><span style="font-family: "Courier New",Courier,monospace;"></span><br /><span style="font-family: "Courier New",Courier,monospace;">;Added manually to enable memory chancing for ownCloud</span><br /><span style="font-family: "Courier New",Courier,monospace;">apc.enable_cli=1</span></blockquote>
Press CTRL+O for saving and CTRL+X for exiting.<br />
<br />
Restart apache with<br />
<blockquote class="tr_bq">
<span style="font-family: inherit;"><span style="font-family: "Courier New",Courier,monospace;">sudo /etc/init.d/apache2 restart</span></span></blockquote>
<div style="text-align: justify;">
It should work now. If not, you can leave me a message and I will do my best to get back to you or you can also join the IRC channel at #owncloud for some help.</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-70209145153343014192016-02-13T14:53:00.001+00:002016-02-13T14:53:10.426+00:00ownCloud "Server Not Installed" Error on Android Client<div class="separator" style="clear: both; text-align: center;">
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: justify;">
I have a server from the guys at <a href="https://billing.internetovizija.com/?affid=437" target="_blank">time4vps.eu</a> where I am running - among other things - an ownCloud instance. It was basically just a learning exercise to get it up and running, maybe invite a few friends if interested. Then I started also looking at certificates from <a href="https://letsencrypt.org/" target="_blank">letsencrypt.org</a> and set up some sub-domains for my server.</div>
<div style="text-align: justify;">
<br /></div>
<h2 style="text-align: justify;">
Issue</h2>
<div style="text-align: justify;">
The point where I ran into an issue was after I set up my sub-domains and the required encryption certificates. For some reason the browser login would work, but on my Android device I got an error from various apps saying,</div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "Courier New",Courier,monospace;">"Server not Installed!"</span></div>
</blockquote>
<div style="text-align: justify;">
This was weird, because desktop clients were syncing with absolutely no problem.</div>
<div style="text-align: justify;">
<br /></div>
<h2 style="text-align: justify;">
Solution</h2>
<div style="text-align: justify;">
I was clueless for a long time and honestly demotivated to fix this, because I wasn't using it so often. Nevertheless, it was bothering me and whenever I logged into my server I remembered that something is broken and needed to be fixed.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
I have spent hours trying to troubleshoot, unfortunately the error logs</div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "Courier New",Courier,monospace;">/var/log/apache2/error.log</span></div>
<div style="text-align: justify;">
<span style="font-family: "Courier New",Courier,monospace;">/var/log/owncloud.log</span></div>
</blockquote>
<div style="text-align: justify;">
were empty or contained nothing related to the issue.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
Finally after some IRC help and searching I stumbled upon the solution at <a href="https://forum.owncloud.org/viewtopic.php?t=14190" target="_blank">forums.owncloud.org</a>,</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
In<span style="font-family: "Courier New",Courier,monospace;"> /var/www/owncloud/config/config.php</span> I had an entry</div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "Courier New",Courier,monospace;">'installed' => 'true',</span></div>
</blockquote>
<div style="text-align: justify;">
this had to be replaced by</div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "Courier New",Courier,monospace;">'installed' => '1',</span></div>
</blockquote>
<div style="text-align: justify;">
I have no clue as to why or how this error occurs, however possible there are some issues with the installation. Nevertheless, after changing this entry and restarting my apache the Android client worked right away.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<u><b>Note:</b></u> Depending on your installation of owncloud <span style="font-family: "Courier New",Courier,monospace;">config.php</span> might be elsewhere, e.g. <span style="font-family: "Courier New",Courier,monospace;">/var/www/config/config.php</span> if you installed it to the "root" web directory.</div>
<div style="text-align: justify;">
Editing the file is done by <span style="font-family: "Courier New",Courier,monospace;">sudo nano /path/to/owncloud/config/config.php</span></div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
I am troubleshooting further to find the true source of the error, but one issue has been fended off.</div>
<div style="text-align: justify;">
<br /></div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-68800494088736996352016-01-06T18:47:00.001+00:002016-04-04T19:32:15.965+01:00Bridged OpenWRT Access Point through PPtP<div style="text-align: justify;">
This will be a guide on how to set up a wireless access point that will forward traffic to a host/primary router (this is referred to as <a href="https://wiki.openwrt.org/doc/recipes/bridgedap" target="_blank">bridged AP</a>) through a <a href="https://en.wikipedia.org/wiki/Point-to-Point_Tunneling_Protocol" target="_blank">PPtP</a> connection. The new AP will be created using a TP-LINK MR3020. All traffic from the second router shall go through the PPtP tunnel, while traffic coming from clients connected to the host router shall remain unaffected.<br />
<br />
<span style="font-size: large;"><b>Contents</b></span><br />
<ul>
<li>Project Description and Aims</li>
<li>Flashing OpenWRT on the MR3020</li>
<li>Configuration over LuCi</li>
<li>Configuration over SSH (including <i>complete</i> config files)</li>
<li>Check Packet Route</li>
<li>Troubleshooting</li>
</ul>
</div>
<h2>
Project Description and Aims</h2>
<div style="text-align: left;">
</div>
<br />
<table cellpadding="0" cellspacing="0" class="tr-caption-container" style="float: left; margin-right: 1em; text-align: left;"><tbody>
<tr><td style="text-align: center;"><a href="http://www.amazon.com/gp/product/B00634PLTW/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B00634PLTW&linkCode=as2&tag=ubuntuhak-20&linkId=5RH5O3XNN7QELTVA" style="clear: left; margin-bottom: 1em; margin-left: auto; margin-right: auto;"><img border="0" src="http://ws-na.amazon-adsystem.com/widgets/q?_encoding=UTF8&ASIN=B00634PLTW&Format=_SL160_&ID=AsinImage&MarketPlace=US&ServiceVersion=20070822&WS=1&tag=ubuntuhak-20" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">TP-LINK MR</td></tr>
</tbody></table>
<img alt="" border="0" src="http://ir-na.amazon-adsystem.com/e/ir?t=ubuntuhak-20&l=as2&o=1&a=B00634PLTW" height="1" style="border: none !important; margin: 0px !important;" width="1" /><br />
<br />
<br />
<div style="text-align: justify;">
Given is a home router with the address 192.168.1.1 that provides internet access and acts as <a href="https://en.wikipedia.org/wiki/Dynamic_Host_Configuration_Protocol" target="_blank">DHCP</a> server on the local network. The task is to set up a secondary router, a TP-LINK MR3020 (<a href="https://www.blogger.com/%3Ca%20%20href=%22http://www.amazon.com/gp/product/B00634PLTW/ref=as_li_tl?ie=UTF8&camp=1789&creative=9325&creativeASIN=B00634PLTW&linkCode=as2&tag=ubuntuhak-20&linkId=4CWKHVRM4GCVVYWG%22%3E" target="_blank">Amazon.com</a>) with the local IP address 192.168.1.2, as a wireless access point (AP) that will bridge the connection over to the main router over the LAN port. Furthermore, all traffic from the secondary router has to go through a <a href="https://en.wikipedia.org/wiki/Point-to-Point_Tunneling_Protocol" target="_blank">PPtP</a> tunnel.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<a href="https://www.privateinternetaccess.com/pages/buy-vpn/UBUNTUHAK001" style="clear: right; float: right; margin-bottom: 1em; margin-left: 1em;" target="_blank"><img alt="PrivateInternetAccess VPN" border="0" src="https://www.privateinternetaccess.com/affiliates/banners/pia-box.png" title="" /></a>If you need a provider that offers PPtP servers, I can recommend <a href="https://www.privateinternetaccess.com/pages/buy-vpn/UBUNTUHAK001" target="_blank">Privateinternetaccess</a> where you will get a great VPN provider with PPtP service included. Perfect for both your everyday VPN needs as well as the given scenario.</div>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
I will assume a stock OpenWRT Chaos Calmer 15.05 on the MR3020, cleanly flashed without any modifications. Configuration is possible via ssh or over <a href="https://wiki.openwrt.org/doc/techref/luci" target="_blank">LuCi</a>, both of which will be shown below. In older and potentially newer versions the LuCi UI may look differently.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO1UJs_xkvX6rufSe5qg-L0JdJ8a9PJ1LlTUsca7BiTq9nvo_38lya7JXP6YLqv2XtjBq1_WA2rTnVGTBOc9faqTxynoyZ-raP_9TqEgpbiBSwQfJM27iO1lamQeQChwvvp0c98TDDoVU/s1600/Bridged_PPtP_AP.png" style="margin-left: auto; margin-right: auto;"><img alt="Illustration shown "normal" internet traffic and the sought PPtP traffic" border="0" height="180" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhO1UJs_xkvX6rufSe5qg-L0JdJ8a9PJ1LlTUsca7BiTq9nvo_38lya7JXP6YLqv2XtjBq1_WA2rTnVGTBOc9faqTxynoyZ-raP_9TqEgpbiBSwQfJM27iO1lamQeQChwvvp0c98TDDoVU/s320/Bridged_PPtP_AP.png" title="" width="320" /></a></td></tr>
<tr align="justify"><td class="tr-caption"><span style="color: #0000ee;"><span style="color: black;">Illustration of the sought network setup. The blue line </span><span style="color: #0000ee;"><span style="color: black;">illustrates "normal" internet traffic originating from the host router whereas the </span><span style="color: #0000ee;"><span style="color: black;">orange line shows PPtP tunnelled traffic coming from the OpenWRT router and clients connected to it.</span> [<a href="https://wiki.openwrt.org/_media/doc/recipes/bridged.ap_v3.png" target="_blank">picture source</a>] </span></span></span></td></tr>
</tbody></table>
</div>
<div class="separator" style="clear: both; text-align: center;">
</div>
<div style="text-align: justify;">
<b>Host (or primary) router</b><br />
<i>WiFi Network ==> Internet</i><br />
<br />
<b>Router 2</b><br />
<i>WiFi Network ==> </i><i><i>PPtP <span style="color: red;">enter</span> </i> ==> </i><i><i>LAN interface </i>==> Host (primary) router ==> Internet (tunnel transmit) ==> PPtP (server) <span style="color: red;">exit</span> ==> Internet </i><br />
<br />
<h2>
Flashing OpenWRT on the MR3020</h2>
This is covered in detail on e.g. <a href="https://wiki.openwrt.org/toh/tp-link/tl-mr3020" target="_blank">OpenWRT wiki MR3020</a> page<span style="color: #0000ee;"><span style="color: black;">, hence I will not go through this.</span></span><br />
<span style="color: #0000ee;"><span style="color: black;"><br />
</span></span> Once OpenWRT is installed on your router, connect to it via an ethernet cable. The router should handle DHCP, meaning your ethernet port should get an IP address automatically, however if you still have your IP configured to static from flashing the router, that will work too.<br />
<br /></div>
<h2 style="text-align: justify;">
Configuration over LuCi</h2>
<div style="text-align: justify;">
<a href="https://wiki.openwrt.org/doc/techref/luci" target="_blank">LuCi</a> is technically the UI overlay of OpenWRT that can be reached via 192.168.1.1 by default on a new installation and allows easy configuration via a visual interface. Since the MR3020 has only a single LAN port, the installation is slightly different that it would be with other routers. Essentially the procedure is the following,</div>
<div>
<br />
<ol>
<li>Make an initial connection to the router via an ethernet cable</li>
<li>Adjust the LAN interface such that it will have access to the internet through the host router</li>
<li>Set up WiFi network</li>
<li>Disconnect your computer from the router and connect it to the primary router</li>
<li>Connect to the OpenWRT router via WiFi</li>
<li>Install ppp-mod-pptp package (<i>This provides PPtP support, which is not installed by default</i>)</li>
<li>Add vpn (PPtP) interface</li>
<li>Edit again the LAN interface to bridge all 3 networks</li>
<li>Set up forwarding and firewall rules</li>
<li>Reboot, if necessary.</li>
</ol>
<h3>
Step 1.</h3>
In your web browser navigate to 192.168.1.1 (by default) and log in using the default credentials,<br />
Username: <b>root</b><br />
Password: <b>admin</b><br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQQMK_jAhA1QG5HfC3EKjvkYSQNuY7F7uDQZ4URuTUC4R8VKlmLg-UTxwtj-v7mGgT-darDfsXVSxlb523BFsYNy6qkHyYqB9VQPYf3CNHTmd9fjweG5UrEuLTSCj0mc8EvGov5lQNlfg/s1600/Screenshot+-+030116+-+14%253A08.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="OpenWRT Authorization" border="0" height="193" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhQQMK_jAhA1QG5HfC3EKjvkYSQNuY7F7uDQZ4URuTUC4R8VKlmLg-UTxwtj-v7mGgT-darDfsXVSxlb523BFsYNy6qkHyYqB9VQPYf3CNHTmd9fjweG5UrEuLTSCj0mc8EvGov5lQNlfg/s320/Screenshot+-+030116+-+14%253A08.png" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">OpenWRT LuCi login page by default under 192.168.1.1 in your web browser.</td></tr>
</tbody></table>
<h3>
Step 2.</h3>
Go to Network/Interfaces and click Edit for the LAN interface. This should be the only one available with the MR3020. Fill it out as shown below, according to the previously discussed network specifications.<br />
<b>Primary router (gateway):</b> 192.168.1.1<br />
<b>OpenWRT (secondary router):</b> 192.168.1.2<br />
<b>IPv4 netmask:</b> 255.255.255.0<br />
<b>Use custom DNS servers:</b> 192.168.1.1<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTX2mO2SYCTQDJ9Dyph4x9e8YONP_wA8KvJB2xlbAJobd7syeNSeES9lWb0-LymaM62Rt3CFc1blUo7j3vsGU38ZMBvcdGDZjP8yxK8OpVqaBwhwljrAnIgzJ9xxRjJI_7v6_VP4acOxY/s1600/Screenshot+-+030116+-+01%253A22%253A01.png" style="margin-left: auto; margin-right: auto;"><img alt="LAN interface general setup for the given scenario." border="0" height="202" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjTX2mO2SYCTQDJ9Dyph4x9e8YONP_wA8KvJB2xlbAJobd7syeNSeES9lWb0-LymaM62Rt3CFc1blUo7j3vsGU38ZMBvcdGDZjP8yxK8OpVqaBwhwljrAnIgzJ9xxRjJI_7v6_VP4acOxY/s320/Screenshot+-+030116+-+01%253A22%253A01.png" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">LAN interface General setup using a primary router with the address 192.168.1.1 and the OpenWRT router as 192.168.1.2.</td><td class="tr-caption" style="text-align: center;"><br /></td><td class="tr-caption" style="text-align: center;"><br /></td></tr>
</tbody></table>
<h3>
Step 3.</h3>
Go to Network/WiFi and click Edit. This section is self-explanatory and the configuration settings have no effect on the working of the bridged AP & PPtP. The only important thing here is to assign the WiFi interface to the LAN zone at the bottom of the page, as shown below.<br />
<div class="separator" style="clear: both; text-align: center;">
</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB5y0AwrC70Nky5OCoyjxVNUg3jdKnEI9ZpTx7JDQsjJeqJS5CkNuuQbYbBxeOgOdl67Unu3gFO_6VaB_omo8P2F4YAV8q7tTvEHwwRVSsNXDJt6O1dY49J_gAptEhm50xwkEn2aGZj3U/s1600/Screenshot+-+060116+-+01%253A13%253A04.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="WiFi Interface, added to LAN zone." border="0" height="174" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiB5y0AwrC70Nky5OCoyjxVNUg3jdKnEI9ZpTx7JDQsjJeqJS5CkNuuQbYbBxeOgOdl67Unu3gFO_6VaB_omo8P2F4YAV8q7tTvEHwwRVSsNXDJt6O1dY49J_gAptEhm50xwkEn2aGZj3U/s320/Screenshot+-+060116+-+01%253A13%253A04.png" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">WiFi interface configuration. Make sure it is added to the LAN zone.</td></tr>
</tbody></table>
<br />
In the Advanced tab you can set the country where you are, which will impact on what WiFi channels you are allowed to use due to local regulations. Another thing that can be set is a Distance Optimization, which will help you adjust the signal strength based on the furthest device.<br />
<br />
<h3>
Step 4.</h3>
Save the settings and connect your OpenWRT router via an ethernet cable to one of the LAN ports (not WAN) of your primary router. Disconnect power if you have to, after saving the settings should remain stored.<br />
<br />
<h3>
Step 5.</h3>
Connect to your newly created WiFi network and in your browser navigate to 192.168.1.2 where you can log in.<br />
<br />
<h3>
Step 6.</h3>
Go to <i>System/Software</i> and click "<i>Update</i>". Then make a search for "<i>pptp</i>" and from the results install the package called <i>ppp-mod-pptp</i>. Refer to the picture below. (Funnily, when searching directly for ppp-mod-pptp I received no search results...)<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPPhqrZF8kackG2LxqB122sZsh2oe1tDBzUVo9Ohyphenhyphen_bLiVeYokN19uIuS8iYN1OgI9ZdoUVSbWSYLNLT8XMMUmhxRMb7u9LBynNYZU8YewJCBY-phEmfPJfO2ullSdlfALget4lySpPM4/s1600/Screenshot+-+060116+-+17%253A56%253A39.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Available packages containing pptp" border="0" height="163" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhPPhqrZF8kackG2LxqB122sZsh2oe1tDBzUVo9Ohyphenhyphen_bLiVeYokN19uIuS8iYN1OgI9ZdoUVSbWSYLNLT8XMMUmhxRMb7u9LBynNYZU8YewJCBY-phEmfPJfO2ullSdlfALget4lySpPM4/s320/Screenshot+-+060116+-+17%253A56%253A39.png" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Install the ppp-mod-pptp package from the results list.</td></tr>
</tbody></table>
<h3>
Step 7.</h3>
Go to <i>Network/Interfaces</i> and <i>Add New</i> interface for the vpn with protocol PPtP then click "<i>Edit</i>".<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_gsCPDaKqRJgwwL5OcWSJD6Cb85LlD7CdvsocrWmgYUdLv6Paj2CiU2EWMXBfwCRwuOzQjcuX-wM4uwlO_SHPxpiAJw_FKmMCO4kFsRXVEqV204y-y8LnO5Rhw42Kc2ri71pJy7DBTPU/s1600/Screenshot+-+060116+-+01%253A25%253A45.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="87" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEj_gsCPDaKqRJgwwL5OcWSJD6Cb85LlD7CdvsocrWmgYUdLv6Paj2CiU2EWMXBfwCRwuOzQjcuX-wM4uwlO_SHPxpiAJw_FKmMCO4kFsRXVEqV204y-y8LnO5Rhw42Kc2ri71pJy7DBTPU/s320/Screenshot+-+060116+-+01%253A25%253A45.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Create Interface. Name it e.g. vpn and select PPtP protocol.</td></tr>
</tbody></table>
While editing, fill out the fields,<br />
<br />
<blockquote class="tr_bq">
<b>VPN server</b> (IP address or domain name)<br />
<b>Username</b><br />
<b>Password</b></blockquote>
<br />
You should obtain this information from your service provider.<br />
<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSwbFqy9XRHXY4XnjN-rBx7I0c914PI1wjqe26xEA48FYGPeJrFHKFaFMNxlHZC3Al87NsjFtel78Ls3xFIBk9tG-orwkgFTKdoJjXBbzvhUkiv8_sOOJ39hOL3V98tUXzFiVV_MPfH80/s1600/Screenshot+-+060116+-+01%253A23%253A38.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="PPtP settings" border="0" height="165" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhSwbFqy9XRHXY4XnjN-rBx7I0c914PI1wjqe26xEA48FYGPeJrFHKFaFMNxlHZC3Al87NsjFtel78Ls3xFIBk9tG-orwkgFTKdoJjXBbzvhUkiv8_sOOJ39hOL3V98tUXzFiVV_MPfH80/s320/Screenshot+-+060116+-+01%253A23%253A38.png" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">PPtP setting when adding the new VPN interface.</td></tr>
</tbody></table>
When done, click save.<br />
<br />
<h3>
Step 8.</h3>
Since a new interface was just added, the LAN interface has to be edited again to bridge 3 interfaces in total (so far it is bridging only LAN and the WiFi). Go to <i>Network/Interfaces</i> and edit the LAN interface. Navigate to the <i>Physical settings tab</i> and make sure to <u>bridge all 3 networks</u> available: <i>eth0</i>, <i>gretap0</i> and the <i>WiFi</i> interface. The end result should look similar to the following.<br />
<br /></div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGL1x2h2TVASYIJ45xRJnK48trXB5J4OA6v_P6U31oArqk2JYS_DDs9eLAoUbSJyP5pgmZCuQd1zhGyml4WJLR9JfRu7VgxT3ffMHRfeiRQI9Z2AIhN66NMGOFF0rOMpBP0rp1vQdEqrY/s1600/Screenshot+-+030116+-+01%253A20%253A03.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="LAN physical interface configuration tab common settings." border="0" height="185" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjGL1x2h2TVASYIJ45xRJnK48trXB5J4OA6v_P6U31oArqk2JYS_DDs9eLAoUbSJyP5pgmZCuQd1zhGyml4WJLR9JfRu7VgxT3ffMHRfeiRQI9Z2AIhN66NMGOFF0rOMpBP0rp1vQdEqrY/s320/Screenshot+-+030116+-+01%253A20%253A03.png" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">LAN interfaces Physical settings tab. All 3 interfaces, Ethernet, Wireless and PPtP (gre0 or gretap0) must be ticket at the bridge.</td></tr>
</tbody></table>
<h3>
Step 9.</h3>
Navigate to <i>Network/Firewall </i>settings and click <i>Add</i> at the bottom of the page to add a new zone for the vpn. Set it up as,<br />
<blockquote class="tr_bq">
<b>Input:</b> reject<br />
<b>Output:</b> accept<br />
<b>Forward:</b> reject<br />
<b>Masquerading: </b>Yes<br />
<b>Covered network:</b> vpn (or as you called it in Step 7.)</blockquote>
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8pm_GpdLjnaG6annClKvjEDL-Sb9-ZSQux8gFyuabW2sJgmEWaKpF8pTrFhynHhhBt_BRH4OghJc4gXk2s8PbS5mohlYmzvDcmG3P3-1aWdel5oiddlH673zOxBKp3J8nYxxBCAi8QZE/s1600/Screenshot+-+030116+-+14%253A16%253A46.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="New firewall zone settings for the vpn interface" border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi8pm_GpdLjnaG6annClKvjEDL-Sb9-ZSQux8gFyuabW2sJgmEWaKpF8pTrFhynHhhBt_BRH4OghJc4gXk2s8PbS5mohlYmzvDcmG3P3-1aWdel5oiddlH673zOxBKp3J8nYxxBCAi8QZE/s320/Screenshot+-+030116+-+14%253A16%253A46.png" title="" width="313" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">New firewall zone settings for the vpn interface.</td></tr>
</tbody></table>
When done, save changes and the following should be present in the Firewall zones.<br />
<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3rPmrfgQ1FLX5u7hyphenhyphenS4vg_PxD_2eBy9bW2Sq0fW_EqPy3BzG9VguPmzenMt9l1Mwg7_XcaU74jCMUJLHErhQqrmoy3Nx5Gyk-EBIbLzem74xXNIeIveInJUKtABbUF66LH49007G-R_E/s1600/Screenshot+-+030116+-+01%253A30%253A27.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Firewall Zones settings" border="0" height="101" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEi3rPmrfgQ1FLX5u7hyphenhyphenS4vg_PxD_2eBy9bW2Sq0fW_EqPy3BzG9VguPmzenMt9l1Mwg7_XcaU74jCMUJLHErhQqrmoy3Nx5Gyk-EBIbLzem74xXNIeIveInJUKtABbUF66LH49007G-R_E/s320/Screenshot+-+030116+-+01%253A30%253A27.png" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Firewall Zones settings.</td></tr>
</tbody></table>
<div style="text-align: justify;">
<h3>
Step 10.</h3>
If changes did not take immediately effect, reboot router. Make sure to save all changes first!<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiClnpyM-3ghLQly5JK3XbavE7nFtdxxXJTWMqixIDd8ugKzue-WDi8mi9lhUkjc9wyRHU_E6__rslLSzZ438PvDPtMuEgoXVfZwZQ9raWIZ-vkjM1FOD7YHabcw_OuPOOXJjz3mo0x8sk/s1600/Screenshot+-+060116+-+01%253A18%253A11.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img alt="Reboot OpenWRT" border="0" height="153" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEiClnpyM-3ghLQly5JK3XbavE7nFtdxxXJTWMqixIDd8ugKzue-WDi8mi9lhUkjc9wyRHU_E6__rslLSzZ438PvDPtMuEgoXVfZwZQ9raWIZ-vkjM1FOD7YHabcw_OuPOOXJjz3mo0x8sk/s320/Screenshot+-+060116+-+01%253A18%253A11.png" title="" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Reboot OpenWRT.</td></tr>
</tbody></table>
Just to check that everything works and packets are going through the PPtP tunnel, proceed to chapter <b>Check Packet Route</b> below.</div>
<h2 style="text-align: justify;">
Configuring over SSH</h2>
<div style="text-align: justify;">
You will need to edit 3 files in total (assuming again a stock, unmodified OpenWRT installation) to apply all changes required. These are,</div>
<ul>
<li><b>/etc/config/network</b><br />
Holding the general router interface configurations.</li>
<li><b>/etc/config/wireless</b><br />
Responsible for the wireless interface, including WiFi SSID and encryption settings.</li>
<li><b>/etc/config/firewall</b><br />
Responsible for assigning different interfaces into different firewall zones (applies different rules to them) and to allow traffic forwarding between interfaces.</li>
</ul>
<div style="text-align: justify;">
<b><u>Important:</u></b> Basic vi editing skills are required, once again <a href="http://www.lagmonster.org/docs/vi.html" target="_blank">Here</a> is a cheat sheet for your convenience.</div>
<ol>
<li><span style="text-align: justify;">Connect to your OpenWRT router via an ethernet cable and follow the steps from a terminal window.</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">telnet 192.168.1.1</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">passwd</span><br />
This step sets a password for your router (this will also be the password for the LuCi interface if you wish to use that later!) and also disables <span style="font-family: "courier new" , "courier" , monospace;">telnet</span> further on and enables <span style="font-family: "courier new" , "courier" , monospace;">ssh</span>. Use it as <span style="font-family: "courier new" , "courier" , monospace;">ssh root@192.168.1.1<span style="font-family: inherit;"> <span style="font-family: "arial" , "helvetica" , sans-serif;">from this point onwards.</span></span></span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">vi /etc/config/network<br />
<i><span style="font-family: "arial" , "helvetica" , sans-serif;">Add changes to file from section below!</span></i></span></li>
<span style="font-family: "courier new" , "courier" , monospace;"> </span>
<li><span style="font-family: "courier new" , "courier" , monospace;">vi /etc/config/wireless</span><span style="font-family: "courier new" , "courier" , monospace;"><i><span style="font-family: "arial" , "helvetica" , sans-serif;">Add changes to file from section below!</span></i></span></li>
<span style="font-family: "courier new" , "courier" , monospace;"> </span>
<li><span style="font-family: "courier new" , "courier" , monospace;">vi /etc/config/firewall</span><span style="font-family: "courier new" , "courier" , monospace;"><i><span style="font-family: "arial" , "helvetica" , sans-serif;">Add changes to file from section below!</span></i></span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">/etc/init.d/dnsmasq disable<i> </i></span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">reboot</span></li>
<li><span style="font-family: "arial" , "helvetica" , sans-serif;">Disconnect the router from your computer and connect it to the primary router through one of its LAN (not WAN) ports.</span></li>
</ol>
<div style="text-align: justify;">
Copy pasting the settings from below will most likely get you up and running in no time.<br />
<br /></div>
<h3 style="text-align: justify;">
/etc/config/network</h3>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">config interface 'loopback'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option ifname 'lo'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option proto 'static'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option ipaddr '127.0.0.1'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option netmask '255.0.0.0'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">config interface 'lan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option force_link '1'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option type 'bridge'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option proto 'static'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option netmask '255.255.255.0'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option ip6assign '60'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option ipaddr '192.168.1.2'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option gateway '192.168.1.1'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option dns '192.168.1.1'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option delegate '0'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option _orig_ifname 'eth0 wlan0'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option _orig_bridge 'true'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option ifname 'eth0 gretap0'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">config interface 'vpn'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option proto 'pptp'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option server 'IP_OF_YOUR_PPTP_SERVER'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option delegate '0'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option username 'USERNAME'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option password 'PASSWORD'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br /></blockquote>
<h3 style="text-align: justify;">
/etc/config/wireless</h3>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;"> config wifi-device 'radio0'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option type 'mac80211'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option hwmode '11g'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option path 'platform/ar933x_wmac'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option channel 'auto'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option txpower '10'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option country 'DE'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"><br />
config wifi-iface</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option device 'radio0'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option mode 'ap'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option ssid 'NETWORK_SSID'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option encryption 'psk-mixed'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option key 'PASSWORD'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option network 'lan'</span></blockquote>
<br />
<div style="text-align: justify;">
<u><b>Note:</b></u> The <span style="font-family: "courier new" , "courier" , monospace;">wifi-device</span> may be called different on other routers. Usually the <span style="font-family: "courier new" , "courier" , monospace;">config wifi-device</span> section can be left "as is" and the actual wireless SSID and encryption is set up solely in <span style="font-family: "courier new" , "courier" , monospace;">config wifi-iface</span>.<br />
<br /></div>
<h3 style="text-align: justify;">
/etc/config/firewall</h3>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">config defaults</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option syn_flood '1'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option input 'ACCEPT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option output 'ACCEPT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option forward 'REJECT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">config zone</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option name 'lan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option input 'ACCEPT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option output 'ACCEPT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option forward 'ACCEPT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option masq '1'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option network 'lan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">config zone</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option name 'wan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option input 'REJECT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option output 'ACCEPT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option forward 'REJECT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option masq '1'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option mtu_fix '1'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option network 'wan wan6'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">config forwarding</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option src 'lan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option dest 'wan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">config rule</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option name 'Allow-DHCP-Renew'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option src 'wan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option proto 'udp'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option dest_port '68'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option target 'ACCEPT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option family 'ipv4'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">config rule</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option name 'Allow-Ping'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option src 'wan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option proto 'icmp'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option icmp_type 'echo-request'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option family 'ipv4'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option target 'ACCEPT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">config rule</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option name 'Allow-IGMP'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option src 'wan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option proto 'igmp'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option family 'ipv4'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option target 'ACCEPT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">config rule</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option name 'Allow-DHCPv6'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option src 'wan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option proto 'udp'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option src_ip 'fe80::/10'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option src_port '547'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option dest_ip 'fe80::/10'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option dest_port '546'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option family 'ipv6'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option target 'ACCEPT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">config rule</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option name 'Allow-MLD'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option src 'wan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option proto 'icmp'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option src_ip 'fe80::/10'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type '130/0'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type '131/0'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type '132/0'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type '143/0'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option family 'ipv6'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option target 'ACCEPT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">config rule</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option name 'Allow-ICMPv6-Input'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option src 'wan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option proto 'icmp'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'echo-request'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'echo-reply'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'destination-unreachable'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'packet-too-big'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'time-exceeded'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'bad-header'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'unknown-header-type'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'router-solicitation'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'neighbour-solicitation'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'router-advertisement'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'neighbour-advertisement'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option limit '1000/sec'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option family 'ipv6'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option target 'ACCEPT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">config rule</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option name 'Allow-ICMPv6-Forward'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option src 'wan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option dest '*'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option proto 'icmp'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'echo-request'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'echo-reply'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'destination-unreachable'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'packet-too-big'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'time-exceeded'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'bad-header'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> list icmp_type 'unknown-header-type'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option limit '1000/sec'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option family 'ipv6'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option target 'ACCEPT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">config include</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option path '/etc/firewall.user'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">config rule</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option src 'wan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option dest 'lan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option proto 'esp'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option target 'ACCEPT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">config rule</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option src 'wan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option dest 'lan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option dest_port '500'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option proto 'udp'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option target 'ACCEPT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">config zone</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option name 'vpn'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option output 'ACCEPT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option network 'vpn'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option masq '1'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option input 'REJECT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option forward 'REJECT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">config rule</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option target 'ACCEPT'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option src 'lan'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option dest 'vpn'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option name 'VPN'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"> option family 'ipv4'</span></blockquote>
<div style="text-align: justify;">
<br /></div>
<div style="text-align: justify;">
<h2>
Check Packet Route</h2>
<div>
<div>
After the router boots up, one can validate if traffic indeed travels through the PPtP tunnel by,<br />
<ul>
<li><span style="font-family: "courier new" , "courier" , monospace;">traceroute</span> command from your computer once connected to the MR3020</li>
<li>In the LuCi interface under <i>Status/Route</i></li>
<li>In the LuCi interface under <i>Network/Diagnostic/Traceroute</i></li>
</ul>
</div>
<div>
If the configuration was successful the packets should take a route similar to the following:<br />
10.*.*.* ==> 192.168.1.2 ==> 192.168.1.1 ==> ISP and DNS servers</div>
</div>
<h2>
Troubleshooting</h2>
<h3>
Failsafe mode</h3>
Referring to the hardware specific <a href="https://wiki.openwrt.org/toh/tp-link/tl-mr3020#failsafe_mode" target="_blank">Failsafe instuctions on the OpenWRT Wiki</a> the process is the following:<br />
<ol>
<li>Turn off your MR3020</li>
<li>Set your computer's ethernet IP address to 192.168.1.2 (static). In Ubuntu go to <i>Network connections/Wired/Wired</i> (or Cable, depending how it is named) and click <i>Edit</i>.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-iqGdFqa6Y2T_C4M6jGwuUuhJackiu7VU89JmU7z0lTR6P8TWCw2NK3SU7UMjQSyJL3soeFlXoz2KpqvG7aCnnUMZB3Ex54mDJynuEbmFLXjYoRHbTEtdc7uVvi3IwOsQIDcLBMUyI-k/s1600/Screenshot+-+030116+-+13%253A56%253A18.png" style="margin-left: auto; margin-right: auto;"><img border="0" height="225" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEg-iqGdFqa6Y2T_C4M6jGwuUuhJackiu7VU89JmU7z0lTR6P8TWCw2NK3SU7UMjQSyJL3soeFlXoz2KpqvG7aCnnUMZB3Ex54mDJynuEbmFLXjYoRHbTEtdc7uVvi3IwOsQIDcLBMUyI-k/s320/Screenshot+-+030116+-+13%253A56%253A18.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Network connections in Ubuntu.</td></tr>
</tbody></table>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeyNSRRbagFPUx5oBv0kLkOnoe0JPN0K9cri3hRSAj07JLuyqz4A9zXh-LkdmhL6Q0NjmYVJlUjS87nx-o9DuoDLkx4R8xoQvearNGmT87Q7vBOX3FNK9J7krFIchlcChHFWxaEv8acK8/s1600/Screenshot+-+030116+-+13%253A54%253A16.png" style="margin-left: auto; margin-right: auto;"><img border="0" height="320" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEjeyNSRRbagFPUx5oBv0kLkOnoe0JPN0K9cri3hRSAj07JLuyqz4A9zXh-LkdmhL6Q0NjmYVJlUjS87nx-o9DuoDLkx4R8xoQvearNGmT87Q7vBOX3FNK9J7krFIchlcChHFWxaEv8acK8/s320/Screenshot+-+030116+-+13%253A54%253A16.png" width="302" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Setting a static IP address to the ethernet interface in Ubuntu.Netmask can be 255.255.255.0, gateway 192.168.1.1</td></tr>
</tbody></table>
</li>
<li>Disconnect your computer from other networks.</li>
<li>Connect your computer to the MR3020 via an ethernet cable.</li>
<li>Power up the MR3020.</li>
<li>When the WPS button starts blinking during boot, press it. It should start blinking faster. The router is now in Failsafe mode.</li>
<li>In a terminal window type,<br />
<span style="font-family: "courier new" , "courier" , monospace;">telnet 192.168.1.1</span><br />
<span style="font-family: inherit;"><b><u>Note:</u></b> Even if you have previously set a password to enable ssh, in Failsafe mode only telnet works.</span></li>
<li>To enable editing files type,<br />
<span style="font-family: "courier new" , "courier" , monospace;">mount_root</span></li>
</ol>
<h3>
Restore to stock OpenWRT</h3>
If you have lost track of configurations, sometimes it is easier to simply start over. If you have access to your router via telnet or ssh you can use the following to reset back to factory OpenWRT settings.<br />
<ol>
<li>Access your router in Failsafe mode and execute the following commands</li>
<li><span style="font-family: "courier new" , "courier" , monospace;">mount_root</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">mtd -r erase rootfs_data</span><br />
(Your router might reboot automatically after this step, hence making step 4 unnecessary.)</li>
<li><span style="font-family: "courier new" , "courier" , monospace;">reboot -f</span></li>
</ol>
<h2>
Summary</h2>
I hope this has helped you save some time and get your network up and running. If you have any remarks or questions I would be happy to take them. Leave a comment if you are happy about the guide or unsure about something.</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-613243826383359352015-11-01T19:09:00.001+00:002016-02-14T19:51:56.366+00:00Gridcoin Headless Wallet on Ubuntu (VPS)<div style="text-align: justify;">
I got into <a href="http://gridcoin.us/" target="_blank">Gridcoin</a> <a href="http://gridcoin.us/" target="_blank">[1]</a> at about the start of 2015 if I remember correctly, a cryptocurrency based on <a href="https://boinc.berkeley.edu/" target="_blank">BOINC</a> <a href="https://boinc.berkeley.edu/" target="_blank">[2]</a>. Users are no longer doing "useless" hashing work, but rather contribute to space, medical or other useful science topics by donating computing power. Now, with the help of Gridcoin, contributors can get a "payment" for their work on white-listed projects.<br />
<br /></div>
<div style="text-align: justify;">
Since the Gridcoin Project uses both Proof of Work (technically "Proof of Research", aka PoR) and Proof of Stake schemes at the same time, it is beneficial to have a node running to stake coins and earn interest on them. <b> </b><br />
<br />
<b>Summary</b><br />
<ul>
<li><b>How to install gridcoinresearchd (compiling & .deb)</b></li>
<li><b>Automatically unlock wallet for staking</b></li>
<li><b>Wallet upgrade (automatic & manual)</b></li>
</ul>
<br />
<h2>
Getting a VPS Server</h2>
I bought a server with the features listed below for about <i>20 €/year</i> (don't remember exactly as I bought a cheaper package first and then upgraded) from <a href="https://billing.internetovizija.com/?affid=437" target="_blank">time4VPS</a>
(affiliate link). I can say I am satisfied with their service. They have great support, astonishing prices, upgrading servers work seamlessly and really easy setup. Perfect
uptime so far and low ping within the EU, even my small mumble server
has a ping around 80 ms. <br />
<ul>
<li>2.4 GHz CPU core</li>
<li>1024 MB RAM (+ 512 MB of <i>fixed</i> SWAP)</li>
<li>40 GB HDD</li>
<li>400 Mbit/s port connection (dedicated)</li>
<li>1 TB monthly traffic</li>
</ul>
</div>
<h2 style="text-align: justify;">
Installing Gridcoin-Research </h2>
<div style="text-align: justify;">
This will be a guide on how to install <i>gridcoinresearchd</i>, that is the
gridcoin-research daemon. This is a headless version of the client, that
is there will be no GUI for configuration or inspection. However, this
is not even needed if you just want to run a client and know that it
works. Three ways of installing I have covered here are,</div>
<ol>
<li>Pull from git and compile</li>
<li>Use pre-compiled .deb packages for Ubuntu</li>
<li>Add PPA to your system (<u><i><b>simplest</b></i></u>) </li>
</ol>
<h3 style="text-align: justify;">
Compile from git repository </h3>
<h3 style="text-align: justify;">
</h3>
<div style="text-align: justify;">
Installing the client is well-described on the Github page and on the official site of the project <a href="https://github.com/gridcoin/Gridcoin-master/blob/master/CompilingGridcoinOnLinux.txt" target="_blank">[3]</a> <a href="http://gridcoin.us/" target="_blank">[1]</a> and following it step-by-step will result in a perfect installation. I copied here the important commands relevant for installing it on an Ubuntu VPS.</div>
<blockquote class="tr_bq">
<ol>
<li><span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get install ntp git build-essential libssl-dev libdb-dev libdb++-dev libboost-all-dev libqrencode-dev</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">git clone https://github.com/gridcoin/Gridcoin-Research</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">cd ~/Gridcoin-Research/src</span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">chmod 755 leveldb/build_detect_platform </span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">make -f makefile.unix USE_UPNP=- </span></li>
<li><span style="font-family: "courier new" , "courier" , monospace;">strip gridcoinresearchd<br />sudo install -m 755 gridcoinresearchd /usr/bin/gridcoinresearchd</span></li>
</ol>
</blockquote>
After this the daemon can be run from the terminal with the command,<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">gridcoinreserachd</span> </blockquote>
<div style="text-align: justify;">
<br />
<h3>
Pre-compiled packages</h3>
Turns out that the compiler keeps getting out of RAM during the process and fails. So instead of compiling it on my own, I have decided (for now) to download pre-compiled .deb packages from launchpad. The latest compiled package can be downloaded from : <a href="https://code.launchpad.net/~caraka/+recipe/gridcoin-daily">https://code.launchpad.net/~caraka/+recipe/gridcoin-daily</a>.<br />
<br />
Select the one that matches your distribution and architecture and grab the link. Then on your server e.g.,<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">wget https://code.launchpad.net/~gridcoin/+archive/ubuntu/gridcoin-daily/+build/8190699/+files/gridcoinresearchd_3.5.2.1-r166%7Eubuntu14.04.1_amd64.deb</span></blockquote>
<br />
This will save into <i>gridcoinresearchd_3.5.2.1-r166~ubuntu14.04.1_amd64.deb</i>. Now I had a problem here with the "~" in the name, so what I usually do is replace it with a "-" to avoid issues when installing directly with dpkg.<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">mv gridcoinresearchd_3.5.2.1-r166~ubuntu14.04.1_amd64.deb gridcoinresearchd_3.5.2.1-r166-ubuntu14.04.1_amd64.deb</span></blockquote>
And lastly,<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo dpkg -i gridcoinresearchd_3.5.2.1-r166-ubuntu14.04.1_amd64.deb</span></blockquote>
After this the daemon can be run from the terminal with the command,<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">gridcoinreserachd</span></blockquote>
<h3>
Adding PPA to your system</h3>
Just recently I found that I can also install the Gridcoin daemon via PPA. From <a href="https://launchpad.net/~gridcoin/+archive/ubuntu/gridcoin-daily">https://launchpad.net/~gridcoin/+archive/ubuntu/gridcoin-daily</a>. This is probably less fancy than compiling from the source, but definitely faster.<br />
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhOwdFqh1YS6Ksz5mKk3dgoHAu23T-vMUZqFDDCOSDwbyjp7PZ1a7tA8vN25fQCUjIeLrWhVBHXU5qryd_z08AAbqbmhTZeYv4m_a_xZH0rKbTvSFVnf8OCLCX_VaC4i-1mHu0D-Sy6JU/s1600/Screenshot+-+301015+-+23%253A49%253A16.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="258" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEhhOwdFqh1YS6Ksz5mKk3dgoHAu23T-vMUZqFDDCOSDwbyjp7PZ1a7tA8vN25fQCUjIeLrWhVBHXU5qryd_z08AAbqbmhTZeYv4m_a_xZH0rKbTvSFVnf8OCLCX_VaC4i-1mHu0D-Sy6JU/s320/Screenshot+-+301015+-+23%253A49%253A16.png" width="320" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Code to add Gridcoin PPA to your system</td></tr>
</tbody></table>
Simply<i>,</i><br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo add-apt-repository ppa:gridcoin/gridcoin-daily</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get update<br />sudo apt-get install gridcoinresearchd </span></blockquote>
<br />
After this the daemon can be run from the terminal with the command,<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">gridcoinreserachd</span></blockquote>
And the next time you run<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get update</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get upgrade</span></blockquote>
to update your system, gridcoinresearchd will also be automatically upgraded.<br />
<br />
<b>Note:</b> If you got a VPS from <a href="http://www.time4vps.eu/aff.php?aff=213" target="_blank">Time4VPS</a> you first have to run <span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get install software-properties-common python-software-properties</span> before you can add-apt-repository.<br />
<br /></div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
<h2>
Unlocking the Wallet for Staking</h2>
In order to stake coins - receive interest on the coins in your wallet - the wallet must be unlocked <a href="http://wiki.gridcoin.us/FAQ" target="_blank">[9]</a>. Of course, this only applies if your wallet is encrypted, which it should be (!) if you are storing it on a remote server! For obvious reasons.<br />
<br />
The problem is, in order to unlock it, you have to type the password in your ssh session. This is secure. Unless someone gets access to your VPS server when he/she can check the terminal history (<span style="font-family: "courier new" , "courier" , monospace;">history</span>) and your password is out. The solution is to use the <span style="font-family: "courier new" , "courier" , monospace;">autounlock</span> feature in the config and provide an encrypted password. This will automatically unlock your wallet upon start.<br />
<br />
Go to your desktop wallet and in the debug console do the following<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">execute encrypt <i>YourwalletPassword</i></span></blockquote>
and add a last line to your gridcoinresearch.conf file<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">autounlock=looooongmumbojumboencryptedpassphrase</span></blockquote>
<br />
So you are essentially using an encrypted password that your client can decrypt and prove that it is indeed the correct password and so unlocks your wallet for staking. Pretty cool, huh? So even if someone has access to your VPS, they won't have your wallet passphrase.<br />
<br />
<br />
<u><b>Note:</b></u> The password hashing algorithm takes a salt from the computer's CPU and hard drive. This means that the hash has to be generated on the machine where the wallet will run and as such the hash will be unique to that machine. (The same passphrase will result in different hashes on different computers!)<br />
<br />
<div style="text-align: justify;">
<h3>
<b>Config file</b></h3>
</div>
<div style="text-align: justify;">
I
have stripped down my config file and currently use only a minimal
version. To edit your gridcoinresearch.conf file,</div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">nano ~/.GridcoinResearch/gridcoinresearch.conf</span></div>
</blockquote>
<div style="text-align: justify;">
The following lines need to be present,<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">email=YourEmailAddressHere<br />rpcuser=whatever_you_want_you_dont_have_to_remember_it rpcpassword=whatever_you_want_you_dont_have_to_remember_it<br />addnode=node.gridcoin.us<br />addnode=typh00n.net<br />addnode=gridcoin.asia<br />autounlock=looooongmumbojumboencryptedpassphrase<br />maxconnections=45<br />server=1<br />daemon=1</span> </blockquote>
</div>
<div style="text-align: justify;">
After
this you should be able to run <span style="font-family: "courier new" , "courier" , monospace;">gridcoinresearchd</span> and get some
connections soon. Maybe not right away, but check back in 10-30-60
minutes and see if it works.<br />
<br />
<b>Note:</b> The <i>rpcuser</i> and <i>rpcpassword</i> fields are necessary for the headless (gridcoin-researchd) client, you will get an error if these are not present. The "addnode" entries should be purely optional, peers should be found even without these entries.</div>
<div style="text-align: justify;">
<br /></div>
<b>Tip:</b>
"<span style="font-family: "courier new" , "courier" , monospace;">gridcoinresearchd</span>" is a system command now and can be called quickly
by starting to type it "<i>grid</i>..." and pressing [TAB]. Also, type <span style="font-family: "courier new" , "courier" , monospace;">gridcoinresearchd help</span> to get a list of available commands with the headless client.<br />
<br /></div>
<h3 style="text-align: justify;">
</h3>
<h3 style="text-align: justify;">
</h3>
<h2 style="text-align: justify;">
<b>Keeping Gridcoin Updated</b></h2>
<h3 style="text-align: justify;">
<b>Upgrading for self-compiled client </b></h3>
<div style="text-align: justify;">
I have written a scrip for myself to upgrade the client, based on the Github Linux guide <a href="https://github.com/gridcoin/Gridcoin-master/blob/master/CompilingGridcoinOnLinux.txt" target="_blank">[3]</a> again. The script upgrades the client if it is installed in the "default" location (that is where I have installed it) in ~/Gridcoin-Reserach/. The script can then be added to the aliases file and simply run with a command. I personally like having a ~/MyScripts directory on my systems where I have a collection of scripts doing a range of things. I call this one ~/MyScripts/grcupgrade.sh and has the following in it.</div>
<div style="text-align: justify;">
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">#!/bin/bash<br />#Script to Upgrade Gridcoin-Research client
<br />
###Config###<br />
#Install directory</span></blockquote>
<blockquote>
<span style="font-family: "courier new" , "courier" , monospace;">Dir=/home/<span style="color: red;">YourUsernameHere</span>/Gridcoin-Research/</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">###Config END###</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#Defining some colours for message output</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">red='\033[0;31m'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">NC='\033[0m'</span><br />
<span style="font-family: "courier new" , "courier" , monospace;"></span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#Stop gridcoinresearch if running</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">gridcoinresearchd stop</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#Go to the install Directory</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">cd $Dir</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#Git update</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">echo "${red}Pulling Changes from Git Repository...${NC}"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo git fetch --all</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo git reset --hard origin/master</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">echo "${red}Git Repository Updated!${NC}"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">cd $Dir/src</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">chmod 755 leveldb/build_detect_platform</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#Makefile</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">echo "${red}Making makefile.unix! This may take a while!${NC}"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">make -f makefile.unix USE_UPNP=-</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">echo "${red}Makefile ready.${NC}"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">strip gridcoinresearchd</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo install -m 755 gridcoinresearchd /usr/bin/gridcoinresearchd</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">echo "${red}Upgrade finished. You can start Gridcoin-Research now\nby running 'gridcoinresearchd' ${NC}"</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#Uncomment the following line to automatically run gridcoinresearchd upon finishing the client update</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">#gridcoinresearchd</span></blockquote>
<br /></div>
<div style="text-align: justify;">
After copying this into the file remember to make the file executable with,</div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">sudo chmod +X ~/MyScripts/grcupgrade.sh</span></div>
</blockquote>
<div style="text-align: justify;">
</div>
<div style="text-align: justify;">
Then we can add an alias to call this script for the simple command <i>grcupgrade</i>. This file doesn't exist by default, so it will be likely empty if you haven't added commands to it before.</div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">sudo nano ~/.bash_aliases</span></div>
</blockquote>
<div style="text-align: justify;">
And add the following line to the file,</div>
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">alias grcupgrade='sudo sh ~/MyScripts/grcupgrade.sh'</span></blockquote>
<div style="text-align: justify;">
Save with Ctrl+O and exit with, Ctrl+X. Then run the following command (or reboot if you wish) to apply changes made to the aliases file.</div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">source ~/.bashrc</span></div>
</blockquote>
<div style="text-align: justify;">
After this the upgrade script can be run by simply issuing the </div>
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">grcupgrade</span></div>
</blockquote>
<div style="text-align: justify;">
command. If you want gridcoinresearchd to start at the end of the client upgrade then you can uncomment the last line in the bash script. A further step is that you can run a cronjob to run this script, say once every week to make sure that your client gets upgraded.<br />
<br />
<h3>
Upgrading when installed via PPA</h3>
If you have added the gridcoin-daily PPA to your system, then as mentioned earlier, your gridcoin client will be upgraded the next time you do<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get update</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">sudo apt-get upgrade</span></blockquote>
</div>
<h2 style="text-align: justify;">
Troubleshooting</h2>
<h3 style="text-align: justify;">
Resource usage </h3>
<div style="text-align: justify;">
From personal experience I can say that running on 512 MB of system RAM is not going to work. I had multiple wallet crashes due to "out of memory" error. Therefore I would recommend a minimum of 1 GB for simply running the client (not compiling!). I think CPU power for running a simple wallet is not that much important, it mainly influences the time it takes to make the wallet from the git source. Even a Raspberry Pi's CPU can handle it.<br />
<br />
If one wants to compile the client from the git repository as mentioned above, I would suggest having at least 2 GB of system RAM. Although, I cannot confirm if this would truly be enough. I personally am pulling the deb packages and installing it with dpkg for the moment.<br />
<br />
<div style="text-align: justify;">
<h3>
<b>
Compiler error</b></h3>
</div>
<div style="text-align: justify;">
Even
though it should be simple to compile, I ran into a problem. The
compiler ran for a while and then gave back a weird-looking error:<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">g++: internal compiler error: Killed (program cc1plus)</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">Please submit a full bug report,</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">with preprocessed source if appropriate.</span><br />
<span style="font-family: "courier new" , "courier" , monospace;">See <file:///usr/share/doc/gcc-4.6/README.Bugs> for instructions.</span></blockquote>
Turns out this happens when it runs out of RAM. Command <span style="font-family: "courier new" , "courier" , monospace;">dmesg </span>returned<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">[241411.374594] Out of memory in UB 8727: OOM killed process 11475 (cc1plus) score 0 vm:734444kB, rss:493656kB, swap:207248kB</span></blockquote>
I started investigating the use of a larger swap file <a href="https://bitcointalk.org/index.php?topic=110627.0" target="_blank">[8]</a>,
however for obvious reasons, the server restricts this (otherwise
anyone could get e.g. 4 GB extra RAM for free). So I tried shutting down
unnecessary services, apache, my mumble server and I even tried
increasing swappiness. This was also set to 1, and cannot be changed.
Again, because of server configuration and the virtualization.<br />
<br /></div>
<h3>
Further help</h3>
</div>
<ul>
<li style="text-align: justify;">If you get stuck you can look at <a href="http://wiki.gridcoin.us/Linux_guide">http://wiki.gridcoin.us/Linux_guide</a> for additional help. </li>
<li style="text-align: justify;">Also, check the config file with the help of <a href="http://wiki.gridcoin.us/Gridcoinresearch_config_file">http://wiki.gridcoin.us/Gridcoinresearch_config_file</a></li>
<li><div style="text-align: justify;">
Just for reference here are the commands that you can use with gridcoinresearchd. <a href="http://pastebin.com/6b42BWch">http://pastebin.com/6b42BWch</a></div>
This is the same as the output of</li>
</ul>
<div style="text-align: justify;">
<blockquote class="tr_bq">
<blockquote class="tr_bq">
<div style="text-align: justify;">
<span style="font-family: "courier new" , "courier" , monospace;">gridcoinresearchd help</span></div>
</blockquote>
</blockquote>
And of course, feel free to leave a comment if you find this useful or you got stuck somewhere.<br />
<br />
<h2>
Extras</h2>
Some extras briefly mentioned that are actually required, but beyond the scope of the article.<br />
<br />
<h3>
Automatic updates (cronjob)</h3>
Setting up a cronjob for the updater script is a good idea. Here is an example on how to set it to run once a week. <span style="font-family: "courier new" , "courier" , monospace;">Cron</span> takes the following syntax,<br />
<br />
Minute Hour Day_of_Month Month Day_of_Week Command<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">47 6 * * Sun grcupgrade</span></blockquote>
<span style="font-family: "courier new" , "courier" , monospace;"><span style="font-family: "arial" , "helvetica" , sans-serif;">For example the above code would run the upgrade script every Sunday at 06:47.</span></span><br />
<br />
<h3>
Encrypt your wallet.dat</h3>
If you have a local Gridcoin wallet on your machine and would like to use the same on a VPS, you should encrypt it. This can be done through the GUI in <i>Settings/Encrypt</i> <i>Wallet</i>. Make sure to use a sufficiently strong password.<br />
<br />
<h3>
Copy an existing wallet.dat file to the server</h3>
If you have encrypted your wallet.dat file as mentioned above, it should be safe to copy it to a remote VPS server. This can be done securely with scp,<br />
<blockquote class="tr_bq">
<span style="font-family: "courier new" , "courier" , monospace;">scp ~/GridcoinResearch/wallet.dat user@vps.server:/home/user/</span><span style="font-family: "courier new" , "courier" , monospace;">GridcoinResearch/</span></blockquote>
<i>user</i>: your username on the VPS server<br />
<i>vps.server</i>: IP address or domain name of your VPS server</div>
<h2 style="text-align: justify;">
References</h2>
<div style="text-align: justify;">
<a href="http://gridcoin.us/" target="_blank">[1]</a> - <a href="http://gridcoin.us/">http://gridcoin.us</a></div>
<div style="text-align: justify;">
<a href="https://boinc.berkeley.edu/" target="_blank">[2]</a> - <a href="https://boinc.berkeley.edu/">https://boinc.berkeley.edu</a></div>
<div style="text-align: justify;">
<a href="https://github.com/gridcoin/Gridcoin-master/blob/master/CompilingGridcoinOnLinux.txt" target="_blank">[3]</a> - <a href="https://github.com/gridcoin/Gridcoin-master/blob/master/CompilingGridcoinOnLinux.txt">https://github.com/gridcoin/Gridcoin-master/blob/master/CompilingGridcoinOnLinux.txt</a></div>
<div style="text-align: justify;">
<a href="https://cryptocointalk.com/topic/1331-new-coin-launch-announcement-grc-gridcoin/?p=157720" target="_blank">[4]</a> - <a href="https://cryptocointalk.com/topic/1331-new-coin-launch-announcement-grc-gridcoin/?p=157720">https://cryptocointalk.com/topic/1331-new-coin-launch-announcement-grc-grdcoin/?p=157720</a></div>
<div style="text-align: justify;">
<a href="http://wiki.gridcoin.us/Linux_guide" target="_blank">[5]</a> - <a href="http://wiki.gridcoin.us/Linux_guide">http://wiki.gridcoin.us/Linux_guide</a></div>
<div style="text-align: justify;">
<a href="http://wiki.gridcoin.us/Gridcoinresearch_config_file" target="_blank">[6]</a> - <a href="http://wiki.gridcoin.us/Gridcoinresearch_config_file" target="_blank">http://wiki.gridcoin.us/Gridcoinresearch_config_file </a><br />
<a href="http://pastebin.com/6b42BWch" target="_blank">[7]</a> - <a href="http://pastebin.com/6b42BWch" target="_blank">http://pastebin.com/6b42BWch </a><br />
<a href="https://bitcointalk.org/index.php?topic=110627.0" target="_blank">[8] - https://bitcointalk.org/index.php?topic=110627.0 </a><br />
<a href="http://wiki.gridcoin.us/FAQ" target="_blank">[9]</a> - <a href="http://wiki.gridcoin.us/FAQ" target="_blank">http://wiki.gridcoin.us/FAQ </a><br />
<br />
<div style="text-align: center;">
<b><span style="font-size: small;">If you appreciate my work and/or feel like having a tipping day,<br />GRC: SCd97pZxVCxYZ9dZztt3M3V6LRcynjR79S </span></b></div>
</div>
Unknownnoreply@blogger.com0tag:blogger.com,1999:blog-886443900063926782.post-16814380006589299382015-06-30T08:47:00.000+01:002015-06-30T08:47:59.438+01:00Internal Server Error on ownCloud Ubuntu Server 14.04<div style="text-align: justify;">
I have followed the automatic installation tutorial for <a href="https://owncloud.org/" target="_blank">ownCloud</a>,<a href="https://owncloud.org/" target="_blank">[1]</a> from software.opensuse.org,<a href="https://software.opensuse.org/download.html?project=isv:ownCloud:community&package=owncloud" target="_blank">[2]</a>. Needless to say, it didn't go as smooth as apt-get install and enjoy. After installing, enabling SSL with a self-signed certificate and using the absolute default settings I was greeted with a not so nice message below.</div>
<table align="center" cellpadding="0" cellspacing="0" class="tr-caption-container" style="margin-left: auto; margin-right: auto; text-align: center;"><tbody>
<tr><td style="text-align: center;"><a href="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia5Gj449x_sXSj5FwymurMt-gYBQYWafgpQUmBrGjjM7QPP_06nrdaj_vQN600z-0J3vXT-4LKamXSeymhd7L2-g8VMi_Veyi6w9_dEP6NXLOCSt62W54cXwAxzqjTlxfIuA5nrVUjAnM/s1600/Screenshot+-+300615+-+08%253A35%253A45.png" imageanchor="1" style="margin-left: auto; margin-right: auto;"><img border="0" height="80" src="https://blogger.googleusercontent.com/img/b/R29vZ2xl/AVvXsEia5Gj449x_sXSj5FwymurMt-gYBQYWafgpQUmBrGjjM7QPP_06nrdaj_vQN600z-0J3vXT-4LKamXSeymhd7L2-g8VMi_Veyi6w9_dEP6NXLOCSt62W54cXwAxzqjTlxfIuA5nrVUjAnM/s400/Screenshot+-+300615+-+08%253A35%253A45.png" width="400" /></a></td></tr>
<tr><td class="tr-caption" style="text-align: center;">Internal server error message when trying to access mydomain.com/owncloud</td></tr>
</tbody></table>
<h2>
Solution </h2>
After quite a bit of searching the solution was to add he following lines to the config file <i>/etc/apache2/apache2.conf</i>,<a href="http://sharadchhetri.com/2014/01/16/how-to-install-owncloud-6-in-ubuntu-13-10-server/" target="_blank">[3]</a>.<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;"><Directory /var/www/></span><br />
<span style="font-family: "Courier New",Courier,monospace;"> Options Indexes FollowSymLinks</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> AllowOverride All</span><br />
<span style="font-family: "Courier New",Courier,monospace;"> Require all granted</span><br />
<span style="font-family: "Courier New",Courier,monospace;"></Directory></span></blockquote>
Simple edit the file by<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">sudo nano /etc/apache2/apache2.conf</span></blockquote>
and add the mentioned lines to the end of the file.<br />
<br />
Save changes with <i>CTRL+O</i>, exit with <i>CTRL+X</i>. Then restart apache2 with<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">sudo service apache2 restart</span></blockquote>
Or in case you are running Ubuntu 12.04<br />
<blockquote class="tr_bq">
<span style="font-family: "Courier New",Courier,monospace;">sudo /etc/init.d/apache2 restart</span></blockquote>
Your error should be fixed and ownCloud ready to be used.<br />
<br />
<h2>
Sources</h2>
<a href="https://owncloud.org/" target="_blank">[1] - ownCloud.org </a><br />
<a href="https://software.opensuse.org/download.html?project=isv:ownCloud:community&package=owncloud" target="_blank">[2] - https://software.opensuse.org/download.html?project=isv:ownCloud:community&package=owncloud</a><br />
<a href="http://sharadchhetri.com/2014/01/16/how-to-install-owncloud-6-in-ubuntu-13-10-server/" target="_blank">[3] - http://sharadchhetri.com/2014/01/16/how-to-install-owncloud-6-in-ubuntu-13-10-server/</a>Unknownnoreply@blogger.com0