Persistent Partitions FAQ#

This FAQ provides details about the configuration, modification, and management of persistent partitions in the DRIVE OS environment.

How are the persistent partitions defined, and can they be modified?#

Answer: Persistent partitions are defined in the targetfs-images directory. The image names typically follow these patterns:

  • *-user-metadata*.img

  • *-user-data*.img

These images can be modified by regenerating them or by mounting them manually for direct edits (see Can persistent partitions be modified?).

How are the persistent partitions picked up at boot time? I don’t see fstab entries or systemd mount units for them.#

Answer: The partitions are mounted automatically during boot by the script: driveos-persistence*.sh. This script handles detection and mounting of the persistent partitions without requiring explicit entries in fstab or systemd mount units.

Is the root filesystem (RFS) image modified during flashing to enable these partitions?#

Answer: No, the RFS partition is not modified after flashing. The persistent partitions are mounted during boot after the flashing process completes. The RFS image is only modified during the flashing process itself.

How can I reflash an existing ODK so that the persistent partitions are wiped and no longer mounted at boot?#

Answer: To prevent the persistent partitions from being mounted at boot:

  1. Locate the following script: /drive/drive-linux/filesystem/contents/config/startup/scripts/nv_init.sh.

  2. In this file, comment out the lines that call: driveos-persistence.sh.

  3. Reflash the board.

The persistent partitions will no longer be mounted at boot.

Can persistent partitions be modified?#

Answer: Yes. Persistent partitions use the following filesystem images:

  • /drive/drive-linux/filesystem/targetfs-user-data.img

  • /drive/drive-linux/filesystem/targetfs-user-metadata.img

There are two main ways to modify them:

  1. Rebuild using buildFS – Create updated filesystem images and include them in your flashing package.

  2. Loop mount the images – Mount the .img files locally, make the required changes, then unmount them.

The modified images are used the next time the board is flashed, and the updates appear in the respective persistent partitions.