> Documentation index: https://nao-rs.lukaloehr.com/llms.txt, a list of every page in this documentation.

# Boot time

> How long a NAO6 takes to boot on HULKs-OS and on nao-rs, what nao-rs changed, where the time still goes, and the targets for a dedicated image.

Measured on a NAO6 with HULKs-OS 9.0.1 on 2026-11-06 with `systemd-analyze`,
before and after installing nao-rs.

## Before and after

|  | HULKs-OS with HAL, LoLA and HULA | nao-rs |
| --- | --- | --- |
| Kernel | 1.9 s | 1.8 s |
| Userspace until `multi-user.target` | 17.7 s | 11.3 s |
| **Whole boot** (`systemd-analyze`) | **19.6 s** | **13.1 s** |
| Death switch guard running | – | 3.5 s |
| `hulk` ready (robot API on 7700, REST on 7702) | 11.0 s | 11.2 s |

Before any of this, the chest board's and the BIOS's firmware take **at least
18 s** from the chest button press to the kernel. nao-rs keeps that firmware,
so that part stays.

## What nao-rs changed

- **HAL, LoLA and HULA are gone.** HAL alone took 4.8 s. nao-rs opens the link
  in 2 ms and reads the preferences in 251 ms.
- **Early start.** The guard and `hulk` start right after the file systems and
  the chest board device (`DefaultDependencies=no`), not after
  `basic.target`, so module loading and the network no longer delay them. The
  APIs bind to all addresses and work as soon as the network is up.
- **A fixed wired network.** HULKs-OS's `network-config` needs a HULKs
  `team.toml`, failed on every boot without one, and then played a 6-second
  "head id could not be identified" recording. nao-rs replaces both with its
  own wired configuration (see [Install](https://nao-rs.lukaloehr.com/get-started/install.md#network)).
- **The handshake runs in the background.** The runtime returns as soon as it
  knows the robot's identity (about 0.3 s instead of 2.8 s). HAL's board
  handshake, 2.2 s with the robot's version 11 boards, then runs on the cycle
  thread while `hulk` starts the rest.

## Where the time still goes

- **Waiting for the audio device**, until about 6.7 s. `hulk` starts only when
  the sound card exists (it waits up to 10 s for it). The sound driver waits for
  the Intel GPU driver's HDMI audio part, and blacklisting the GPU driver
  doesn't help, because udev loads it anyway.
- **`hulk`'s own start-up**, about 4 s.

## Planned

- Open the audio device lazily in `hulk`, so it starts at about 3.5 s.
- Measure and shorten `hulk`'s own 4 s (parameters, cameras, network).
- A dedicated image: a kernel with the needed drivers built in, no module
  loading on the critical path and a trimmed init; the runtime's first cycle
  about 2 s after the kernel starts. This needs a reflash with the robot at
  hand.

The realistic target is a robot that is ready about **20 s** after the chest
button press: about 18 s of firmware, about 2 s to the first cycle.

## Hard power-off

Holding the chest button for 8 seconds switches the robot off completely,
whatever runs on the head. See [Safety model](https://nao-rs.lukaloehr.com/safety.md#layer-4-the-hard-power-off).

## Related topics

- [Architecture](https://nao-rs.lukaloehr.com/architecture.md)
- [The cycle in HAL's order](https://nao-rs.lukaloehr.com/architecture/cycle.md)
- Previous: [The cycle in HAL's order](https://nao-rs.lukaloehr.com/architecture/cycle.md)
- Next: [Hardware reference](https://nao-rs.lukaloehr.com/hardware.md)
