logo
background
 Home and Links
 Your PC and Security
 Server NAS
 Wargames
 Astronomy
 PhotoStory
 DVD making
 Raspberry Pi
 PIC projects
 Other projects
 Next >>

Notes index links

Links to all my notes (includes mini-projects and source code etc)

(+) 0001 How do I change the Pi System partition size ?

(+) 0100 Device tree settings

(+) 0201 Power over Ethernet - (PoE)

(+) 0202 Solar Power - (with WiFi)

(+) 0203 Power Bank pass through

(+) 0400 Accessing the SDHC card system image

(+) 0401 Accessing PC shares from the Pi

(+) 0402 Installing samba - (the Pi as a Network Share on your PC)

(+) 0900 Can this approach be scaled up to a PC UPS ?

(+) 1001 Pandora Spotify on the Pi

(+) 1002 Playing movies on the Pi

(+) 1003 Getting VGA from the HDMI socket

(+) 1004 Using the RCA socket

(+) 1005 Using the Pi RS232 serial links

(+) 1006 Using the GPIO pins

(+) 1007 Controlling the Pi Zero ACT LED

(+) 1200 List of standard camera modes

(+) 1300 Auto file names

(+) 6500 How to make the System partition read only ?



(-) 6501 Minimising SDHC corruption on power down


Minimising the chances of SDHC corruption

Every time you 'power-off' without using the 'sudo shutdown now' command, you risk corrupting the SDHC card.

Whilst this appears a lot less likely with newer versions of the Pi hardware, current versions of the System software insist on writing extensive 'log files' to the SD card.

Worse, in an effort to address the limited RAM, the latest Pi Operating System has gone down the Windows route of 'swap files'.

Needless to say, continually writing logs and swapping bits of the System between RAM and the SD card more or less guarantees eventual corruption on pulling the power plug.

To combat this, you can make the system partition 'read only', move the logs to a RAM disk (tmpfs) and disable the swapfile system. Edit the file systems table by typing :-

sudo nano /etc/fstab

at the command prompt.  Change the default contents of this file to that listed below.


proc            /proc               proc    defaults                    0   0
/dev/mmcblk0p1  /boot               vfat    ro,noatime                  0   2
/dev/mmcblk0p2  /                   ext4    defaults,noatime            0   1
none            /var/run            tmpfs   size=1M,noatime             0   0
none            /var/log            tmpfs   size=1M,noatime             0   0


Save this file and exit to the command prompt.


To disable the swap file system, type the following commands at the command prompt.

sudo dphys-swapfile swapoff
sudo dphys-swapfile uninstall
sudo update-rc.d dphys-swapfile remove


This note last modified: 17th Sep 2016 08:10.

[top]

(+) 9000 diode switch

(+) 9001 Auto shut down

(+) 9001 MOSFET switch

(+) C201 High speed photos

(+) Dec 1969 (no desc)

(+) a000 Display setup - (for PhotoFrame)

(+) a001 go photoframe - (how it works)

(+) a002 set photo - (select for display)

(+) a003 go button script - (photoframe pause control)

(+) a005 get photos - (fetch resize)

(+) a00x Other display utilities

(+) c000 CCTV UPS requirements

(+) c001 countering low speed motion detect

(+) c002 Pi Overclocking

(+) c203 Pi ram disk - (tmpfs)

(+) c901 iR illumination

(+) c902 Viewing a video stream

(+) c905 Image anotation

(+) Dec 1969 (no desc)

(+) raspicamdocs.txt (no desc)

(+) s010 Elevation sensing

Next subject :- index

[top]