Skip to content
Snigdha OSDecentralized

Encrypted Persistence Guide

Step-by-step setup and passphrase configuration for persistent storage.

5 min readUpdated: 2026-11-12

Snigdha Persistence: User Guide & Operator Manual

Snigdha OS Decentralized — Phase 4 Documentation
SPDX-License-Identifier: GPL-3.0-or-later


1. Overview

By default, Snigdha OS is an amnesic operating system: whenever you shut down or restart your computer, everything you did during the session completely disappears.

Snigdha Persistence allows you to save specific files and settings on your encrypted USB drive so that they are preserved across reboots, while keeping the rest of the operating system completely volatile and private.


2. Preparing a Dedicated Partition

Snigdha OS does not automatically resize partitions or rewrite your partition table during installation. This protects your bootloader and prevents data loss.

Before you can create Persistent Storage, you need an empty, unformatted partition on your Snigdha OS boot USB drive:

Using GParted or cfdisk (on another Linux machine or live session)

  1. Insert your Snigdha OS boot USB.
  2. Open GParted or run cfdisk /dev/sdX (where /dev/sdX is your USB drive).
  3. The first partition (/dev/sdX1) is the Snigdha OS boot partition. DO NOT TOUCH OR MODIFY IT.
  4. In the unallocated free space behind partition 1, create a new primary partition:
    • Partition type: Linux filesystem
    • Size: As desired (e.g. 10 GB, 30 GB, or remaining free space)
    • Label: SNIGDHA_PERSIST
  5. Apply the changes and write the partition table.

3. Creating Encrypted Persistent Storage

Once your dedicated partition is ready:

Via Graphical Desktop Menu

  1. Boot Snigdha OS.
  2. Press Super + Shift + P (or click the PERSIST icon on your Polybar status bar) to open the Persistence Menu.
  3. Select 7. Provision New Persistent Partition.
  4. Enter the partition node (e.g. /dev/sdb2).
  5. Type the exact partition path when prompted to confirm that you understand existing data on that partition will be erased.
  6. Enter a strong, memorable passphrase (at least 8 characters; a 5-word Diceware passphrase is recommended).
  7. Confirm the passphrase.
  8. The system will format the partition with LUKS2 encryption using Argon2id and create an ext4 filesystem.
  9. Upon completion, a desktop notification will confirm that storage is initialized in the LOCKED state.

Via Command-Line Interface (CLI)

# 1. View eligible partitions on the boot USB
snigdha-persistence devices

# 2. Format the dedicated partition
snigdha-persistence format /dev/sdb2

Follow the interactive prompts to confirm and enter your passphrase.


4. Unlocking Persistent Storage

Persistent storage is never unlocked automatically when you boot. You must unlock it explicitly whenever you want to access your files:

Via Desktop Menu

  1. Press Super + Shift + P (or click the Polybar module).
  2. Select 1. Unlock Persistent Storage.
  3. Type your passphrase in the masked prompt.
  4. Press Enter.
  5. Your Polybar indicator will change from  PERSIST: LOCKED to  PERSIST: ACTIVE [1].

Via Terminal

snigdha-persistence unlock

5. Using the Persistent Folder

When persistent storage is unlocked, the folder ~/Persistent in your home directory is connected directly to your encrypted storage.

  • Any file or document you save inside ~/Persistent will survive reboot!
  • Files saved in ~/Desktop, ~/Downloads, ~/.config, or any other directory will still disappear upon reboot as usual.
  • You can access this folder by:
    • Pressing Super + Shift + P -> 3. Open Persistent Folder.
    • Opening the Thunar file manager and clicking Persistent in the sidebar.
    • Running snigdha-persistence open-folder in terminal.
Warning
When persistent storage is **LOCKED**, opening `~/Persistent` will show a placeholder file named `.PERSISTENCE_LOCKED`. Any files created here while locked will be in volatile RAM and will not be preserved! Always unlock storage before saving files.

6. Managing Features (GnuPG and SSH)

Snigdha Persistence allows you to independently enable or disable specific features:

Persistent Folder (persistent-folder)

  • Status: Enabled by default.
  • Persists user documents and files in ~/Persistent.

GnuPG Keys (gnupg)

  • Status: Disabled by default.
  • Persists OpenPGP public/private keys and configuration in ~/.gnupg.
  • To enable:
    snigdha-persistence enable gnupg
    

SSH Keys (ssh)

  • Status: Disabled by default.
  • Persists SSH authentication keys and configuration in ~/.ssh.
  • To enable:
    snigdha-persistence enable ssh
    

7. Locking Persistent Storage

When you are finished using your persistent files, you can lock your storage without rebooting:

Via Desktop Menu

  1. Press Super + Shift + P.
  2. Select 2. Lock Persistent Storage.
  3. The system unmounts your feature folders and closes the cryptographic mapper.
  4. The Polybar status icon will update to  PERSIST: LOCKED.

Via Terminal

snigdha-persistence lock
Important
If an application (such as a text editor or terminal) currently has a file open inside `~/Persistent`, locking will pause and inform you which application is holding the file. Close the application and retry the lock operation. Snigdha OS never uses dangerous "lazy unmounts" that leave files silently accessible.

8. Exporting a Header Recovery Backup

Your LUKS header contains the cryptographic keyslot metadata needed to decrypt your volume. If a flash storage block in the header area becomes corrupted, you could lose access to your data even if you know the passphrase.

To create an offline header backup:

snigdha-persistence backup-header /media/backup-drive/snigdha-luks-header.bak
Caution
Store this backup file on a separate, offline USB drive. Never store the header backup inside the persistent partition itself! Anyone who obtains your header backup AND your passphrase can access your data.

9. Troubleshooting & Diagnostics

Run the automated diagnostics suite at any time:

snigdha-persistence diagnose

Common Issues

  1. "No eligible persistence partition found": Ensure your persistence partition is located on the same USB drive you booted from, and that its partition type is set to Linux.
  2. "Cannot unmount: active processes holding files open": Close any open terminal windows whose working directory is inside ~/Persistent and close any documents opened in editors.
  3. "Incorrect persistence passphrase": Verify your Caps Lock and keyboard layout settings. Argon2id requires exact passphrase entry.