Fail to install with a rebuilt kernel

Hello everyone,

I have pulled SLES 12 rpms package including kernel + other rpms like drbd, nfs… and add more services, then using kiwi to rebuild the initrd. Everything is ok and I can boot kernel with my customize initrd.

Currently I need to modify the already built kernel (vmlinuz) to enable CONFIG_XFRM_STATISTICS and rebuild kernel. My steps are as the following:

  • Unpack kernel-source rpm
  • Unpack config “tar jxf config.tar.bz2”
  • Enable CONFIG_XFRM_STATISTICS to y
  • Pack config again “tar jcf config.tar.bz2 config”
  • Then do “rpmbuild -ba kernel-default.spec” to rebuild the kernel default rpm
  • Do “rpmbuild -ba kernel-syms.spec” to rebuilf kernel syms

Then I replace the origin kernel-default and kernel-syms with my built ones, then I build my initrd using kiwi but it fails with the error:

“nothing provides ksym(default:__alloc_skb) = 4e7db4d4 needed by drbd-kmp-default”

and I cannot built my initrd anymore. I’ve already checked the System.map of my built kernel and see the function __allloc_skb built. Could you let me the meaning of this error and how I can resolve this problem?

Thanks a lot,
Brs,
Bao

[QUOTE=naruto_uzu;39096]Hello everyone,

I have pulled SLES 12 rpms package including kernel + other rpms like drbd, nfs… and add more services, then using kiwi to rebuild the initrd. Everything is ok and I can boot kernel with my customize initrd.

Currently I need to modify the already built kernel (vmlinuz) to enable CONFIG_XFRM_STATISTICS and rebuild kernel. My steps are as the following:

  • Unpack kernel-source rpm
  • Unpack config “tar jxf config.tar.bz2”
  • Enable CONFIG_XFRM_STATISTICS to y
  • Pack config again “tar jcf config.tar.bz2 config”
  • Then do “rpmbuild -ba kernel-default.spec” to rebuild the kernel default rpm
  • Do “rpmbuild -ba kernel-syms.spec” to rebuilf kernel syms

Then I replace the origin kernel-default and kernel-syms with my built ones, then I build my initrd using kiwi but it fails with the error:

“nothing provides ksym(default:__alloc_skb) = 4e7db4d4 needed by drbd-kmp-default”

and I cannot built my initrd anymore. I’ve already checked the System.map of my built kernel and see the function __allloc_skb built. Could you let me the meaning of this error and how I can resolve this problem?

Thanks a lot,
Brs,
Bao[/QUOTE]
Hi
Sounds like you need to build the kernel and syms etc, then build the drbd kmp against that kernel, I’m guessing the kmp built against the running kernel…

[QUOTE=malcolmlewis;39113]Hi
Sounds like you need to build the kernel and syms etc, then build the drbd kmp against that kernel, I’m guessing the kmp built against the running kernel…[/QUOTE]

Hi,

Thanks for your answer. I have another question regard to change configure and rebuild kernel. If the new kernel has been configured or modified in such a way that it is at variance with the published ABI, the build will fail with a message indicating that kABI breakage has occurred. The kernel builder will then have two choices: (a) re-configure the new kernel so that it does agree with the published ABI and, hence, continue to enjoy the benefits that a consistent ABI provides or (b) disable kABI checking during the build process.

I do not want to disable kABI checking but would like to use option a). Could you let me know how to do it? Is there anyway to keep kAPI unchanged?

Brs,
Bao

Hi
How are you building your packages, locally, local build instance (aka
OBS) or on OBS itself?

I’m no kernel guri… :wink: I use the OBS (https://build.opensuse.org/) for
all my builds mainly kmp’s against current kernels, or locally with the
src rpm against the running kernel.


Cheers Malcolm °¿° SUSE Knowledge Partner (Linux Counter #276890)
openSUSE Leap 42.2|GNOME 3.20.2|4.4.74-18.20-default
If you find this post helpful and are logged into the web interface,
please show your appreciation and click on the star below… Thanks!