Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Next revision
Previous revision
raspberry:read_only [2021/05/27 13:50]
admin created
raspberry:read_only [2021/05/27 14:23] (current)
admin [Remount]
Line 1: Line 1:
 ===== Read-Only SD Card ===== ===== Read-Only SD Card =====
-Change your SD card to a read-only mode.\\ 
-[[http://raspberrypi.stackexchange.com/questions/5112/running-on-read-only-sd-card]]\\ 
-[[https://web.archive.org/web/20150101110424/http://raspberrycenter.de/forum/umruestung-raspberry-pi-read-only-root-filesystem]]\\ 
  
-==== Fstab ==== +If one needs a Raspberry Pi that shuts down save by just unplugging and without having the risk of corrupting the SD card one has to change the SD card to a read-only mode.\\ 
-in:+ 
 +---- 
 +==== Drives ==== 
 +In the fstab:
   $ sudo nano /etc/fstab   $ sudo nano /etc/fstab
-change:+one has to change the SD card to read only (ro) and one has to make a temporary virtual drive (30MB), too:
   /dev/mmcblk0p2  /               ext4    defaults,noatime,ro  0       1   /dev/mmcblk0p2  /               ext4    defaults,noatime,ro  0       1
   tmpfs           /tmp            tmpfs   defaults,size=30M    0       0   tmpfs           /tmp            tmpfs   defaults,size=30M    0       0
  
 ---- ----
-==== Disable some Programms ==== +==== Disable some Programs ==== 
-disable rsyslog and dphys-swapfile:\\+One has to disable some programs,  rsyslog and dphys-swapfile:\\
  
   $ sudo systemctl disable rsyslog   $ sudo systemctl disable rsyslog
   $ sudo systemctl disable dphys-swapfile   $ sudo systemctl disable dphys-swapfile
 +
 +If one needs a programs that requires writing one has to make sure that will be in the temporary drive. That could be done for example with a symbolic link:
 +  $ ln -s /home/pi/tmp /tmp
  
 ---- ----
 ==== Remount ==== ==== Remount ====
-To remount the partition writabe:\\+ 
 +For changes in the system one has to remount the partition writable:\\
   $ sudo mount / -o remount,rw   $ sudo mount / -o remount,rw
 +
 +----
 +==== Links ====
 +
 +[[http://raspberrypi.stackexchange.com/questions/5112/running-on-read-only-sd-card]]\\
 +[[https://web.archive.org/web/20150101110424/http://raspberrycenter.de/forum/umruestung-raspberry-pi-read-only-root-filesystem]]\\
  
 ---- ----