<?xml version="1.0"?>
<feed xmlns="http://www.w3.org/2005/Atom" xml:lang="en">
	<id>http://etcwiki.org/index.php?action=history&amp;feed=atom&amp;title=Shutdown_and_Restart_Properly_-_Raspberry_Pi</id>
	<title>Shutdown and Restart Properly - Raspberry Pi - Revision history</title>
	<link rel="self" type="application/atom+xml" href="http://etcwiki.org/index.php?action=history&amp;feed=atom&amp;title=Shutdown_and_Restart_Properly_-_Raspberry_Pi"/>
	<link rel="alternate" type="text/html" href="http://etcwiki.org/index.php?title=Shutdown_and_Restart_Properly_-_Raspberry_Pi&amp;action=history"/>
	<updated>2026-06-18T18:44:09Z</updated>
	<subtitle>Revision history for this page on the wiki</subtitle>
	<generator>MediaWiki 1.43.1</generator>
	<entry>
		<id>http://etcwiki.org/index.php?title=Shutdown_and_Restart_Properly_-_Raspberry_Pi&amp;diff=3235&amp;oldid=prev</id>
		<title>Ddxfish: Ddxfish moved page Raspberry Pi - Shutdown and Restart to Shutdown and Restart Properly - Raspberry Pi</title>
		<link rel="alternate" type="text/html" href="http://etcwiki.org/index.php?title=Shutdown_and_Restart_Properly_-_Raspberry_Pi&amp;diff=3235&amp;oldid=prev"/>
		<updated>2013-09-25T18:11:47Z</updated>

		<summary type="html">&lt;p&gt;Ddxfish moved page &lt;a href=&quot;/wiki/Raspberry_Pi_-_Shutdown_and_Restart&quot; class=&quot;mw-redirect&quot; title=&quot;Raspberry Pi - Shutdown and Restart&quot;&gt;Raspberry Pi - Shutdown and Restart&lt;/a&gt; to &lt;a href=&quot;/wiki/Shutdown_and_Restart_Properly_-_Raspberry_Pi&quot; title=&quot;Shutdown and Restart Properly - Raspberry Pi&quot;&gt;Shutdown and Restart Properly - Raspberry Pi&lt;/a&gt;&lt;/p&gt;
&lt;p&gt;&lt;b&gt;New page&lt;/b&gt;&lt;/p&gt;&lt;div&gt;After using like 5 different Raspberry Pi&amp;#039;s with multiple setups, OS, SD cards, and methods of restarting, I had found I was restarting and shutting down wrong and frequently destroying or losing files that were recently open or near to others in the data structure. I lost my entire first setup after 40 or so hours of learning and work due to using &amp;#039;&amp;#039;&amp;#039;init 6&amp;#039;&amp;#039;&amp;#039; to restart the pi.&lt;br /&gt;
[[Category:Raspberry Pi]]&lt;br /&gt;
You will find people that will tell you this is safe. They are correct-- most of the time. You can use the &amp;#039;&amp;#039;&amp;#039;reboot&amp;#039;&amp;#039;&amp;#039; command also but it does the same thing and is also unsafe.&lt;br /&gt;
&lt;br /&gt;
My solution was to create a restart script that stops any services I can, then kills any running programs that could interfere with my file system if forced to shutdown too early, then waits 15 seconds and uses the shutdown command after the pause. I made this script reboot.sh to avoid data corruption on my pi (it happened 4 or 5 times!). Feel free to copy and modify to your taste.&lt;br /&gt;
&lt;br /&gt;
 echo &amp;quot;Beginning forced shutdown script&amp;quot;&lt;br /&gt;
 #unmount my network share (cifs)&lt;br /&gt;
 umount -f /jane&lt;br /&gt;
 #cron triggers scripts all the time on my setup, kill it!&lt;br /&gt;
 service cron stop&lt;br /&gt;
 ##service running my python buttons listen script&lt;br /&gt;
 service pybuttons stop&lt;br /&gt;
 killall python&lt;br /&gt;
 service mpd stop&lt;br /&gt;
 service ntp stop&lt;br /&gt;
 service alsa-utils stop&lt;br /&gt;
 service networking stop&lt;br /&gt;
 service ssh stop&lt;br /&gt;
 killall fbi&lt;br /&gt;
 killall samba&lt;br /&gt;
 killall mpd&lt;br /&gt;
 killall mpc&lt;br /&gt;
 killall vim&lt;br /&gt;
 killall vi&lt;br /&gt;
 killall omxplayer&lt;br /&gt;
 killall sftp-server&lt;br /&gt;
 killall python&lt;br /&gt;
 #unmount my network share (cifs) again just in case!&lt;br /&gt;
 umount -f /jane&lt;br /&gt;
 sleep 15&lt;br /&gt;
 shutdown -h -r now&lt;/div&gt;</summary>
		<author><name>Ddxfish</name></author>
	</entry>
</feed>