fix: auto-create default user, force reboot, i915 firmware, first boot info
Some checks failed
Build Archipelago ISO / build-iso (push) Has been cancelled

Critical fixes from ISO testing on .198:
- Backend auto-creates default user (password123) on first start
  so login works immediately after onboarding
- Force reboot (reboot -f) after install to avoid SquashFS errors
  when live USB is removed
- Eject USB before prompting user, not after
- Add firmware-misc-nonfree for Intel i915 GPU (suppresses dozens
  of "Possible missing firmware" warnings during initramfs update)
- First boot screen: wait up to 10s for DHCP before showing IP
- First boot screen: compact layout fits 80-col terminals
- ISOLINUX menu resolution dropped to 640x480 for universal
  VESA compatibility (was 1024x768, caused scaling on some hardware)

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
Dorian
2026-03-28 13:06:34 +00:00
parent 9db55b0b34
commit 2021de5cda
3 changed files with 58 additions and 64 deletions

View File

@@ -95,6 +95,18 @@ impl AuthManager {
Self { data_dir }
}
/// Ensure a default user exists on first boot.
/// Called once at startup — creates user with default password if none exists.
pub async fn ensure_default_user(&self) -> Result<()> {
if self.is_setup().await? {
return Ok(());
}
tracing::info!("[onboarding] no user found — creating default user (password: password123)");
self.setup_user("password123").await?;
tracing::info!("[onboarding] default user created — user should change password after login");
Ok(())
}
pub async fn is_setup(&self) -> Result<bool> {
let user_file = self.data_dir.join("user.json");
Ok(user_file.exists())

View File

@@ -112,13 +112,12 @@ async fn main() -> Result<()> {
});
}
// In dev mode, ensure a default user exists so login works without manual setup
if config.dev_mode {
// Ensure a default user exists so login works after install/onboarding.
// In production, the default password is "password123" (shown during install).
// In dev mode, the dev default password is used.
{
let auth = AuthManager::new(config.data_dir.clone());
if !auth.is_setup().await? {
auth.setup_user(DEV_DEFAULT_PASSWORD).await?;
info!("👤 Created default dev user (password: {})", DEV_DEFAULT_PASSWORD);
}
auth.ensure_default_user().await?;
}
// Create server