====== Understanding the jPC's Storage Configuration ====== The jPC's primary storage is divided into the following partitions. To understand this partition layout and its purpose, please become familiar with the [[https://embeddedcomputing.com/technology/processing/understand-what-an-overlayfs-is-and-how-it-works|overlay file system]] and the [[https://refspecs.linuxfoundation.org/fhs.shtml|Filesystem Hierarchy Standard]].
Partition Label Capacity Mutability Description
boot 256MB read-only Contains kernel and bootloader configuration to boot the operating system.

Changes to this partition should not be necessary except under exceptional circumstances.
lower 5GB read-only Contains lower layer of the root overlay file system.

Changes to this partition should not be necessary except under exceptional circumstances.
upper 1GB read-write* Contains the upper layer of the root overlay file system.

Any changes made to the operating system's will be stored here and merged with the lower layer.

* After making changes, this partition can also be made read-only by deleting the file /var/lib/jpc/mount-read-write and rebooting. To make the partition read-write again, create the /var/lib/jpc/mount-read-write again and reboot.
data Remaining capacity read-write Contains files that are updated often, but need to be retained between boots.

By default /var and /media are bind mounted to this partition so they remain read-write even when the upper and lower partitions are read-only. Additional bind mounts can be created by editing /etc/fstab.

Transactional databases, log files, and files too large for /tmp can be stored on this partition.
If COMFILE Technology releases an update to the operating system, existing devices can be updated by restoring only the //boot// and //lower// partitions, thus preserving any developer or user changes stored on the //upper// and //data// partitions. With the upper and lower partitions read-only, their file systems can withstand abrupt loss of power without corruption, avoiding the need to shut down the system.