I am in a situation where it would be helpful to modify some of the core kernel drivers for testing/debugging, but I can't find a good guide on how to make and test the change safely on a system I would prefer not to need to reset.
I have tried out the most recent official guide I could find without making any code/config changes and following the apt method, but that left me with a test system stuck in an initramfs, so it is at least missing something, and seems to be a bit dated in a few ways (many more deb packages are generated than mentioned, and I suspect some should not have been installed).
$ ls *.deblinux-buildinfo-6.5.0-41-generic_6.5.0-41.41~22.04.2_amd64.deblinux-cloud-tools-6.5.0-41-generic_6.5.0-41.41~22.04.2_amd64.deblinux-headers-6.5.0-41-generic_6.5.0-41.41~22.04.2_amd64.deblinux-hwe-6.5-cloud-tools-6.5.0-41_6.5.0-41.41~22.04.2_amd64.deblinux-hwe-6.5-headers-6.5.0-41_6.5.0-41.41~22.04.2_all.deblinux-hwe-6.5-tools-6.5.0-41_6.5.0-41.41~22.04.2_amd64.deblinux-image-unsigned-6.5.0-41-generic_6.5.0-41.41~22.04.2_amd64.deblinux-modules-6.5.0-41-generic_6.5.0-41.41~22.04.2_amd64.deblinux-modules-extra-6.5.0-41-generic_6.5.0-41.41~22.04.2_amd64.deblinux-modules-ipu6-6.5.0-41-generic_6.5.0-41.41~22.04.2_amd64.deblinux-modules-ivsc-6.5.0-41-generic_6.5.0-41.41~22.04.2_amd64.deblinux-modules-iwlwifi-6.5.0-41-generic_6.5.0-41.41~22.04.2_amd64.deblinux-tools-6.5.0-41-generic_6.5.0-41.41~22.04.2_amd64.deb
I also found a few similar questions, but one is too dated to be useful and the other was closed as a duplicate of that (the answer relies on a tool that is no longer available, along with being older than the dated official guide)
I have considered some other methods of debugging, but seemingly I would need to modify the config and rebuild anyway, so I am hoping someone with experience on modern versions of ubuntu/the kernel can help me test some changes to drivers.