Skip to content
Mateusz Piwek edited this page May 26, 2026 · 6 revisions

YInit documentation

'YInit' is designed to boot on bare-metal and in containerized environment. As in containerized environment host OS already provides multiple sub-systems, 'YInit' is only required to bring up container-specific services.

'yInit' services, functions, targets and instances

Services provides functions. Targets represent specific boot state. Instances represent service performance.

init:

  • devfs [oneshot or daemon]: mount - devfs, sysfs and procfs
  • hwclock [oneshot]: set a hardware clock
  • console [daemon]: set console

launch

  • localmount [oneshot]: check and remount rootfs to 'rw', check and mount remaining filesystems.
  • storagemaintenace [periodic]: check and maintain filesystems – fstrim, BtrFS scrub
  • hostname [oneshot]: set the hostname

network

  • firewall [oneshot]: set rules
  • network manager [daemon]: start network manager
  • netmount [oneshot]: mount network filesystems

netowork.online

  • ntp [daemon]

system

  • sshd [daemon]
  • nfs server

user

  • getty [daemon]

Launch modes

oneshot – run coresponding process once at launch and optionally once at shutdown. periodic – run coresponding process according to scheduler deamon – run process as daemon

Each service run by YInit belongs to a specific target, the following targets are defined:

  1. init – Does initialization of the following special filesystems: devfs, procfs, sysfs.
  2. launch – Checks and mounts root and user filesystems, loads drivers, sets up hardware settings, launches logging capability.
  3. network – Initializes network via ConnMan and firewall.
  4. network.online – Brings up network services that require WAN access: NTP client. Successful pass of this target indicates that the machine is considered to be online.
  5. system – Starts system services such as SSH server and other.
  6. user – Runs user related services: login manager, task scheduler and other.

YInit ensures to start all active services for a specific target regarding to defined service dependencies.

The default target to achieve is 'user' (6), targets are executed in the order show above (that is: init, launch, network, network.online, system, user).

Target 'user' is the state of the OS that provides all user desired services. Targets from 1 to 4 are bare-metal specific, in containerized environment these are to be provided by host OS. Targets 5 and 6 are common for bare-metal and containerized environments – these are responsible for launching services specified for a given computer/VM.

Service dependencies definitions

To ensure proper system boot and shutdown services must start and stop in a proper order.

This can be defined by defining the following relations per service:

Ordering control

after = serviceX,targetX

Ordering control

before = serviceX, targetZ

weak dependency

wants = service

strong dependency

requires = service

Init #1

Launch #2

Network #3

Network.Online #4

System #5

User #6