Click here to Skip to main content
Click here to Skip to main content

Tagged as

Go to top

unsafely powering off a #raspberrypi

, 27 Jul 2014
Rate this:
Please Sign up or sign in to vote.
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, Iptablestheark is media center, samba share and download managersource is GIT server, Jenkins and node.js test serverWhat happens is that

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 turn 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.

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.

License

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

Share

About the Author

aetheon
Web Developer
Portugal Portugal
No Biography provided

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Mobile
Web01 | 2.8.140916.1 | Last Updated 28 Jul 2014
Article Copyright 2014 by aetheon
Everything else Copyright © CodeProject, 1999-2014
Terms of Service
Layout: fixed | fluid