coldstar-whitepaper / documentation /FIRST_BOOT_QUICKSTART.md
purplesquirrelnetworks's picture
Upload documentation/FIRST_BOOT_QUICKSTART.md with huggingface_hub
0170afc verified

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 key
  • wallet/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

  1. Automatic - No manual steps required
  2. Safe - Only restores when actually needed
  3. Smart - Detects new machines vs same machine
  4. Fast - Minimal overhead on normal use
  5. 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:

  1. Demonstrate First Boot Process
  2. Test Corruption Detection

Documentation

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 ❀️