<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0"><channel><title><![CDATA[Protect your Raspberry PI SD card, use Read-Only filesystem]]></title><description><![CDATA[<p dir="auto">Today I decided to protect all my Raspberry Pi SD cards from unproper shutdown and also prevent SD card premature end of life. This means protect them from power outage or just unplugging the power while the Pi is running.… <a href="http://hallard.me/raspberry-pi-read-only" target="_blank" rel="noopener noreferrer nofollow ugc">Continue Reading</a></p>
<p dir="auto"><strong>Click <a href="http://hallard.me/raspberry-pi-read-only/" target="_blank" rel="noopener noreferrer nofollow ugc">here</a> to see the full blog post</strong></p>
]]></description><link>https://community.ch2i.eu/topic/38/protect-your-raspberry-pi-sd-card-use-read-only-filesystem</link><generator>RSS for Node</generator><lastBuildDate>Sun, 14 Jun 2026 17:00:44 GMT</lastBuildDate><atom:link href="https://community.ch2i.eu/topic/38.rss" rel="self" type="application/rss+xml"/><pubDate>Fri, 19 Jun 2015 21:33:30 GMT</pubDate><ttl>60</ttl><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Thu, 15 Aug 2019 17:25:58 GMT]]></title><description><![CDATA[<p dir="auto">Great article, thanks! Can I use this tip to make a Pi print server for some voucher printers and it stay well when it be turned off? Do you suggest some type of memory to be installed on Pi in order to run this way?</p>
]]></description><link>https://community.ch2i.eu/post/2874</link><guid isPermaLink="true">https://community.ch2i.eu/post/2874</guid><dc:creator><![CDATA[hernaninf]]></dc:creator><pubDate>Thu, 15 Aug 2019 17:25:58 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Wed, 26 Dec 2018 14:44:55 GMT]]></title><description><![CDATA[<p dir="auto">I am following this article in order avoid any/every write to /var/log/  (for example /var/log/wtmp, /var/log/last.log etc.<br />
Is it possible?</p>
<p dir="auto">Note that by disabling rsyslog.service, I could suppress write to messages and syslog files.</p>
<p dir="auto">Using systemd mask operation I could mask systemd-update-utmp.service and systemd-update-utmp-runlevel.service. However the wtmp and lastlog files are still updated.</p>
<p dir="auto">Please advise.</p>
]]></description><link>https://community.ch2i.eu/post/2650</link><guid isPermaLink="true">https://community.ch2i.eu/post/2650</guid><dc:creator><![CDATA[HemantJoshi]]></dc:creator><pubDate>Wed, 26 Dec 2018 14:44:55 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Thu, 26 Jul 2018 08:05:56 GMT]]></title><description><![CDATA[<p dir="auto">Nice guide.  I used it on Stretch.</p>
<ul>
<li>I had to symlink /var/lib/sudo/ts to /tmp because it gives an error every time running sudo, then I made a systemd service to make that folder</li>
<li>The /tmp/random-seed file does not get created at startup, even though I added the ExecStartPre line.  It says success, but I can't figure out why that file isn't being created:<br />
<code>Process: 97 ExecStartPre=/bin/echo a &gt; /tmp/random-seed (code=exited, status=0/SUCCESS)</code></li>
<li>Stretch uses systemd-timesyncd, so there's no need for ntp and it would conflict.</li>
<li>I like the bash_logout idea to mount ro, but it fails because <code>mount: only root can use "--options" option</code></li>
<li>Fail2ban isn't working.  Anybody know if it's possible to configure that to monitor the busybox ring buffer?</li>
</ul>
]]></description><link>https://community.ch2i.eu/post/2504</link><guid isPermaLink="true">https://community.ch2i.eu/post/2504</guid><dc:creator><![CDATA[Elliott Balsley]]></dc:creator><pubDate>Thu, 26 Jul 2018 08:05:56 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Sat, 07 Apr 2018 17:44:16 GMT]]></title><description><![CDATA[<p dir="auto">OK, nice tutorial. But where (I mean about file) I have to place:</p>
<p dir="auto">rm -rf /var/lib/dhcp/ /var/lib/dhcpcd5 /var/run /var/spool /var/lock /etc/resolv.conf<br />
ln -s /tmp /var/lib/dhcp<br />
ln -s /tmp /var/lib/dhcpcd5<br />
ln -s /tmp /var/run<br />
ln -s /tmp /var/spool<br />
ln -s /tmp /var/lock<br />
touch /tmp/dhcpcd.resolv.conf; ln -s /tmp/dhcpcd.resolv.conf /etc/resolv.conf</p>
]]></description><link>https://community.ch2i.eu/post/2434</link><guid isPermaLink="true">https://community.ch2i.eu/post/2434</guid><dc:creator><![CDATA[Piotr Mackowiak]]></dc:creator><pubDate>Sat, 07 Apr 2018 17:44:16 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Sat, 17 Mar 2018 16:53:29 GMT]]></title><description><![CDATA[<p dir="auto">I don't seem to be able to copy/paste from your crayon syntax highlighter widgets? The copy button doesn't work, nor does the button to expand the code.</p>
]]></description><link>https://community.ch2i.eu/post/2399</link><guid isPermaLink="true">https://community.ch2i.eu/post/2399</guid><dc:creator><![CDATA[Antoine Megens]]></dc:creator><pubDate>Sat, 17 Mar 2018 16:53:29 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Mon, 31 Jul 2017 14:15:27 GMT]]></title><description><![CDATA[<p dir="auto">Has this tutorial worked for anyone? The 1st error is saw was under Move files to temp filesystem after running:</p>
<p dir="auto">touch /tmp/dhcpcd.resolv.conf; ln -s /tmp/dhcpcd.resolv.conf /etc/resolv.conf</p>
<p dir="auto">Failed to create symbolic link ‘etc/resolv.conf’ file exists. Next after reboot see errors regarding “a start job is running for dhcpd on all interfaces..." The raspi fails to boot and see pi@raspberrypi: prompt. Thanks in advance for any insights!</p>
]]></description><link>https://community.ch2i.eu/post/2334</link><guid isPermaLink="true">https://community.ch2i.eu/post/2334</guid><dc:creator><![CDATA[dev]]></dc:creator><pubDate>Mon, 31 Jul 2017 14:15:27 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Fri, 14 Jul 2017 15:30:40 GMT]]></title><description><![CDATA[<p dir="auto">Great article, thanx! To be able to use sudo i did have to add this line to /etc/fstab as well:</p>
<p dir="auto">tmpfs           /var/lib/sudo/ts        tmpfs   nosuid,nodev         0       0</p>
]]></description><link>https://community.ch2i.eu/post/2305</link><guid isPermaLink="true">https://community.ch2i.eu/post/2305</guid><dc:creator><![CDATA[Rok Jarc]]></dc:creator><pubDate>Fri, 14 Jul 2017 15:30:40 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Mon, 08 May 2017 06:04:24 GMT]]></title><description><![CDATA[<p dir="auto">Hello Charles,<br />
I was wondering if I don't have entry about /tmp being a mount entry point for tmpfs neither in fstab nor mtab, what would be the point in moving things there? Am I missing something or?<br />
I am playing with Raspberry PI-2 and Raspbian Jessie.</p>
]]></description><link>https://community.ch2i.eu/post/2239</link><guid isPermaLink="true">https://community.ch2i.eu/post/2239</guid><dc:creator><![CDATA[Neoromantic]]></dc:creator><pubDate>Mon, 08 May 2017 06:04:24 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Sun, 07 May 2017 21:09:33 GMT]]></title><description><![CDATA[<p dir="auto">Charles you are going wrong. crontab -e give us file on /tmp which has been deleted on boot. We need to go this way:<br />
rw<br />
sudo su<br />
nano /etc/crontab (dont forget to add user) example below:</p>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<ul>
<li>
<ul>
<li>root /usr/bin/vpncheck.sh &gt; /dev/null 2&gt;&amp;1</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
</li>
</ul>
]]></description><link>https://community.ch2i.eu/post/2238</link><guid isPermaLink="true">https://community.ch2i.eu/post/2238</guid><dc:creator><![CDATA[Damian Mac]]></dc:creator><pubDate>Sun, 07 May 2017 21:09:33 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Mon, 27 Mar 2017 09:20:07 GMT]]></title><description><![CDATA[<p dir="auto">We need to put the system into Read Write Mode before changing the crontab<br />
If you followed this tuto should be something like that</p>
<pre><code class="language-shell">sudo mount -o remount,rw /
</code></pre>
<p dir="auto">Then edit your crontab</p>
<pre><code class="language-shell">sudo crontab -e
</code></pre>
<p dir="auto">put pack in Read Only or reboot</p>
<pre><code class="language-shell">sudo mount -o remount,ro /
</code></pre>
]]></description><link>https://community.ch2i.eu/post/2191</link><guid isPermaLink="true">https://community.ch2i.eu/post/2191</guid><dc:creator><![CDATA[Charles]]></dc:creator><pubDate>Mon, 27 Mar 2017 09:20:07 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Fri, 24 Mar 2017 15:48:46 GMT]]></title><description><![CDATA[<p dir="auto">Did anyone figured out how to use crontab? it is wiped after reboot and i really need it <img src="https://community.ch2i.eu/assets/plugins/nodebb-plugin-emoji/emoji/android/1f61e.png?v=0e43f71205d" class="not-responsive emoji emoji-android emoji--disappointed" style="height:23px;width:auto;vertical-align:middle" title=":(" alt="😞" /></p>
]]></description><link>https://community.ch2i.eu/post/2188</link><guid isPermaLink="true">https://community.ch2i.eu/post/2188</guid><dc:creator><![CDATA[Cavallonzio]]></dc:creator><pubDate>Fri, 24 Mar 2017 15:48:46 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Sun, 12 Mar 2017 02:20:49 GMT]]></title><description><![CDATA[<p dir="auto">Hello! Can anybody help me with user crontab file? I have problem: i installed raspbian in Read-only mode, i have some scripts, (cron jobs) that works every 5 minutes, 10 etc. I set it by <strong>crontab -e</strong> command, but after reboot, system is clean it, i think, because i moved /var/spool dir to tmpfs (like howto), and user cronjob file stored at /var/spool/cron/crontabs dir. How i can fix it for not clearing after system reboot? Thanks!</p>
]]></description><link>https://community.ch2i.eu/post/2173</link><guid isPermaLink="true">https://community.ch2i.eu/post/2173</guid><dc:creator><![CDATA[mocart2]]></dc:creator><pubDate>Sun, 12 Mar 2017 02:20:49 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Sat, 11 Mar 2017 23:13:33 GMT]]></title><description><![CDATA[<p dir="auto">you need to be root..<br />
use 'sudo'</p>
]]></description><link>https://community.ch2i.eu/post/2171</link><guid isPermaLink="true">https://community.ch2i.eu/post/2171</guid><dc:creator><![CDATA[mjeanne]]></dc:creator><pubDate>Sat, 11 Mar 2017 23:13:33 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Fri, 10 Mar 2017 18:48:18 GMT]]></title><description><![CDATA[<p dir="auto">How to fix this ?</p>
<p dir="auto">pi@raspberrypi(ro):~$ reboot<br />
Failed to execute operation: The name org.freedesktop.PolicyKit1 was not provided by any .service files<br />
Must be root.</p>
]]></description><link>https://community.ch2i.eu/post/2169</link><guid isPermaLink="true">https://community.ch2i.eu/post/2169</guid><dc:creator><![CDATA[Bruno Duarte]]></dc:creator><pubDate>Fri, 10 Mar 2017 18:48:18 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Sat, 04 Feb 2017 04:01:16 GMT]]></title><description><![CDATA[<p dir="auto">You should really add some commentary about the tmpfs lines in /etc/fstab before the code listing.  When I got to that step, I read that we were ready to set the volume to read-only, and thought, "I know how to do that," and stopped reading at that point, resulting in an unbootable system.  I'd imagine many other folks with sysadmin experience will do the same.  Actually, you should probably add the tmpfs lines first before you start making changes that depend on them, then make the changes, then change fstab a second time to make it read-only.  Also, for Jessie, the systemd changes are unnecessary, because /run is already a tmpfs volume.  And it might be worth redirecting things from /var/run to /run just for simplicity (on Jessie).</p>
]]></description><link>https://community.ch2i.eu/post/2095</link><guid isPermaLink="true">https://community.ch2i.eu/post/2095</guid><dc:creator><![CDATA[dgatwood]]></dc:creator><pubDate>Sat, 04 Feb 2017 04:01:16 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Fri, 30 Dec 2016 19:38:18 GMT]]></title><description><![CDATA[<p dir="auto">Will brick your Pi if you're running the new PIXEL distro. Any idea what's causing this?</p>
]]></description><link>https://community.ch2i.eu/post/2014</link><guid isPermaLink="true">https://community.ch2i.eu/post/2014</guid><dc:creator><![CDATA[willn]]></dc:creator><pubDate>Fri, 30 Dec 2016 19:38:18 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Thu, 22 Dec 2016 03:21:15 GMT]]></title><description><![CDATA[<p dir="auto">need to change UPEX4C_autoconfigfil in /usr/sbin/update-exim4.conf</p>
]]></description><link>https://community.ch2i.eu/post/1982</link><guid isPermaLink="true">https://community.ch2i.eu/post/1982</guid><dc:creator><![CDATA[cfreund]]></dc:creator><pubDate>Thu, 22 Dec 2016 03:21:15 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Fri, 28 Oct 2016 11:48:02 GMT]]></title><description><![CDATA[<p dir="auto">Hi !</p>
<p dir="auto">I've tried to complete tour tutorial but when I do the step "Move some system files to temp filesystem", I've detected that it result on a dbus problem that when the Raspberry is rebooted It can resolve the dhcp and hostname service.</p>
<p dir="auto">Can anyone help me please?</p>
]]></description><link>https://community.ch2i.eu/post/1820</link><guid isPermaLink="true">https://community.ch2i.eu/post/1820</guid><dc:creator><![CDATA[FBorges]]></dc:creator><pubDate>Fri, 28 Oct 2016 11:48:02 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Fri, 28 Oct 2016 08:10:05 GMT]]></title><description><![CDATA[<p dir="auto">Hi I successfully made my Pi Zero v 1.3 Read Mode, but a problem came up when I was trying to connect to internet with a 3g usb dongle.</p>
<p dir="auto">First, the modem get connected to internet, but after a minute or less, it losed the connection, and then it reconnects, and the same story was looping forever.</p>
<p dir="auto">After thinking, the problem was the DNS, because when the modem connects to internet, it changes the default DNS and tried to write the new DNS to the default file, here is the problem, the modem didn't notice that he cant write to the SD!</p>
<p dir="auto">I took the solution from here: <a href="https://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/read-only.md" target="_blank" rel="noopener noreferrer nofollow ugc">https://github.com/emoncms/emoncms/blob/master/docs/RaspberryPi/read-only.md</a></p>
<p dir="auto">touch /tmp/resolv.conf<br />
sudo rm /etc/resolv.conf<br />
sudo ln -s /tmp/resolv.conf /etc/resolv.conf</p>
<p dir="auto">touch /tmp/resolv.conf.dhclient-new<br />
sudo chmod 777 /tmp/resolv.conf.dhclient-new<br />
sudo rm /etc/resolv.conf.dhclient-new<br />
sudo ln -s /tmp/resolv.conf.dhclient-new /etc/resolv.conf.dhclient-new</p>
<p dir="auto">sudo mv /sbin/dhclient-script /sbin/dhclient-script_original<br />
sudo ln -s /home/pi/emonpi/dhclient-script_raspbian_jessielite /sbin/dhclient-script</p>
<p dir="auto">Then rebooted and all worked fine, the 3g modem connected to the internet and never disconnected, then I successfully SSH with <a href="http://weaved.com" target="_blank" rel="noopener noreferrer nofollow ugc">weaved.com</a> service.</p>
<p dir="auto">After that another problem came up, my system is a GPS tracker for public transport, so there is a GPS module in my system, and the GPS was not working for the same reason as the 3g modem.</p>
<p dir="auto">I'm using a "Ublox Neo 6m GPS" and GPSD to get the required information.</p>
<p dir="auto">When GPSD run at boot it tryes to write a configuration file to open the stream, but it cant because the Pi is in read mode, so we need to put in that file what GPSD write at boot.</p>
<p dir="auto">To solve this, just edit this file: /etc/default/gpsd</p>
<p dir="auto">Then edit as this:</p>
<p dir="auto">START_DAEMON="true"<br />
GPSD_OPTIONS="-n"<br />
DEVICES="/dev/ttyAMA0"  #My GPS is connected via UART, change if yours is via USB or whatelse<br />
USBAUTO="true"<br />
GPSD_SOCKET="/var/run/gpsd.sock"</p>
<p dir="auto">Finally reboot and all will work fine.</p>
<p dir="auto">So, if you are having a problem with a sensor or what else, first verify if the program who communicates with it needs to write sometime to the SD.</p>
<p dir="auto">Thank you and greetings from Mexico!!!</p>
]]></description><link>https://community.ch2i.eu/post/1819</link><guid isPermaLink="true">https://community.ch2i.eu/post/1819</guid><dc:creator><![CDATA[Ing.Fernando]]></dc:creator><pubDate>Fri, 28 Oct 2016 08:10:05 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Sun, 23 Oct 2016 09:34:38 GMT]]></title><description><![CDATA[<p dir="auto">I tried this tutorial twice and both times couldn't SSH in after the final reboot. I found this tutorial a little more helpful - <a href="http://petr.io/en/blog/2015/11/09/read-only-raspberry-pi-with-jessie/" target="_blank" rel="noopener noreferrer nofollow ugc">http://petr.io/en/blog/2015/11/09/read-only-raspberry-pi-with-jessie/</a>. I susptec the difference was the part they mentione specifically enables SSH after changing these settings. That tutorial also makes it a little more clear that you have to add three lines in /etc/fstab, not just add ro twice.</p>
]]></description><link>https://community.ch2i.eu/post/1799</link><guid isPermaLink="true">https://community.ch2i.eu/post/1799</guid><dc:creator><![CDATA[notmichael]]></dc:creator><pubDate>Sun, 23 Oct 2016 09:34:38 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Wed, 12 Oct 2016 12:07:45 GMT]]></title><description><![CDATA[<p dir="auto">Hello,<br />
There is a (rather new) Olimex single board card with onboard 4GB eMMC MLC/SLC Flash<br />
Do you think this could be an answer to the corruption of data for an always on card ?<br />
(with regular backup...of cours...) or the problem is not related to SD card ???<br />
thx.</p>
]]></description><link>https://community.ch2i.eu/post/1757</link><guid isPermaLink="true">https://community.ch2i.eu/post/1757</guid><dc:creator><![CDATA[Joo]]></dc:creator><pubDate>Wed, 12 Oct 2016 12:07:45 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Tue, 04 Oct 2016 08:11:16 GMT]]></title><description><![CDATA[<p dir="auto">Update: My mistake I missed the sysmlink for /var/run.</p>
<p dir="auto">No need for my first comment.</p>
<p dir="auto">v<br />
v<br />
v</p>
]]></description><link>https://community.ch2i.eu/post/1736</link><guid isPermaLink="true">https://community.ch2i.eu/post/1736</guid><dc:creator><![CDATA[xproto]]></dc:creator><pubDate>Tue, 04 Oct 2016 08:11:16 GMT</pubDate></item><item><title><![CDATA[Reply to Protect your Raspberry PI SD card, use Read-Only filesystem on Tue, 04 Oct 2016 06:54:02 GMT]]></title><description><![CDATA[<p dir="auto">@Bruce Aldridge<br />
I cannot SSH too, to my RPi. What I did is I created a symlink for sshd</p>
<p dir="auto">ln -s /tmp /var/run/sshd</p>
<p dir="auto">Great article btw Charles! :). Thanks!</p>
]]></description><link>https://community.ch2i.eu/post/1735</link><guid isPermaLink="true">https://community.ch2i.eu/post/1735</guid><dc:creator><![CDATA[xproto]]></dc:creator><pubDate>Tue, 04 Oct 2016 06:54:02 GMT</pubDate></item></channel></rss>