summary |
shortlog |
log |
commit | commitdiff |
tree
raw |
patch |
inline | side by side (from parent 1:
abd68e6)
Disabling swap file is important for reducing probability that
unencrypted data is written to disk.
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
<html xmlns="http://www.w3.org/1999/xhtml" lang="en" xml:lang="en">
<head>
-<!-- 2020-06-30 Tue 17:14 -->
+<!-- 2020-06-30 Tue 19:45 -->
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Ninfacyzga-01 Manual</title>
<meta http-equiv="Content-Type" content="text/html;charset=utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1" />
<title>Ninfacyzga-01 Manual</title>
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
<h2>Table of Contents</h2>
<div id="text-table-of-contents">
<ul>
-<li><a href="#org9fe5754">1. Location Logging</a>
+<li><a href="#org4ab28d5">1. Location Logging</a>
-<li><a href="#org6b1a17d">1.1. Narrative</a></li>
-<li><a href="#org57c152a">1.2. Description</a>
+<li><a href="#org3a44301">1.1. Narrative</a></li>
+<li><a href="#orgeb3a61f">1.2. Description</a>
-<li><a href="#orge971d48">1.2.1. Hardware</a></li>
-<li><a href="#orgd6ea21a">1.2.2. Software</a></li>
-<li><a href="#org2c5d288">1.2.3. Output</a></li>
+<li><a href="#org68434d8">1.2.1. Hardware</a></li>
+<li><a href="#org6bf1f28">1.2.2. Software</a></li>
+<li><a href="#orga640ec2">1.2.3. Output</a></li>
-<li><a href="#org2c59433">1.3. Operating Procedures</a>
+<li><a href="#org78712e3">1.3. Operating Procedures</a>
-<li><a href="#org6fcdbad">1.3.1. Initial Startup</a></li>
-<li><a href="#org15d1661">1.3.2. Normal Startup</a></li>
-<li><a href="#org989e70e">1.3.3. Normal Operation</a></li>
-<li><a href="#orged87647">1.3.4. Normal Shutdown</a></li>
-<li><a href="#org5d4c9cd">1.3.5. Unscheduled Shutdown</a></li>
-<li><a href="#org00f1b85">1.3.6. End of Life Disposal</a></li>
+<li><a href="#orgcc76a4c">1.3.1. Initial Startup</a></li>
+<li><a href="#org8fbf566">1.3.2. Normal Startup</a></li>
+<li><a href="#orgbc8af37">1.3.3. Normal Operation</a></li>
+<li><a href="#org46c0af5">1.3.4. Normal Shutdown</a></li>
+<li><a href="#org662e1e8">1.3.5. Unscheduled Shutdown</a></li>
+<li><a href="#org70e088c">1.3.6. End of Life Disposal</a></li>
-<div id="outline-container-org9fe5754" class="outline-2">
-<h2 id="org9fe5754"><span class="section-number-2">1</span> Location Logging</h2>
+<div id="outline-container-org4ab28d5" class="outline-2">
+<h2 id="org4ab28d5"><span class="section-number-2">1</span> Location Logging</h2>
<div class="outline-text-2" id="text-1">
<p>
This document was created by Steven Baltakatei Sandoval on
<code>2020-06-29T12:14Z</code> under a <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons BY-SA 4.0 license</a>. It
<div class="outline-text-2" id="text-1">
<p>
This document was created by Steven Baltakatei Sandoval on
<code>2020-06-29T12:14Z</code> under a <a href="https://creativecommons.org/licenses/by-sa/4.0/">Creative Commons BY-SA 4.0 license</a>. It
-was updated by Steven Baltakatei Sandoval on <code>2020-06-30T17:13Z</code>
+was updated by Steven Baltakatei Sandoval on <code>2020-06-30T19:44Z</code>
-<div id="outline-container-org6b1a17d" class="outline-3">
-<h3 id="org6b1a17d"><span class="section-number-3">1.1</span> Narrative</h3>
+<div id="outline-container-org3a44301" class="outline-3">
+<h3 id="org3a44301"><span class="section-number-3">1.1</span> Narrative</h3>
<div class="outline-text-3" id="text-1-1">
<p>
Ninfacyzga-01 records (logs) its position in time and space using a
<div class="outline-text-3" id="text-1-1">
<p>
Ninfacyzga-01 records (logs) its position in time and space using a
-<div id="outline-container-org57c152a" class="outline-3">
-<h3 id="org57c152a"><span class="section-number-3">1.2</span> Description</h3>
+<div id="outline-container-orgeb3a61f" class="outline-3">
+<h3 id="orgeb3a61f"><span class="section-number-3">1.2</span> Description</h3>
<div class="outline-text-3" id="text-1-2">
</div>
<div class="outline-text-3" id="text-1-2">
</div>
-<div id="outline-container-orge971d48" class="outline-4">
-<h4 id="orge971d48"><span class="section-number-4">1.2.1</span> Hardware</h4>
+<div id="outline-container-org68434d8" class="outline-4">
+<h4 id="org68434d8"><span class="section-number-4">1.2.1</span> Hardware</h4>
<div class="outline-text-4" id="text-1-2-1">
</div>
<ol class="org-ol">
<div class="outline-text-4" id="text-1-2-1">
</div>
<ol class="org-ol">
-<li><a id="org21a0c6c"></a>Raspberry Pi Zero W<br />
+<li><a id="org3fcab7d"></a>Raspberry Pi Zero W<br />
<div class="outline-text-5" id="text-1-2-1-1">
<p>
See the <a href="https://www.raspberrypi.org/pi-zero-w/">OEM</a> webpage for this product.
</p>
</div>
</li>
<div class="outline-text-5" id="text-1-2-1-1">
<p>
See the <a href="https://www.raspberrypi.org/pi-zero-w/">OEM</a> webpage for this product.
</p>
</div>
</li>
-<li><a id="org002698e"></a>PiZ UpTime 2.0<br />
+<li><a id="org4a38c06"></a>PiZ UpTime 2.0<br />
<div class="outline-text-5" id="text-1-2-1-2">
<p>
See the <a href="https://alchemy-power.com/piz-uptime-2-0/">OEM</a> webpage for this product.
<div class="outline-text-5" id="text-1-2-1-2">
<p>
See the <a href="https://alchemy-power.com/piz-uptime-2-0/">OEM</a> webpage for this product.
-<div id="outline-container-orgd6ea21a" class="outline-4">
-<h4 id="orgd6ea21a"><span class="section-number-4">1.2.2</span> Software</h4>
+<div id="outline-container-org6bf1f28" class="outline-4">
+<h4 id="org6bf1f28"><span class="section-number-4">1.2.2</span> Software</h4>
<div class="outline-text-4" id="text-1-2-2">
<p>
<code>bkgpslog</code> : The bash script that performs the location data
<div class="outline-text-4" id="text-1-2-2">
<p>
<code>bkgpslog</code> : The bash script that performs the location data
</div>
<ol class="org-ol">
</div>
<ol class="org-ol">
-<li><a id="org3d64ae8"></a>Narrative<br />
+<li><a id="org33a99e7"></a>Narrative<br />
<div class="outline-text-5" id="text-1-2-2-1">
<p>
<code>bkgpslog</code> populates a 60-second buffer with NMEA data from <code>gpsd</code> via
<div class="outline-text-5" id="text-1-2-2-1">
<p>
<code>bkgpslog</code> populates a 60-second buffer with NMEA data from <code>gpsd</code> via
-<div id="outline-container-org2c5d288" class="outline-4">
-<h4 id="org2c5d288"><span class="section-number-4">1.2.3</span> Output</h4>
+<div id="outline-container-orga640ec2" class="outline-4">
+<h4 id="orga640ec2"><span class="section-number-4">1.2.3</span> Output</h4>
<div class="outline-text-4" id="text-1-2-3">
</div>
<ol class="org-ol">
<div class="outline-text-4" id="text-1-2-3">
</div>
<ol class="org-ol">
-<li><a id="orgaf12e62"></a>File Formats<br />
+<li><a id="orgbe90ee3"></a>File Formats<br />
-<li><a id="org8576f09"></a>NMEA<br />
+<li><a id="orga69e180"></a>NMEA<br />
<div class="outline-text-6" id="text-1-2-3-1-1">
<p>
See the <a href="https://en.wikipedia.org/wiki/NMEA_0183">Wikipedia page</a> for this.
</p>
</div>
</li>
<div class="outline-text-6" id="text-1-2-3-1-1">
<p>
See the <a href="https://en.wikipedia.org/wiki/NMEA_0183">Wikipedia page</a> for this.
</p>
</div>
</li>
-<li><a id="orge0c91b6"></a>GPX<br />
+<li><a id="org03fca13"></a>GPX<br />
<div class="outline-text-6" id="text-1-2-3-1-2">
<p>
See the <a href="https://en.wikipedia.org/wiki/GPS_Exchange_Format">Wikipedia page</a> for this. <a href="http://wiki.gis.com/wiki/index.php/WGS84">WGS84</a> is the datum used.
</p>
</div>
</li>
<div class="outline-text-6" id="text-1-2-3-1-2">
<p>
See the <a href="https://en.wikipedia.org/wiki/GPS_Exchange_Format">Wikipedia page</a> for this. <a href="http://wiki.gis.com/wiki/index.php/WGS84">WGS84</a> is the datum used.
</p>
</div>
</li>
-<li><a id="org25abef8"></a>KML<br />
+<li><a id="org9469dda"></a>KML<br />
<div class="outline-text-6" id="text-1-2-3-1-3">
<p>
See the <a href="https://en.wikipedia.org/wiki/Keyhole_Markup_Language">Wikipedia page</a> for this. <a href="http://wiki.gis.com/wiki/index.php/WGS84">WGS84</a> is the datum used.
<div class="outline-text-6" id="text-1-2-3-1-3">
<p>
See the <a href="https://en.wikipedia.org/wiki/Keyhole_Markup_Language">Wikipedia page</a> for this. <a href="http://wiki.gis.com/wiki/index.php/WGS84">WGS84</a> is the datum used.
-<li><a id="org67f375b"></a>Encryption Method<br />
+<li><a id="org4923cfc"></a>Encryption Method<br />
<div class="outline-text-5" id="text-1-2-3-2">
<p>
Files produced by the bkgpslog script are encrypted against a set of
<div class="outline-text-5" id="text-1-2-3-2">
<p>
Files produced by the bkgpslog script are encrypted against a set of
</p>
</div>
<ol class="org-ol">
</p>
</div>
<ol class="org-ol">
-<li><a id="org4ff51de"></a>Encryption Commands<br />
+<li><a id="org5f006f6"></a>Encryption Commands<br />
<div class="outline-text-6" id="text-1-2-3-2-1">
<p>
Files may be encrypted to several recipients using a command similar to:
<div class="outline-text-6" id="text-1-2-3-2-1">
<p>
Files may be encrypted to several recipients using a command similar to:
-<li><a id="org4a3cc4d"></a>Decryption Commands<br />
+<li><a id="orgd0d1b14"></a>Decryption Commands<br />
<div class="outline-text-6" id="text-1-2-3-2-2">
<p>
Files may be decrypted using a command similar to:
<div class="outline-text-6" id="text-1-2-3-2-2">
<p>
Files may be decrypted using a command similar to:
-<div id="outline-container-org2c59433" class="outline-3">
-<h3 id="org2c59433"><span class="section-number-3">1.3</span> Operating Procedures</h3>
+<div id="outline-container-org78712e3" class="outline-3">
+<h3 id="org78712e3"><span class="section-number-3">1.3</span> Operating Procedures</h3>
<div class="outline-text-3" id="text-1-3">
</div>
<div class="outline-text-3" id="text-1-3">
</div>
-<div id="outline-container-org6fcdbad" class="outline-4">
-<h4 id="org6fcdbad"><span class="section-number-4">1.3.1</span> Initial Startup</h4>
+<div id="outline-container-orgcc76a4c" class="outline-4">
+<h4 id="orgcc76a4c"><span class="section-number-4">1.3.1</span> Initial Startup</h4>
<div class="outline-text-4" id="text-1-3-1">
<p>
See OEM (Ozzmaker) <a href="https://ozzmaker.com/berrygps-berrygps-imu-quick-start-guide/">quickstart guide for the BerryGPS-IMU</a>.
<div class="outline-text-4" id="text-1-3-1">
<p>
See OEM (Ozzmaker) <a href="https://ozzmaker.com/berrygps-berrygps-imu-quick-start-guide/">quickstart guide for the BerryGPS-IMU</a>.
</div>
<ol class="org-ol">
</div>
<ol class="org-ol">
-<li><a id="org407a2c4"></a>Physical Setup<br />
+<li><a id="orgae43b4b"></a>Physical Setup<br />
<div class="outline-text-5" id="text-1-3-1-1">
<p>
BerryGPS-IMU must be electrically connected to the correct pins on the
<div class="outline-text-5" id="text-1-3-1-1">
<p>
BerryGPS-IMU must be electrically connected to the correct pins on the
-<li><a id="org5d08a29"></a>Software Setup<br />
+<li><a id="orgb3c2fc2"></a>Software Setup<br />
-<li><a id="org444d2f8"></a>Install Executables<br />
+<li><a id="org651214a"></a>Install Executables<br />
<div class="outline-text-6" id="text-1-3-1-2-1">
<p>
Install Raspbian 10 Buster onto an SD card image. See the Raspberry Pi
<div class="outline-text-6" id="text-1-3-1-2-1">
<p>
Install Raspbian 10 Buster onto an SD card image. See the Raspberry Pi
-<li><a id="org629d57e"></a>Disable Swap File<br />
+<li><a id="org1cc0c53"></a>Disable Swap File<br />
<div class="outline-text-6" id="text-1-3-1-2-2">
<p>
<div class="outline-text-6" id="text-1-3-1-2-2">
<p>
-Since standard Raspbian 10 install involves copying unencrypted file
-system image to SD card which is mounted by the Raspberry Pi, system
-memory may be written to disk in the form of a Swap file as described
-<a href="https://ideaheap.com/2013/07/stopping-sd-card-corruption-on-a-raspberry-pi/">here</a>. In order to reduce the chance that location log data is ever
-written to disk, swap file functionality must be disabled.
+Since standard Raspbian 10 (Buster) install involves copying
+unencrypted file system image to SD card which is mounted by the
+Raspberry Pi, system memory may be written to disk in the form of a
+Swap file as described <a href="https://ideaheap.com/2013/07/stopping-sd-card-corruption-on-a-raspberry-pi/">here</a>. In order to reduce the chance that
+location log data is ever written to disk, swap file functionality
+must be disabled<sup><a id="fnr.1" class="footref" href="#fn.1">1</a></sup>.
+<p>
+Raspbian 10 uses dphys-swapfile to manage a swap file. It may be
+disabled persistently<sup><a id="fnr.2" class="footref" href="#fn.2">2</a></sup> by running
+the following command:
+</p>
+
+<pre class="example">
+sudo systemctl disable dphys-swapfile.service
+
+</pre>
+
<p>
To view the status of the swap file in Raspbian 10, run <code>free -m</code>:
</p>
<pre class="example">
pi@ninfacyzga-01:~$ free -m
<p>
To view the status of the swap file in Raspbian 10, run <code>free -m</code>:
</p>
<pre class="example">
pi@ninfacyzga-01:~$ free -m
- total used free shared buff/cache available
-Mem: 432 86 36 21 309 268
-Swap: 99 0 99
+ total used free shared buff/cache available
+Mem: 432 86 36 21 309 268
+Swap: 99 0 99
-The swap file may be disabled by:
+After disabling the swap file and rebooting:
</p>
<pre class="example">
</p>
<pre class="example">
-pi@ninfacyzga-01:~$ sudo dphys-swapfile swapoff
-pi@ninfacyzga-01:~$ sudo dphys-swapfile uninstall
-pi@ninfacyzga-01:~$ sudo update-rc.d dphys-swapfile remove
pi@ninfacyzga-01:~$ free -m
pi@ninfacyzga-01:~$ free -m
- total used free shared buff/cache available
-Mem: 432 96 33 22 302 258
-Swap: 0 0 0
+ total used free shared buff/cache available
+Mem: 432 89 214 3 128 289
+Swap: 0 0 0
-<li><a id="orgd9b9b30"></a>Automatic Start Configuration<br />
+<li><a id="orgfdbf7d1"></a>Automatic Start Configuration<br />
<div class="outline-text-6" id="text-1-3-1-2-3">
<p>
Edit the user cron job list with <code>$ crontab -e</code> to add the following
<div class="outline-text-6" id="text-1-3-1-2-3">
<p>
Edit the user cron job list with <code>$ crontab -e</code> to add the following
<p>
The <code>age1z2...qkv6p</code> is an <code>age</code> public key string. Please see the
<p>
The <code>age1z2...qkv6p</code> is an <code>age</code> public key string. Please see the
-<a href="#org82f0a69">Key Generation</a> section for an explanation.
+<a href="#org4647532">Key Generation</a> section for an explanation.
-<li><a id="orgce1df03"></a>Log Transfer Configuration<br />
+<li><a id="org2de2dd5"></a>Log Transfer Configuration<br />
<div class="outline-text-6" id="text-1-3-1-2-4">
<p>
Log files may be shared to other machines via <code>syncthing</code>. See <a href="https://docs.syncthing.net/">this</a>
<div class="outline-text-6" id="text-1-3-1-2-4">
<p>
Log files may be shared to other machines via <code>syncthing</code>. See <a href="https://docs.syncthing.net/">this</a>
-<li><a id="org82f0a69"></a>Key Generation<br />
+<li><a id="org4647532"></a>Key Generation<br />
<div class="outline-text-6" id="text-1-3-1-2-5">
<p>
An <code>age</code> encryption key may be generated like so:
<div class="outline-text-6" id="text-1-3-1-2-5">
<p>
An <code>age</code> encryption key may be generated like so:
<pre class="example">
$ umask # Gets current umask
0022 # Note: This is the default umask for Raspbian 10
<pre class="example">
$ umask # Gets current umask
0022 # Note: This is the default umask for Raspbian 10
-$ umask 066 # Sets umask so key.txt will have no permissions except for owner (you)
+$ umask 066 # So key.txt will have no perms except for owner (you)
$ umask # Confirm umask set to 066
0066
$ age-keygen > key.txt
$ umask # Confirm umask set to 066
0066
$ age-keygen > key.txt
-<div id="outline-container-org15d1661" class="outline-4">
-<h4 id="org15d1661"><span class="section-number-4">1.3.2</span> Normal Startup</h4>
+<div id="outline-container-org8fbf566" class="outline-4">
+<h4 id="org8fbf566"><span class="section-number-4">1.3.2</span> Normal Startup</h4>
<div class="outline-text-4" id="text-1-3-2">
<p>
Turn on Ninfacyzga-01 by supplying 5VDC power to the Raspberry Pi. No
<div class="outline-text-4" id="text-1-3-2">
<p>
Turn on Ninfacyzga-01 by supplying 5VDC power to the Raspberry Pi. No
-<div id="outline-container-org989e70e" class="outline-4">
-<h4 id="org989e70e"><span class="section-number-4">1.3.3</span> Normal Operation</h4>
+<div id="outline-container-orgbc8af37" class="outline-4">
+<h4 id="orgbc8af37"><span class="section-number-4">1.3.3</span> Normal Operation</h4>
<div class="outline-text-4" id="text-1-3-3">
<p>
No interaction beyond continually supplying approximately 100mA of
<div class="outline-text-4" id="text-1-3-3">
<p>
No interaction beyond continually supplying approximately 100mA of
</p>
</div>
<ol class="org-ol">
</p>
</div>
<ol class="org-ol">
-<li><a id="org87c8f03"></a>Log Transfer<br />
+<li><a id="orgeaa5887"></a>Log Transfer<br />
<div class="outline-text-5" id="text-1-3-3-1">
<p>
Log files may be transferred by use of <code>syncthing</code> shared folders.
</p>
</div>
</li>
<div class="outline-text-5" id="text-1-3-3-1">
<p>
Log files may be transferred by use of <code>syncthing</code> shared folders.
</p>
</div>
</li>
-<li><a id="org203d027"></a>Automatic Updates<br />
+<li><a id="org51a37e4"></a>Automatic Updates<br />
<div class="outline-text-5" id="text-1-3-3-2">
<p>
The <code>automatic-upgrades</code> package, if installed, should automatically
<div class="outline-text-5" id="text-1-3-3-2">
<p>
The <code>automatic-upgrades</code> package, if installed, should automatically
-<div id="outline-container-orged87647" class="outline-4">
-<h4 id="orged87647"><span class="section-number-4">1.3.4</span> Normal Shutdown</h4>
+<div id="outline-container-org46c0af5" class="outline-4">
+<h4 id="org46c0af5"><span class="section-number-4">1.3.4</span> Normal Shutdown</h4>
<div class="outline-text-4" id="text-1-3-4">
<p>
The system may be shutdown via SSH by running:
<div class="outline-text-4" id="text-1-3-4">
<p>
The system may be shutdown via SSH by running:
-<div id="outline-container-org5d4c9cd" class="outline-4">
-<h4 id="org5d4c9cd"><span class="section-number-4">1.3.5</span> Unscheduled Shutdown</h4>
+<div id="outline-container-org662e1e8" class="outline-4">
+<h4 id="org662e1e8"><span class="section-number-4">1.3.5</span> Unscheduled Shutdown</h4>
<div class="outline-text-4" id="text-1-3-5">
<p>
Ninfacyzga-01 as described and setup should tolerate unscheduled power
<div class="outline-text-4" id="text-1-3-5">
<p>
Ninfacyzga-01 as described and setup should tolerate unscheduled power
-<div id="outline-container-org00f1b85" class="outline-4">
-<h4 id="org00f1b85"><span class="section-number-4">1.3.6</span> End of Life Disposal</h4>
+<div id="outline-container-org70e088c" class="outline-4">
+<h4 id="org70e088c"><span class="section-number-4">1.3.6</span> End of Life Disposal</h4>
<div class="outline-text-4" id="text-1-3-6">
<p>
LiPo batteries used by the PiZ Uptime 2.0 module should be disposed of
<div class="outline-text-4" id="text-1-3-6">
<p>
LiPo batteries used by the PiZ Uptime 2.0 module should be disposed of
+<div id="footnotes">
+<h2 class="footnotes">Footnotes: </h2>
+<div id="text-footnotes">
+
+<div class="footdef"><sup><a id="fn.1" class="footnum" href="#fnr.1">1</a></sup> <div class="footpara"><p class="footpara">
+Explanation:
+<a href="https://ideaheap.com/2013/07/stopping-sd-card-corruption-on-a-raspberry-pi/">https://ideaheap.com/2013/07/stopping-sd-card-corruption-on-a-raspberry-pi/</a>
+</p></div></div>
+
+<div class="footdef"><sup><a id="fn.2" class="footnum" href="#fnr.2">2</a></sup> <div class="footpara"><p class="footpara">
+Persistant disabling of swap in
+Raspbian 10 Buster:
+<a href="https://www.raspberrypi.org/forums/viewtopic.php?p=1490692&sid=5c596a124b7805d6b10dab8d3d7caf16#p1490692">https://www.raspberrypi.org/forums/viewtopic.php?p=1490692&sid=5c596a124b7805d6b10dab8d3d7caf16#p1490692</a>
+</p></div></div>
+
+
<div id="postamble" class="status">
<p class="author">Author: Steven Baltakatei Sandoval</p>
<div id="postamble" class="status">
<p class="author">Author: Steven Baltakatei Sandoval</p>
-<p class="date">Created: 2020-06-30 Tue 17:14</p>
+<p class="date">Created: 2020-06-30 Tue 19:45</p>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>
<p class="validation"><a href="http://validator.w3.org/check?uri=referer">Validate</a></p>
</div>
</body>
* Location Logging
This document was created by Steven Baltakatei Sandoval on
~2020-06-29T12:14Z~ under a [[https://creativecommons.org/licenses/by-sa/4.0/][Creative Commons BY-SA 4.0 license]]. It
* Location Logging
This document was created by Steven Baltakatei Sandoval on
~2020-06-29T12:14Z~ under a [[https://creativecommons.org/licenses/by-sa/4.0/][Creative Commons BY-SA 4.0 license]]. It
-was updated by Steven Baltakatei Sandoval on ~2020-06-30T17:13Z~
+was updated by Steven Baltakatei Sandoval on ~2020-06-30T19:44Z~
#+TITLE: Ninfacyzga-01 Manual
#+AUTHOR: Steven Baltakatei Sandoval
#+EMAIL: baltakatei@gmail.com
#+TITLE: Ninfacyzga-01 Manual
#+AUTHOR: Steven Baltakatei Sandoval
#+EMAIL: baltakatei@gmail.com
Linux) in ~$HOME/.local/bin~.
***** Disable Swap File
Linux) in ~$HOME/.local/bin~.
***** Disable Swap File
-Since standard Raspbian 10 install involves copying unencrypted file
-system image to SD card which is mounted by the Raspberry Pi, system
-memory may be written to disk in the form of a Swap file as described
-[[https://ideaheap.com/2013/07/stopping-sd-card-corruption-on-a-raspberry-pi/][here]]. In order to reduce the chance that location log data is ever
-written to disk, swap file functionality must be disabled.
+Since standard Raspbian 10 (Buster) install involves copying
+unencrypted file system image to SD card which is mounted by the
+Raspberry Pi, system memory may be written to disk in the form of a
+Swap file as described [[https://ideaheap.com/2013/07/stopping-sd-card-corruption-on-a-raspberry-pi/][here]]. In order to reduce the chance that
+location log data is ever written to disk, swap file functionality
+must be disabled[fn:ideaheap_20130731_disableswap].
+
+Raspbian 10 uses dphys-swapfile to manage a swap file. It may be
+disabled persistently[fn:rpf_20190702_disableswappersist] by running
+the following command:
+
+: sudo systemctl disable dphys-swapfile.service
To view the status of the swap file in Raspbian 10, run ~free -m~:
#+BEGIN_EXAMPLE
pi@ninfacyzga-01:~$ free -m
To view the status of the swap file in Raspbian 10, run ~free -m~:
#+BEGIN_EXAMPLE
pi@ninfacyzga-01:~$ free -m
- total used free shared buff/cache available
-Mem: 432 86 36 21 309 268
-Swap: 99 0 99
+ total used free shared buff/cache available
+Mem: 432 86 36 21 309 268
+Swap: 99 0 99
-The swap file may be disabled by:
+After disabling the swap file and rebooting:
-pi@ninfacyzga-01:~$ sudo dphys-swapfile swapoff
-pi@ninfacyzga-01:~$ sudo dphys-swapfile uninstall
-pi@ninfacyzga-01:~$ sudo update-rc.d dphys-swapfile remove
pi@ninfacyzga-01:~$ free -m
pi@ninfacyzga-01:~$ free -m
- total used free shared buff/cache available
-Mem: 432 96 33 22 302 258
-Swap: 0 0 0
+ total used free shared buff/cache available
+Mem: 432 89 214 3 128 289
+Swap: 0 0 0
+[fn:ideaheap_20130731_disableswap] Explanation:
+https://ideaheap.com/2013/07/stopping-sd-card-corruption-on-a-raspberry-pi/
+
+[fn:rpf_20190702_disableswappersist] Persistant disabling of swap in
+Raspbian 10 Buster:
+https://www.raspberrypi.org/forums/viewtopic.php?p=1490692&sid=5c596a124b7805d6b10dab8d3d7caf16#p1490692
+
***** Automatic Start Configuration
Edit the user cron job list with ~$ crontab -e~ to add the following
***** Automatic Start Configuration
Edit the user cron job list with ~$ crontab -e~ to add the following
#+BEGIN_EXAMPLE
$ umask # Gets current umask
0022 # Note: This is the default umask for Raspbian 10
#+BEGIN_EXAMPLE
$ umask # Gets current umask
0022 # Note: This is the default umask for Raspbian 10
-$ umask 066 # Sets umask so key.txt will have no permissions except for owner (you)
+$ umask 066 # So key.txt will have no perms except for owner (you)
$ umask # Confirm umask set to 066
0066
$ age-keygen > key.txt
$ umask # Confirm umask set to 066
0066
$ age-keygen > key.txt