diff --git a/init/src/main.rs b/init/src/main.rs index 98e778bceb..221b7979ea 100644 --- a/init/src/main.rs +++ b/init/src/main.rs @@ -115,13 +115,21 @@ fn main() { Path::new("/scheme/initfs/etc"), ); - // Start logd first such that we can pass /scheme/log as stdio to all other services + // Start logd first. Its /scheme/log sink mirrors every line to the kernel + // debug console (serial + framebuffer), so daemons still get logged. scheduler .schedule_start_and_report_errors(&mut unit_store, UnitId("00_logd.service".to_owned())); scheduler.step(&mut unit_store, &mut init_config); - if let Err(err) = switch_stdio("/scheme/log") { - init_error(&format!("failed to switch stdio to '/scheme/log': {}", err)); - } + // NOTE: init/daemon stdio is deliberately kept on the kernel console + // rather than being redirected into /scheme/log. Redirecting made the boot + // "go dark" after logd on text/recovery ISOs (bare/mini): the graphical + // bootlog (fbbootlogd, VT1) does not reliably surface /scheme/log to the + // framebuffer, and logd's console mirror is racy, so the console showed + // nothing between logd and the login VT — indistinguishable from a hang. + // Keeping stdio on the console makes the full boot observable on + // `-serial` and the framebuffer. (A quiet/splash mode for the graphical + // full ISO can re-enable the redirect once fbbootlogd rendering is fixed.) + let _ = switch_stdio; let runtime_target = UnitId("00_runtime.target".to_owned()); scheduler.schedule_start_and_report_errors(&mut unit_store, runtime_target.clone());