<div dir="ltr"><div><div>Sounds consistent to existing precedence (like selinux).<br><br></div>Thanks!<br><br></div>PJ<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Fri, Oct 3, 2014 at 5:57 AM, Johnny Hughes <span dir="ltr">&lt;<a href="mailto:johnny@centos.org" target="_blank">johnny@centos.org</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">We need a way to do two things to /usr/bin/grub-bootxen.sh in Xen4CentOS.<br>
<br>
1.  Automate running it if xen (the package) and the xen kernel are<br>
installed.  But only if the user WANTS to run it.<br>
<br>
2. Allow users to automatically modify the variables passed into the<br>
xen.gz line (that is, more or less memory, add console settings, etc.)<br>
If you look at the current script, &quot;--mbargs=dom0_mem=1024M,max:1024M<br>
loglvl=all guest_loglvl=all&quot; is hard coded in as the only option for the<br>
xen.gz line.<br>
<br>
While doing that we also still want to preserve the ability to run that<br>
kernel in other places than just for xen dom0 setups.<br>
<br>
Here is how I propose we do that.<br>
<br>
Currently the /usr/bin/grub-bootxen.sh file is in centos-release-xen ...<br>
that is a good place as it allows us to use a different file in<br>
different major versions of CentOS (so the file in 7 can be different<br>
than the file in 6, but still use the same auxiliary files, etc).<br>
<br>
So, what we can do is setup a file in /etc/sysconfig/ (probably from the<br>
xen package) that we call xen-boot or xen-kernel, etc.  In this file we<br>
put some variables like these:<br>
<br>
BOOT_XEN_AS_DEFAULT=&quot;yes&quot;<br>
<br>
XEN_KERNEL_MBARGS=&quot;--mbargs=dom0_mem=1024M,max:1024M loglvl=all<br>
guest_loglvl=all&quot;<br>
<br>
Then we look for that file (/etc/sysconfig/xen-boot) as a post-install<br>
from the xen kernel.  If the file exists, we source it ... an if<br>
BOOT_XEN_AS_DEFAULT is yes, and if /usr/bin/grub-bootxen.sh exists we<br>
run it passing in XEN_KERNEL_MBARGS as a variable.<br>
<br>
The user can set BOOT_XEN_AS_DEFAULT to no if they want, so they do not<br>
get a xen kernel entry in their grub config.<br>
<br>
That should mean that if either there is no &#39;/etc/sysconfig/xen-boot&#39;<br>
config file OR if &#39;/usr/bin/grub-bootxen.sh&#39; does not exist, we get only<br>
the standard kernel entry .. but if they do exist, we also get a user<br>
modifiable xen.gz kernel entry as well.<br>
<br>
Also, we should likely use the centos-release-xen package to handle the<br>
&#39;/etc/sysconfig/xen-boot&#39; file as well, since it already has the<br>
/usr/bin/grub-bootxen.sh script.<br>
<br>
Thoughts?<br>
<br>
<br>
<br>
<br>_______________________________________________<br>
CentOS-virt mailing list<br>
<a href="mailto:CentOS-virt@centos.org">CentOS-virt@centos.org</a><br>
<a href="http://lists.centos.org/mailman/listinfo/centos-virt" target="_blank">http://lists.centos.org/mailman/listinfo/centos-virt</a><br>
<br></blockquote></div><br></div>