Click here to Skip to main content
15,885,546 members
Articles / Internet of Things / Raspberry-Pi

Unsafely Powering Off a #raspberrypi

Rate me:
Please Sign up or sign in to vote.
0.00/5 (No votes)
27 Jul 2014MIT 5K   1  
Unsafely powering off a #raspberrypi

It has been one year since I started administrating my portable network, where the following raspberries have main roles.

  • stargate is Access Point, DNS, DHCP, VPN, Iptables
  • theark is media center, samba share and download manager
  • source is GIT server, Jenkins and node.js test server

What happens is that due to the lack of poweroff switches on the raspberries, I always turn them off unsafely by just turning off their power source.

It's very impolite from me but I want these machines to be as resilient as possible.

Because of this, from time to time, I've to run fsck manually to fix boot time file system errors on the USB sticks (I'm using ext3/ext4 on the raspberry partitions).

systemd-fsck[299]: storage: Superblock last mount time (Sat Oct 30 17:11:14 2038,
systemd-fsck[299]: now = Wed Oct 30 18:12:01 2013) is in the future.

Meet the source. This was the last raspberry receiving the fsck treatment.

Image 1

What I did to avoid this manual fsck was to edit sudo vim /etc/default/rcS and set FSCKFIX=yes. This will add some extra time to your boot but on the other hand, this will allow the raspberry to recover automatically from file system errors!

My /etc/default/rcS in all raspberries look like this:

# delete files in /tmp during boot older than x days.
# '0' means always, -1 or 'infinite' disables the feature
TMPTIME=0

# spawn sulogin during boot, continue normal boot if not used in 30 seconds
#SULOGIN=no

# do not allow users to log in until the boot has completed
#DELAYLOGIN=no

# be more verbose during the boot process
VERBOSE=yes

# automatically repair filesystems with inconsistencies during boot
FSCKFIX=yes

Pass the word by retweeting or sharing this with your friends.

Image 2 Image 3
This article was originally posted at http://feeds.feedburner.com/divhide

License

This article, along with any associated source code and files, is licensed under The MIT License


Written By
Web Developer
Portugal Portugal
This member has not yet provided a Biography. Assume it's interesting and varied, and probably something to do with programming.

Comments and Discussions

 
-- There are no messages in this forum --