Appendix B Constants and Paths

Values compiled into peinit, which no registry key changes.

B.1 Filesystem paths #

PathPurpose
/usr/bin/peinit2Where peinit is installed in package storage.
/bin/peinit2The runtime path the kernel init= names.
/sbin/registrydThe compiled-in registryd image path.
/var/state/loregd/Machine.hiveThe machine hive, passed to registryd.
/var/state/loregd/Users.hiveThe users hive, passed to registryd.
/.peinit/peinit's own state directory on the root filesystem.
/.peinit/boot-attemptsThe boot attempt counter.
/lcl/etc/machine-idThe local machine identifier.
/var/state/peinit/random-seedThe persisted entropy seed.
/lcl/policy/autorun.dPhase 1 autorun scripts.
/run/services/peinit/control.sockThe control socket.
/run/services/peinit/notify.sockThe notification socket, by default.
/sys/fs/cgroup/peinit/The root of every service cgroup tree.
/dev/jfsThe job forwarding device.
/dev/rtc, /dev/rtc0The hardware clock, in that order of preference.
/dev/consoleWhere peinit writes its own messages.
/bin/recsh, /bin/shThe recovery shell, in that order of preference.

B.2 Timeouts and limits #

ConstantValueMeaning
registryd setup timeout30 sProcess setup, driven synchronously in Phase 1.
registryd readiness timeout30 sWaiting for READY=1 in Phase 1.
Reload detection window2 sWaiting for RELOADING=1 after a reload signal. Bounded above by the operation deadline.
Restart delay cap60 sThe ceiling on exponential backoff.
Timeout extension cap×4The multiple of a phase's base timeout an extension may reach.
Operation retention60 sHow long a terminal operation is kept before being dropped.
Boot attempt threshold3The default, overridden by peios.bootattempts=.
OnFailure chain depth16The maximum handler chain from one originating failure.
Pre-eventd buffer1 MiBThe compiled-in buffer capacity.
Notification datagram64 KiBThe receive buffer size.
Descriptors per datagram64The control message buffer capacity.
Random seed512 bytesWritten at shutdown. Restoring accepts 1–4096 bytes.
Control listen backlog32
First injected descriptor3Where stored descriptors are placed.
Final action retry1 sThe minimum interval between reboot(2) retries.

B.3 Environment #

VariableValue
PATH/sbin:/bin — the compiled-in base for every service.

The recovery shell additionally receives TERM=linux and HOME=/.

B.4 Kernel command line #

ParameterEffect
peios.safemode=1Force Safe mode.
peios.recovery=1Force recovery mode.
peios.bootattempts=NThe recovery threshold; 0 disables the check.
peios.quiet=NConsole verbosity: 0, 1 or 2.
peios.notifysocket=PATHOverride the notification socket path.

B.5 Descriptors peinit applies #

WhereSDDL
/dev/shm, /run, /sys/fs/cgroup after mountingO:SYG:SYD:(A;OICI;GA;;;SY)(A;OICI;GA;;;BA)
/dev/null, /dev/zero, /dev/full, /dev/random, /dev/urandom, /dev/tty, /dev/ptmx (DACL only)D:(A;;GA;;;SY)(A;;GA;;;BA)(A;;FRFW;;;WD)
A provisioned path with no SecurityO:SYG:SYD:(A;;GA;;;SY)(A;;GA;;;BA)(A;;FR;;;BU)
A service's /run/<name> runtime directoryO:SYG:SYD:(A;;GA;;;SY)(A;;GA;;;BA)(A;;GA;;;<service SID>)
The random seed fileO:SYG:SYD:(A;;GA;;;SY)
The default ServiceSecurityO:SYG:SYD:(A;;GA;;;SY)(A;;0x0005;;;BA)
The default ControlSecurityO:SYG:BAD:(A;;0x0003;;;SY)(A;;0x0003;;;BA)

B.6 Access rights #

RightBit
SERVICE_QUERY_STATUS0x0001
SERVICE_START0x0002
SERVICE_STOP0x0004
SERVICE_INTERROGATE0x0008
SERVICE_ALL_ACCESS0x000F
SYSTEM_SHUTDOWN0x0001
SYSTEM_RELOAD_CONFIG0x0002

B.7 Identifiers #

Every GUID peinit generates — jobs, operations — is UUIDv7, so identifiers sort by creation time.

Edit this page