Foxboron / sbctl

:computer: :lock: :key: Secure Boot key manager
MIT License
1.46k stars 84 forks source link

Bootloader time disappears in systemd-analyze when using sbctl bundles #154

Closed MenacingPerson closed 2 years ago

MenacingPerson commented 2 years ago

Distro is btw

The bootloader time works when using kernel EFISTUB, but with sbctl bundles:

$ systemd-analyze
Startup finished in 1.517s (kernel) + 8.358s (userspace) = 9.876s 
graphical.target reached after 7.944s in userspace.

It does not account for the bootloader time.

What does sbctl use for the bundles? Why not efistub?

MenacingPerson commented 2 years ago

Looking at the code, it uses systemd-boot stubs. Considering that both -boot and -analyze are by systemd, they should support each other. So this must be sbctl's fault right?

Foxboron commented 2 years ago

This isn't a sbctl issue and there isn't enough information here to figure out what is going on.

MenacingPerson commented 2 years ago

Right,

So if I use systemd-boot, the fw time and bootloader time is there.

https://systemd.io/BOOT_LOADER_INTERFACE/

Looks like it needs to implement this:

If LoaderTimeInitUSec and LoaderTimeExecUSec are set, systemd-analyze will include them in its boot-time analysis.

So, either a systemd-stub issue or an sbctl issue.

Still don't know about the fw time

Foxboron commented 2 years ago

Yes, and if you don't have a bootloader setting those options then there is nothing to infer. This isn't something sbctl is dealing with, it's not a bootloader.