My default kernel rpm has 12mb size, for some reasons I compile a custom kernel and make rpm from that(make rpm command). However, my custom kernel rpm size is 96mb.

I look inside default rpm, in that modules is zipped by bz format, but in my rpm isn't.

How can I compress modules in rpm compress? Is any option or command to do that?

  • 3
    Compression happens by default IIRC (in fact I didn't know you could turn it off). Post your .spec file. Aug 18, 2011 at 19:42

1 Answer 1


Did you leave kernel debugging enabled? If you did that can yield a much larger RPM than when it is disabled.

I accepted the default options from menuconfig and ran make rpm on the kernel. The RPM it generated was 221M. After deselecting debugging, it is 21M. It was reduced by a factor of 10 which is close to the reduction you're expecting.

In 'menuconfig' you can disable kernel debugging by unchecking Kernel Hacking->Kernel debugging, or you can edit the config file directly and comment out CONFIG_DEBUG_KERNEL .

The RPM based distros have guides on building a kernel that might be helpful to you. Usually the recommendation is to not do it, but if you really need to do it, they have docs on how to do it using their method instead of the 'make rpm' method directly from the kernel tarball.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.