dracutdevs / dracut

dracut the event driven initramfs infrastructure
https://github.com/dracutdevs/dracut/wiki
GNU General Public License v2.0
599 stars 399 forks source link

"rd.*" Is Ignored When "debug" Or "SYSTEMD_LOG_LEVEL=debug" Is Used As Well #2633

Open vindicatorr opened 7 months ago

vindicatorr commented 7 months ago

Describe the bug rd.debug and rd.break=<...> is ignored when debug or SYSTEMD_LOG_LEVEL=debug are also used.

Distribution used Arch Linux

Dracut version dracut 059

Init system Systemd

To Reproduce Create a kernel and initramfs using dracut and run in qemu using -kernel and -initrd and -append "console=ttyAMA0 rd.debug=1 rd.break=cmdline nokaslr debug loglevel=8 dyndbg SYSTEMD_LOG_LEVEL=debug SYSTEMD_LOG_LOCATION=true SYSTEMD_LOG_TARGET=console panic_print=127 systemd.crash"

Expected behavior Don't get ignored

Additional context I am working on creating a workable tinyconfig kernel and got stuck on something and looked into why neither rd.break and rd.debug weren't working. I played around with the cmdline arguments and came to the conclusion the culprits are those 2 debug arguments previously mentioned. When I removed them, the rd.* stuff works.

LaszloGombos commented 7 months ago

I am working on creating a workable tinyconfig kerne

Ok. Please try the same scenario with a "full kernel config" as well - obviously kernel needs to support console for example for some dracut features to work.

vindicatorr commented 7 months ago

During my creation, I had already been testing using the Image from ArchLinuxARM-aarch64-latest.tar.gz, and the effect is the same with that. Technically it isn't "full", as-in not everything is selected (like CONFIG_SQUASHFS_ZSTD), but I figure if it isn't going to work for a dist, it likely won't work with everything kernel config selected, and something like a compression scheme config setting isn't going to have any effect on this issue.

obviously kernel needs to support console for example for some dracut features to work.

I mean, I've got it working when I leave out those other debug arguments, and it only fails to take any rd.* action when using either of those other debug arguments. I wouldn't see the correlation with any config setting changing that effect. If I didn't even have console set or have the ARM AMBA serial config setting enabled, I'd see nothing.

I know I included a lot in the -append above, but let me make it simple for your own testing: Success: -append "console=ttyAMA0 rd.debug=1 Fail: -append "console=ttyAMA0 rd.debug=1 debug

I've done my part now. Feel free to see if it works with whatever kernel you currently have. I am equally doubtful it is an arch-based issue. You don't even have to make a qcow. Just kernel and image and append arguments.