REXYGEN forum has been moved. This one is closed.
Head over to the new REXYGEN Community Forum at

Looking forward to meeting you there!

#1 2016-10-04 16:56:58

Registered: 2016-09-05
Posts: 60

Read only raspberry pi OS and RexCore

Hi there,

here is nice art about making Raspbian (or other Raspberry Pi OS) read only:

I was wondering if making read only system when using RexCore will be achievable?
Logging - that's for sure will be problematic. But any others?
When RexCore is writing something to the filesystem? When using SGSLP block - right?
Any other?

Of course before uploading new code to the raspberry it is necessary to switch to read/write mode.



#2 2016-10-04 19:28:50

tomáš čechura
Registered: 2016-02-22
Posts: 371

Re: Read only raspberry pi OS and RexCore

Hi Hubert,

thank you for sharing your interesting thoughts. You already pointed out the key things which one should be aware of.
A solution depends on your exact needs - do you want pure Read only file system with temporary storage or do you need to store some persistent data? (SGSLP, Archives, ...).

First, let's solve the temporary / persistent storage issue and the Read only setup will follow.

Temporary storage can be achieved as follows:

  1. Edit fstab:

    sudo nano /etc/fstab
  2. Add the line:

    none      /rex/rexcore/ramdisk        tmpfs      size=10M          0        0
  3. Save and reboot.

  4. Redirect all your temporary data to "/rex/rexcore/ramdisk" folder.

Persistent storage:
My approach is to create a new Read write partition of desired volume (500 MB or so depending on the purpose):

  1. Insert SD card into Linux based PC with installed "gparted" (I'm pretty sure there must be a way how to shrink the partition directly in the Raspberry but the use of external Linux PC was easier for me)

    apt-get install gparted
  2. Shrink /root partition to fit the desired volume.

  3. Create ext4 primary partition.

  4. Insert the SD card back to Raspberry Pi and start it.

  5. Create folder where to mount the new partition

    mkdir /rex/arc
  6. Edit fstab:

    sudo nano /etc/fstab
  7. Add the line:

    /dev/mmcblk0p3  /rex/arc        ext4    defaults        0       2
  8. Save and reboot.

  9. Redirect all your temporary data to "/rex/arc" folder.

Read only file system can be done for example according to the tutorial you already mentioned.
I was inspired by this tutorial: … d-only-sd/
(if you don't need to use Chromium browser in "kiosk mode" you can focus only on Chapter "Make the SD read-only")

Hope that this can act as a source of new ideas on "How to make Raspberry Pi read-only with REX Control System".
I will be happy to answer all your questions.

Regards, Tomas


Board footer

Powered by FluxBB