On Mon, May 23, 2011 at 01:09:37PM +0200, Axel Beckert wrote:
> Hi Josip,
>
> Josip Rodin wrote:
> > In the meantime, the linux-modules packages went away, there's only
> > linux-image-* nowadays. The script
> > /usr/lib/xen-tools/debian.d/80-install-modules searches for the former,
> > fails to find them, and then copies /lib/modules/$(uname -r).
>
> ... on current Linux distribution releases, yes. But we also would
> like to support previous releases where possible, too.
>
> > Switching to simply installing linux-image-$(uname -r) would be preferable,
> > because:
> > a) you don't want a static copy of .ko files because then will get stale,
> > and the domU could have stability or security issues
>
> Yep.
>
> > b) you can also use pvgrub these days so you could actually need the
> > kernel image itself, too
>
> pvgrub or pygrub, yes. But also here: Backwards compatibility is
> preferred.
>
> > /usr/lib/xen-tools/debian.d/80-install-modules should therefore just
> > install linux-image-`uname -r` into domU.
>
> I must admit, I'm not sure what's really the best way. Only `uname -r`
> seems not to work in all situations. We had cases where this failed.
Well, I just used that as a shorthand. The use case is pretty clear - you
need to install the modules that match the kernel and initrd that are put
inside the .cfg file in the same invocation of xen-create-image.
In the default case, you can extract this from the strings easily,
and it will usually match `uname -r`. Design for that common case.
In the non-default case, e.g. when the user configures
/boot/my-favorite-vmlinuz and /boot/my-favorite-initrd.img, keep
a fallback such as the existing cp, but print a big fat warning telling
the user they're setting themselves up for failure later on.
Possibly also provide a --kernel-modules-version to look inside
/lib/modules/${value_of_that}/ for the extraordinarily obstinate users :)
--
2. That which causes joy or happiness.
--
To UNSUBSCRIBE, email to [email protected]
with a subject of "unsubscribe". Trouble? Contact [email protected]