Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
make a new kernel rpm

thanks to Randall for assistance with this


here's how,


verify that you have the following installed in your distro (if it supports it)


rpm-devel, curses, ncurses-devel and gcc and required deps.


Once done, download the latest stable kernel from


currently that is



once downloaded, unzip the file


bunzip2  kernel

then cd to the new kernel directory


then untar it with


tar xvpf kernel


then prepare it for compiling...


make clean && make mrproper


now we want to copy over default settings from a shipped kernel to the new one we will compile


cp /boot/config-`uname -r` ./.config


where uname -r is the value from your current kernel eg:


Quote:[root@localhost ~]# uname -r2.6.23.1-49.fc8

now that you have copied over the 'default settings' from the shipped kernel lets configure the new one by


make menuconfig


then do a


make rpm


the above will only make an RPM file of the new kernel for you, if you wanted to test that kernel you'd have to install the rpm as normal.


If you want to make the kernel the 'normal' way then do as follows


make modules_install
make install


below is a sample of me actually going through all the steps on a SLED 10sp1 machine.


43.4 MB


in yast, i searched for rpm-devel and then isntalled it.


next in yast i searched for curses and isntalled ncurses-devel and the 32bit version of same. (ncurses-devel-32bit)




bunzip2 linux-




tar xvpf linux-


then once uncompressed


cd linux-





installed gcc and libmudflap for compiling... in yast.


make clean && make mrproper


cp /boot/config- ./.config



(copies the current sled10 settings in the kernel to the new kernel)


make menuconfig



make modules_install

make install

make rpm



Wrote: /usr/src/packages/SRPMS/kernel-

Wrote: /usr/src/packages/RPMS/x86_64/kernel-

Executing(%clean): /bin/sh -e /var/tmp/rpm-tmp.97342

+ umask 022

+ cd /usr/src/packages/BUILD

+ cd kernel-

+ exit 0

rm ../kernel-

linux-hiz9:/kernel_update/linux- #
make rpm is an ace addition to the kernel build :)

sure is



however i reinstalled the same box and then when done, installed the rpm i had created in the process above, it installed just fine


but, when I rebooted to test it, it wasnt listed in grub, so by hand i tried to add it, but that didnt work either as it was missing some initrd specific stuff


so, how can i make an rpm that contains everything thats needed to install a new kernel+update grub etc ?


Quote:so, how can i make an rpm that contains everything thats needed to install a new kernel+update grub etc ?

is this even possible ?

It is possible, but you would need to write your own spec file with a post install script to tamper the grub/lilo setups

Forum Jump:

Users browsing this thread: 1 Guest(s)