On Sat, Jul 2, 2011 at 10:18 AM, Teck Choon Giam <[log in to unmask]> wrote: > On Sat, Jul 2, 2011 at 9:22 AM, Steven Haigh <[log in to unmask]> wrote: >> On 2/07/2011 9:59 AM, Teck Choon Giam wrote: >>> >>> It is looking for your kernel version not with the package name >>> prefixed I believe. So your case for kernel-xen-2.6.32-1.x86_64.rpm I >>> will assume your version is 2.6.32-1 if you install that and the >>> module is located in /lib/modules/2.6.32-1. So using >>> /sbin/new-kernel-pkg will work like: >>> >>> /sbin/new-kernel-pkg --package kernel --mkinitrd --dracut --depmod >>> --install 2.6.32-1 >>> >>> So your %{KRELEASE} should be something like 2.6.32-1 instead of with >>> the xen prefixed. >> >> I thought this, but my /lib/modules looks like: >> # ls -l /lib/modules/ >> total 12 >> drwxr-xr-x. 7 root root 4096 Jun 15 18:39 2.6.32-131.2.1.el6.x86_64 >> drwxr-xr-x. 3 root root 4096 Jul 2 09:21 2.6.32.40 >> drwxr-xr-x 3 root root 4096 Jul 2 09:21 xen-2.6.32-1.x86_64 >> # >> >> 2.6.32.40 is the currently running kernel. > > This has nothing to do with current running kernel since you are > packaging your own *kernel*. > >> >>> If you have a spec file for me to view, I shall be able to see what went >>> wrong. >> >> I've put the spec file at http://www.crc.id.au/files/kernel-xen.spec > > From the spec file: > > %define kvmajor 2.6.32 > %define kvminor 41 > %define pkg_release 1 > %define pkg_name xen > %define KRELEASE %{pkg_name}-%{version}-%{release}.%{_target_cpu} > > Name: kernel-%{pkg_name} > Version: %{kvmajor} > Release: %{pkg_release}%{?revision}%{?localrel} > > Your package name is kernel-xen. > Your version is 2.6.32 > Your release is 1%{?revision}%{?localrel} You need to fix many issues in your spec file. One of them is the %{version} and %{release} as from your spec file you seems to have confusion and from that confusion you will have issues with packaging your kernel package module. Personally I will not include arch in that and why you do so? I mean %define KRELEASE %{pkg_name}-%{version}-%{release}.%{_target_cpu} ... why use %{_target_cpu} here? > > So your KRELEASE shouldn't be with xen... and you will have issues if > you change or edit your own version/release since it will not be the > same when you install the modules... please use the following to get > consistent module version according to your spec file: > > make modules_install ... ... KERNELRELEASE=%{KRELEASE} > > >> >>> I will assume you are working on SL6 since dracut only in SL6 but not >>> in SL5 and below. >> >> Correct. >> > > Hope this helps! > > Thanks. > > Kindest regards, > Giam Teckj Sorry, didn't type complete my name and got distracted by my young child and hit reply too soon :p Thanks. Kindest regards, Giam Teck Choon