First Instance Boot Process - Quick Reference
What It Does
Automatically detects when USB is plugged into a machine and ensures all wallet files are valid and intact.
When It Runs
β
Every time you plug in the USB
β
Every time you mount the drive
β
Automatically - no user action needed
What It Checks
wallet/keypair.json- Your encrypted private keywallet/pubkey.txt- Your public address
What It Does
If Files Are Valid β
- Quick verification check
- Creates/updates backups in
.coldstar/backup/ - Updates boot marker
- Continues normally
If Files Are Missing β οΈ
- Detects missing files
- Restores from
.coldstar/backup/ - Notifies you of restoration
- Continues normally
If Files Are Corrupted β οΈ
- Detects 0-byte or invalid files
- Restores from backup
- Warns you about corruption
- Continues normally
User Messages
First Boot (New Machine)
π First instance boot detected on this machine...
β Created backup: keypair.json
β First boot process completed - no restoration needed
Restoration Needed
π First instance boot detected on this machine...
β Missing: keypair.json
β Restored keypair.json from backup
β First boot process completed - 1 file(s) restored
Subsequent Boots
Boot instance verified - checking wallet integrity...
β Integrity check completed - no restoration needed
Hidden Files Created
.coldstar/
βββ last_boot_id # Tracks which machine/session last used USB
βββ backup/ # Automatic backups of wallet files
βββ keypair.json
βββ pubkey.txt
Key Points
- Automatic - No manual steps required
- Safe - Only restores when actually needed
- Smart - Detects new machines vs same machine
- Fast - Minimal overhead on normal use
- Secure - Backups are encrypted same as originals
Common Scenarios
| Scenario | What Happens |
|---|---|
| First time plugging in USB | Creates backups, marks boot instance |
| Moving USB to different computer | Detects first boot, verifies files |
| Accidental file deletion | Next mount restores from backup |
| File corruption (power loss) | Detects 0-byte file, restores |
| Normal daily use (same PC) | Quick check, no restoration |
Testing
Run the test script to see it in action:
python test_first_boot.py
Options:
- Demonstrate First Boot Process
- Test Corruption Detection
Documentation
- Full Details: FIRST_BOOT_PROCESS.md
- Implementation: FIRST_BOOT_IMPLEMENTATION.md
- Main Docs: README.md
Troubleshooting
Q: What if both file AND backup are corrupted?
A: You'll see an error message. Restore from your offline backup.
Q: Can I disable this feature?
A: Not recommended. It's part of mount process. Delete .coldstar/ directory to reset.
Q: Does this slow down mounting?
A: Minimal impact - just file existence checks and timestamp comparisons.
Q: Are backups encrypted?
A: Yes, same encryption as the original files (AES-256-GCM).
Q: What if I don't want backups?
A: They're tiny and provide critical data protection. Highly recommended to keep.
B - Love U 3000 β€οΈ