Subject: | |
From: | |
Reply To: | |
Date: | Sat, 2 Jul 2011 07:59:18 +0800 |
Content-Type: | text/plain |
Parts/Attachments: |
|
|
On Sat, Jul 2, 2011 at 7:27 AM, Steven Haigh <[log in to unmask]> wrote:
> I'm almost there with my kernel-xen RPM/SRPM for use as a Xen Dom0 - however
> I'm having the following problem when installing:
>
> # rpm -ivh --force kernel-xen-2.6.32-1.x86_64.rpm
> Preparing... ###########################################
> [100%]
> 1:kernel-xen ###########################################
> [100%]
> WARNING: Couldn't open directory
> /tmp/initramfs.YhDlvm/lib/modules/2.6.32.40: No such file or directory
> FATAL: Could not open
> /tmp/initramfs.YhDlvm/lib/modules/2.6.32.40/modules.dep.temp for writing: No
> such file or directory
> E: "depmod -a xen-2.6.32-1.x86_64" failed.
> mkinitrd failed
> warning: %post(kernel-xen-2.6.32-1.x86_64) scriptlet failed, exit status 1
>
> This seems strange to me - as the 2.6.32.40 kernel is the handbuilt one and
> nothing to do with the kernel RPM I'm building...
>
> The %post I have in the kernel-xen.spec is:
> %post
> if [ -x /sbin/new-kernel-pkg ]
> then
> /sbin/new-kernel-pkg --package kernel --mkinitrd --dracut --depmod
> --install %{KRELEASE} || exit $?
> fi
> if [ -x /sbin/weak-modules ]
> then
> /sbin/weak-modules --add-kernel %{KRELEASE} || exit $?
> fi
>
> %{KRELEASE} in this case is: xen-2.6.32-1.x86_64
>
> Is this a problem with how new-kernel-pkg runs? I haven't been able to
> figure out why new-kernel-pkg even looks at modules that are not related to
> the command its being run with - but of the currently running kernel...
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.
If you have a spec file for me to view, I shall be able to see what went wrong.
I will assume you are working on SL6 since dracut only in SL6 but not
in SL5 and below.
Someone correct me if I am wrong.
Thanks.
Kindest regards,
Giam Teck Choon
|
|
|