Encrypted Persistence Guide
Step-by-step setup and passphrase configuration for persistent storage.
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)
- Insert your Snigdha OS boot USB.
- Open GParted or run
cfdisk /dev/sdX(where/dev/sdXis your USB drive). - The first partition (
/dev/sdX1) is the Snigdha OS boot partition. DO NOT TOUCH OR MODIFY IT. - 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
- Apply the changes and write the partition table.
3. Creating Encrypted Persistent Storage
Once your dedicated partition is ready:
Via Graphical Desktop Menu
- Boot Snigdha OS.
- Press Super + Shift + P (or click the PERSIST icon on your Polybar status bar) to open the Persistence Menu.
- Select 7. Provision New Persistent Partition.
- Enter the partition node (e.g.
/dev/sdb2). - Type the exact partition path when prompted to confirm that you understand existing data on that partition will be erased.
- Enter a strong, memorable passphrase (at least 8 characters; a 5-word Diceware passphrase is recommended).
- Confirm the passphrase.
- The system will format the partition with LUKS2 encryption using Argon2id and create an ext4 filesystem.
- 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
- Press Super + Shift + P (or click the Polybar module).
- Select 1. Unlock Persistent Storage.
- Type your passphrase in the masked prompt.
- Press Enter.
- Your Polybar indicator will change from
PERSIST: LOCKEDto 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
~/Persistentwill 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-folderin terminal.
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
- Press Super + Shift + P.
- Select 2. Lock Persistent Storage.
- The system unmounts your feature folders and closes the cryptographic mapper.
- The Polybar status icon will update to
PERSIST: LOCKED.
Via Terminal
snigdha-persistence lock
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
9. Troubleshooting & Diagnostics
Run the automated diagnostics suite at any time:
snigdha-persistence diagnose
Common Issues
- "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.
- "Cannot unmount: active processes holding files open": Close any open terminal windows whose working directory is inside
~/Persistentand close any documents opened in editors. - "Incorrect persistence passphrase": Verify your Caps Lock and keyboard layout settings. Argon2id requires exact passphrase entry.