View Single Post
  #3   Spotlight this post!  
Unread 18-02-2016, 20:32
apalrd's Avatar
apalrd apalrd is offline
More Torque!
AKA: Andrew Palardy (Most people call me Palardy)
VRC #3333
Team Role: College Student
 
Join Date: Mar 2009
Rookie Year: 2009
Location: Auburn Hills, MI
Posts: 1,347
apalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond reputeapalrd has a reputation beyond repute
Re: Shutting Down a Robot-Mounted Pi

As long as you never write the SD card, then the SD card's wear leveling feature shouldn't try to move blocks around.

This requires:
-Disabling swap entirely (it's generally a good idea to disable virtual memory entirely on real-time systems anyway)
-Mount the SD card as read-only
-Mount the temp directory onto a RAM disk

There are some tutorials on the internet explaining this, there are a lot of nuances since a number of automatically installed packages will try to write to disk (including syslog and fake-hwclock among others). Once you take care of all of those, you can set the fstab to mount the partition as read only so no program can write to the disk.

It's certainly possible for a carefully designed system to be turned off by pulling power. Virtually all embedded systems including the roboRIO operate in this way.
__________________
Kettering University - Computer Engineering
Kettering Motorsports
Williams International - Commercial Engines - Controls and Accessories
FRC 33 - The Killer Bees - 2009-2012 Student, 2013-2014 Advisor
VEX IQ 3333 - The Bumble Bees - 2014+ Mentor

"Sometimes, the elegant implementation is a function. Not a method. Not a class. Not a framework. Just a function." ~ John Carmack