I need to debug the Linux kernel on Rocky system. So, I built my kernel with extra debug information following the standard Rocky way:
mock -r /etc/mock/rocky-9-x86_64.cfg ./kernel-5.14.0-362.13.1.el9_3.src.rpm
But when I collected the vmcore and tried to inspect it using the crash utility, I got a version mismatch error. And when I compared the versions:
$ crash --osrelease ./vmcore
5.14.0-362.18.1.el9.x86_64
$ crash --osrelease vmlinux
unknown
So, the version is saved properly in the vmcore file, but not in the vmlinx file. What do I need to do to fix that?
I verified this on a “virgin” system. So, mock should have downloaded and installed all the packages it wishes for. I also verified this on an un-modified kernel source rpm, freshly downloaded off the Rocky Linux’s website. Meaning, my changes did not cause this.