Skip to main content

Module boot

Module boot 

Source
Expand description

Gunnar’s end of PID 1. The jobs an operating system used to do for the server (signals, reaping, the network, DHCP, the stop and the power-off) are edda’s appliance-pid1, shared with Holger; this is what Gunnar says about itself to it (GUNNAR_NET, the host name, the narration tap, GN-99). Gunnar’s end of PID 1. Everything an OS-less PID 1 owes the kernel — the signals, the reaper, the netlink writer, the DHCPv4 client and its renewal, the resolver file, the stop sources and the power-off, the install record, the graphics-console mirror, the boot narration’s secret door, the panic as a fault — is edda’s appliance-pid1 (0.1.5, lanes G4 and G6), the one PID 1 Gunnar and Holger both run. Gunnar’s own pid1.rs and dhcp.rs were moved there whole and deleted here (lane L10).

What stays Gunnar’s is what Gunnar says about itself: the variable the kernel command line names the network in (NET_VAR), the host-name prefix, the name the resolver is proven on, the T1 test seam’s variable, where the boot narration and the install line go (the console log tap and the dashboard’s install.mode row), and the panic’s code (GN-99) with Gunnar’s own crash file and console line. The narrator (the Stage story, the ESP and /data log lines) is crate::narrate.

Enums§

DhcpSession
With dhcp off there is no such thing as a lease, and this type says so in the type system rather than in a comment: it is UNINHABITED.

Constants§

HOSTNAME_PREFIX
A box with no lease name is called gunnar-<last three MAC bytes>.
NET_VAR
The variable the kernel command line declares the network in: GUNNAR_NET=eth0:dhcp,eth1:dhcp or GUNNAR_NET=eth0:10.0.2.15/24:10.0.2.2.
PANIC_CODE
Gunnar’s panic code.
RESOLVER_PROBE
The name the published resolver is proven on, once, at boot.
RESOLVER_PROBE_IN_THIS_BUILD
The name this build asks (AIRGAP B3, owner rule 2026-10-25): a DNS question for a public name is an outbound call, so only a build with resolver-probe (every appliance row names it) proves the resolver; a default build asks nothing.
T1_OVERRIDE_VAR
The DHCP T1 test seam’s variable (read only behind the appliance gate).

Functions§

announce_install_mode
Say whether this /data is the one the box had before its last install (edda’s install::announce_install_mode): the set’s shape is read off the md sysfs under data_root (dashboard::probe::disk_kind), and the line is said as the structured install.mode event the dashboard’s install row keys on. Silent when the record is absent.
bring_up_network
Everything PID 1 owes the system before the listeners bind: edda’s net::bring_up_network_with over GUNNAR_NET, with Gunnar’s host-name prefix, its resolver probe and the boot narration handed to the console log tap. A boot DHCP that failed and is asked again in the background lands the same way (late_lease, appliance-pid1 0.1.5): said through the boot narration, renewed on Gunnar’s T1 seam and its resolver proven.
dhcp_renewal
With dhcp-client off there is no lease to renew: the session type is uninhabited, so this cannot be called.
install_mode_event
One install.mode line (install.mode mode=… kept=… …) as the structured event the dashboard reads: each key=value token a field, - when absent.
install_mode_fields
mode, kept, kept_partno, kept_gib, kept_set off an edda install.mode line, - for each one it does not name. Pure.
install_panic_fault
A panic on the appliance ends as a fault (GN-99): edda’s fault::install_panic_fault, armed only as PID 1 with the narrator installed (never in a test, a laptop’s gunnar-solo or a container), the crash record under data. shout is the binary’s every-console writer.
late_lease
What a late DHCP lease (the boot’s failed ask, retried in the background) says and renews on: the boot narration’s own door and Gunnar’s T1 seam.
net_plans
The plans GUNNAR_NET declares (empty when it declares none).
role_bound
Pure: a bind by ROLE becomes this box’s NIC (the lean estate, A19 row 17): utility:<port> is the last interface the net spec net (the medium’s NET_VAR) declares that this box has (exists). Any other spelling is returned unchanged.
role_bound_here
role_bound on this box: its NET_VAR and the NICs the kernel has (/sys/class/net/<name>).
ship_boot_narration
The kernel’s story to the boot log the installer collects (edda’s narration::ship_boot_narration, tapped into gunnar_common::logqueue).