From: lyndat3-p/IIKWkZnU0S+FvcfC7Uqw@public.gmane.org
To: Andrei Borzenkov <arvidjaar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
Cc: initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org
Subject: Re: How to have dracut conditionally add different kernel modules for different kernels?
Date: Sun, 12 Apr 2015 09:32:19 -0700 [thread overview]
Message-ID: <1428856339.2402820.252686921.0AA31DC6@webmail.messagingengine.com> (raw)
In-Reply-To: <20150412111154.5de2405f-stAJ6ESoqRzYCGPCin2YbQ@public.gmane.org>
On Sun, Apr 12, 2015, at 01:11 AM, Andrei Borzenkov wrote:
> > What's the right way to add kernel-specific modules in dracut, so that for example the xen mods are ONLY added in the xen case?
>
> Not sure about the "right" way, but dracut configuration files are
> shell scripts, so you can implement the same logic in /etc/dracut.d
> snippet, something like
>
> if is_xen_kernel ; then
> add_drivers+=" ..."
> fi
>
> where is_xen_kernel does whatever check is required to detect domU
> kernel.
Option to use if ... should do the trick.
Detecting if xen is RUNNING is
if test -d /proc/xen; then
whatver
fi
But that's not the needed test. Like you said have to get a test that checks if the dracut TARGET is a xen kernel. When dracut's running across multiple xen & non-xen kernels, I'm not yet sure how to hook that info from inside dracut.conf.
LT
prev parent reply other threads:[~2015-04-12 16:32 UTC|newest]
Thread overview: 3+ messages / expand[flat|nested] mbox.gz Atom feed top
2015-04-10 19:11 How to have dracut conditionally add different kernel modules for different kernels? lyndat3-p/IIKWkZnU0S+FvcfC7Uqw
[not found] ` <1428693113.1734218.251850073.54517680-2RFepEojUI2N1INw9kWLP6GC3tUn3ZHUQQ4Iyu8u01E@public.gmane.org>
2015-04-12 8:11 ` Andrei Borzenkov
[not found] ` <20150412111154.5de2405f-stAJ6ESoqRzYCGPCin2YbQ@public.gmane.org>
2015-04-12 16:32 ` lyndat3-p/IIKWkZnU0S+FvcfC7Uqw [this message]
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=1428856339.2402820.252686921.0AA31DC6@webmail.messagingengine.com \
--to=lyndat3-p/iikwkznu0s+fvcfc7uqw@public.gmane.org \
--cc=arvidjaar-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org \
--cc=initramfs-u79uwXL29TY76Z2rM5mHXA@public.gmane.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox