You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Executing systemd-bootchart from the initial ramdisk fails when systemd does its switch-root procedure.
This can be reproduced on Fedora 41 with an initial ramdisk updated to include systemd-bootchart.
The systemd-bootchart documentation does not mention if execution from the initial ramdisk is supported or not, but, internally, systemd-bootchart sets argv[0][0] = '@', so it seem like this was supported at one point (setting argv[0][0] = '@' is one way to survive the switch-root process killing spree).
To prepare an initial ramdisk with systemd-bootchart (and strace), you can do this:
sudo -i
mkdir -p initrd/root
cd initrd/root
gunzip --stdout /boot/initramfs-6.11.4-301.fc41.aarch64.img | cpio --extract
cd usr/lib/systemd
cp /usr/lib/systemd/systemd-bootchart .
# you can check that all required libs are already present
# ldd /usr/lib/systemd/systemd-bootchart
cd ../..
cd bin
cp /usr/bin/strace .
# you will need to copy a few libs to support strace
# ldd /usr/bin/strace
cd ../..
find . | cpio -o -H newc --file=../initramfs-xx.cpio
cd ..
gzip --stdout initramfs-xx.cpio > initramfs-xx.img
cp initramfs-xx.img /boot/initramfs-xx.img
Reboot and then edit the grub command to boot using the new initial ramdisk:
initrd ($root)/initramfs-xx.img
Also, add a kernel param to boot into the rd.emergency target (I also added enforcing=0):
Executing systemd-bootchart from the initial ramdisk fails when systemd does its switch-root procedure.
This can be reproduced on Fedora 41 with an initial ramdisk updated to include systemd-bootchart.
The systemd-bootchart documentation does not mention if execution from the initial ramdisk is supported or not, but, internally, systemd-bootchart sets
argv[0][0] = '@'
, so it seem like this was supported at one point (settingargv[0][0] = '@'
is one way to survive the switch-root process killing spree).The failure happens here:
https://github.com/systemd/systemd-bootchart/blob/a15bcafb60b9a24d866024953e9965316ba73eaf/src/store.c#L191C1-L194C71
I will provide an strace log and more detailed steps to reproduce below.
The text was updated successfully, but these errors were encountered: