Brussels / 3 & 4 February 2024


Debug your stage-1 systemd with GDB and the NixOS test framework

GDB is an amazing tool to debug ELF programs, but some of them are more challenging to debug than others. Systemd can be used as an implementation of the initrd, and in that case is run as PID 1 even before your system is finished booting. This talk will describe the process of debugging a crashing systemd in initrd using gdbserver running as the init script, gdb and the NixOS test framework.


Photo of Ryan Lahfa Ryan Lahfa
Photo of Julien Malka Julien Malka
Linus Heckemann