[opensuse-virtual] Where to set "/xen.gz <options>" in grub2 config?
I just installed openSUSE 13.2 with Xen & kernel-xen. I need to set up the /xen.gz ... <OPTIONS> ... in grub. In grub-legacy that's easy. Just modify the /boot/grub/menu.lst kernel /xen.gz dom0_mem=1024M,max:1024M dom0_max_vcpus=2 dom0_vcpus_pin=true ... The system installed grub2 as the default. In grub2 it's not clear to me how to set those options. The grub2-generated /boot/grub/grub.cfg has ... echo 'Loading Xen xen ...' if [ "$grub_platform" = "pc" -o "$grub_platform" = "" ]; then xen_rm_opts= else xen_rm_opts="no-real-mode edd=off" fi multiboot /xen.gz placeholder ${xen_rm_opts} ... Where is $grub_platform defined? I can't find the source. Can I query it from the shell? In either if/else case, it doesn't give you the option to add your own options. Where do modify the xen.gz options when using grub2? LT -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
lyndat3@your-mail.com wrote:
I just installed openSUSE 13.2 with Xen & kernel-xen.
I need to set up the /xen.gz ... <OPTIONS> ... in grub.
In grub-legacy that's easy. Just modify the /boot/grub/menu.lst
kernel /xen.gz dom0_mem=1024M,max:1024M dom0_max_vcpus=2 dom0_vcpus_pin=true ...
The system installed grub2 as the default. In grub2 it's not clear to me how to set those options.
Add the options to GRUB_CMDLINE_XEN in /etc/default/grub and recreate /boot/grub2/grub.cfg with 'grub2-mkconfig -o /boot/grub2/grub.cfg'. Regards, Jim -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On Wed, Mar 25, 2015, at 08:51 AM, Jim Fehlig wrote:
lyndat3@your-mail.com wrote:
I just installed openSUSE 13.2 with Xen & kernel-xen.
I need to set up the /xen.gz ... <OPTIONS> ... in grub.
In grub-legacy that's easy. Just modify the /boot/grub/menu.lst
kernel /xen.gz dom0_mem=1024M,max:1024M dom0_max_vcpus=2 dom0_vcpus_pin=true ...
The system installed grub2 as the default. In grub2 it's not clear to me how to set those options.
Add the options to GRUB_CMDLINE_XEN in /etc/default/grub and recreate /boot/grub2/grub.cfg with 'grub2-mkconfig -o /boot/grub2/grub.cfg'.
Thanks, GRUB_CMDLINE_XEN= takes care of the xen.gz line. If I have multikernel enabled and have both a -xen and -default kernel available, the module /vmlinuz-3.19.2-2.g6c3d33f-xen ... line looks like it's assembled from a combination of GRUB_CMDLINE_LINUX= & GRUB_CMDLINE_LINUX_DEFAULT= I need different options on the Xen instance's /vmlinuz line. For example a different elevator= & clocksource=. If GRUB_CMDLINE_XEN handles the Xen instance's xen.gz line, how do I define the xen-specific /vmlinuz line? LT -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
lyndat3@your-mail.com wrote:
On Wed, Mar 25, 2015, at 08:51 AM, Jim Fehlig wrote:
lyndat3@your-mail.com wrote:
I just installed openSUSE 13.2 with Xen & kernel-xen.
I need to set up the /xen.gz ... <OPTIONS> ... in grub.
In grub-legacy that's easy. Just modify the /boot/grub/menu.lst
kernel /xen.gz dom0_mem=1024M,max:1024M dom0_max_vcpus=2 dom0_vcpus_pin=true ...
The system installed grub2 as the default. In grub2 it's not clear to me how to set those options.
Add the options to GRUB_CMDLINE_XEN in /etc/default/grub and recreate /boot/grub2/grub.cfg with 'grub2-mkconfig -o /boot/grub2/grub.cfg'.
Thanks, GRUB_CMDLINE_XEN= takes care of the xen.gz line.
If I have multikernel enabled and have both a -xen and -default kernel available, the
module /vmlinuz-3.19.2-2.g6c3d33f-xen ...
line looks like it's assembled from a combination of
GRUB_CMDLINE_LINUX= & GRUB_CMDLINE_LINUX_DEFAULT=
Right.
I need different options on the Xen instance's /vmlinuz line. For example a different elevator= & clocksource=.
Hmm, not sure if that is currently possible, but I'm not a grub2 expert. Perhaps others on the list have suggestions. Otherwise might be a feature request for grub2. Regards, Jim -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On 25.03.15 at 17:24, <JFEHLIG@suse.com> wrote: lyndat3@your-mail.com wrote: On Wed, Mar 25, 2015, at 08:51 AM, Jim Fehlig wrote:
lyndat3@your-mail.com wrote:
I just installed openSUSE 13.2 with Xen & kernel-xen.
I need to set up the /xen.gz ... <OPTIONS> ... in grub.
In grub-legacy that's easy. Just modify the /boot/grub/menu.lst
kernel /xen.gz dom0_mem=1024M,max:1024M dom0_max_vcpus=2 dom0_vcpus_pin=true ...
The system installed grub2 as the default. In grub2 it's not clear to me how to set those options.
Add the options to GRUB_CMDLINE_XEN in /etc/default/grub and recreate /boot/grub2/grub.cfg with 'grub2-mkconfig -o /boot/grub2/grub.cfg'.
Thanks, GRUB_CMDLINE_XEN= takes care of the xen.gz line.
If I have multikernel enabled and have both a -xen and -default kernel available, the
module /vmlinuz-3.19.2-2.g6c3d33f-xen ...
line looks like it's assembled from a combination of
GRUB_CMDLINE_LINUX= & GRUB_CMDLINE_LINUX_DEFAULT=
Right.
I need different options on the Xen instance's /vmlinuz line. For example a different elevator= & clocksource=.
Hmm, not sure if that is currently possible, but I'm not a grub2 expert. Perhaps others on the list have suggestions. Otherwise might be a feature request for grub2.
Isn't it GRUB_CMDLINE_LINUX_XEN? Jan -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On Wed, Mar 25, 2015, at 09:35 AM, Jan Beulich wrote:
Isn't it GRUB_CMDLINE_LINUX_XEN?
At upstream docs, I found these ‘GRUB_CMDLINE_XEN’ ‘GRUB_CMDLINE_XEN_DEFAULT’ The values of these options are appended to the values of ‘GRUB_CMDLINE_LINUX’ and ‘GRUB_CMDLINE_LINUX_DEFAULT’ for Linux and Xen menu entries. and ‘GRUB_CMDLINE_LINUX_XEN_REPLACE’ ‘GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT’ The values of these options replace the values of ‘GRUB_CMDLINE_LINUX’ and ‘GRUB_CMDLINE_LINUX_DEFAULT’ for Linux and Xen menu entries. Safe to assume the *_REPLACE will be correctly used by openSUSE xen configs? LT -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On 3/25/2015 at 10:40 AM, <lyndat3@your-mail.com> wrote:
On Wed, Mar 25, 2015, at 09:35 AM, Jan Beulich wrote:
Isn't it GRUB_CMDLINE_LINUX_XEN?
At upstream docs, I found these
‘GRUB_CMDLINE_XEN’ ‘GRUB_CMDLINE_XEN_DEFAULT’
The values of these options are appended to the values of ‘GRUB_CMDLINE_LINUX’ and ‘GRUB_CMDLINE_LINUX_DEFAULT’ for Linux and Xen menu entries.
and
‘GRUB_CMDLINE_LINUX_XEN_REPLACE’ ‘GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT’
The values of these options replace the values of ‘GRUB_CMDLINE_LINUX’ and ‘GRUB_CMDLINE_LINUX_DEFAULT’ for Linux and Xen menu entries.
Safe to assume the *_REPLACE will be correctly used by openSUSE xen configs?
These options are used in /etc/grub.d/20_linux_xen. Setting these in /etc/default/grub and running 'grub2-mkconfig -o /boot/grub2/grub.cfg' should give you what you want. - Charles -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On Wed, Mar 25, 2015, at 09:49 AM, Charles Arnold wrote:
These options are used in /etc/grub.d/20_linux_xen. Setting these in /etc/default/grub and running 'grub2-mkconfig -o /boot/grub2/grub.cfg' should give you what you want.
That was't exactly the question. Or the last question anyway. Separate options for the -default & -xen kernel lines ARE set with the *_REPLACE I found above. For example setting GRUB_CMDLINE_LINUX_DEFAULT=" ... clocksource=acpi_pm divider=10 ..." GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT="... clocksource=xen ..." enables the two instances to have different clocksources. Other options can be added & changed similarly. IIUC the GRUB_CMDLINE_LINUX_XEN_REPLACE GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT are not added or mentioned to the out-of-the-box grub2-generated config. You have to know & add them. LT -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On Wed, Mar 25, 2015, at 09:24 AM, Jim Fehlig wrote:
I need different options on the Xen instance's /vmlinuz line. For example a different elevator= & clocksource=.
Hmm, not sure if that is currently possible, but I'm not a grub2 expert. Perhaps others on the list have suggestions. Otherwise might be a feature request for grub2.
I'm not either, I'd appreciate hearing from anyone who IS, on this. grub2's far less clean IMO than -legacy, but with support completely refused for -legacy by upstream, it's the way of things now. Just installing -xen & -default kernels alongside of grub2 ends up generating this list of menu & submenu entries: grep "submenu\|^\menuentry" /boot/grub2/grub.cfg | cut -d "'" -f2 openSUSE Advanced options for openSUSE openSUSE GNU/Linux, with Xen hypervisor Advanced options for openSUSE GNU/Linux (with Xen hypervisor) Xen hypervisor, version 4.5.0_03-359 Xen hypervisor, version 4.5 Xen hypervisor, version 4 Xen hypervisor, version dbg Xen hypervisor, version xen Xen hypervisor, version dbg-4.5.0_03-359 Xen hypervisor, version dbg-4.5 Xen hypervisor, version dbg-4 Not sure what to do with all of those yet. On a headless server without some helpful GUI tools making edits is a bit of a mess. While setting up & tuning Xen, snce -xen & -default tuning are necessarily different, this gets to be a pain. I'm hoping I won't have to resort to manual config of grub.cfg. LT -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On Wed, Mar 25, lyndat3@your-mail.com wrote:
If GRUB_CMDLINE_XEN handles the Xen instance's xen.gz line, how do I define the xen-specific /vmlinuz line?
Create a /boot/grub2/custom.cfg and put all your private stuff there. grub2 does not allow private settings. In that custom.cfg, refer to /boot/vmlinuz-xen and /boot/initrd-xen instead of the versioned files. Doing it that way will use always the latest installed kernel pkg. I think the syntax of that file is something like: menuentry "my entry" { load somedriver kernel /boot/xen.gz some xen cmdline options module /boot/vmlinuz-xen some kernel cmdline optionsd module /boot/initrd-xen } Refer to /boot/grub2/grub.cfg for the exact syntax. You can as many entries as you want, they will appear in the main grub menu. Olaf -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
grub2 does not allow private settings.
Can you explain that some more? I thought I managed to correctly get the xen-specific override entries working using GRUB_CMDLINE_LINUX_XEN_REPLACE GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT
Create a /boot/grub2/custom.cfg and put all your private stuff there.
In that custom.cfg, refer to /boot/vmlinuz-xen and /boot/initrd-xen instead of the versioned files. Doing it that way will use always the latest installed kernel pkg.
I think the syntax of that file is something like: snip
That's cleaner and more convenient in any case. I'll give that a try. Thanks.
You can as many entries as you want, they will appear in the main grub menu.
Is there a cmd line tool/script that displays the defined & available grub2 menu entries, with their boot-instance numbers that can be used to set the default boot item? LT -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
On Thu, Mar 26, lyndat3@your-mail.com wrote:
grub2 does not allow private settings.
Can you explain that some more?
I thought I managed to correctly get the xen-specific override entries working using
GRUB_CMDLINE_LINUX_XEN_REPLACE GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT
This is for every kernel. I think you said earlier that you wanted to boot the same kernel with a different set of cmdline options. To actually achieve that a custom.cfg is required.
You can as many entries as you want, they will appear in the main grub menu.
Is there a cmd line tool/script that displays the defined & available grub2 menu entries, with their boot-instance numbers that can be used to set the default boot item?
I do not know, last time this came up the answer was no. And such tool, to be complete, has to handle also the "source" command. Olaf -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
This is for every kernel. I think you said earlier that you wanted to boot the same kernel with a different set of cmdline options. To actually achieve that a custom.cfg is required.
I had been referring to different options for 1 kernel-default and 1 kernel-xen. For that, it was sufficient. But eventually I will have multiples of each. Your point is taken.
Is there a cmd line tool/script that displays the defined & available grub2 menu entries, with their boot-instance numbers that can be used to set the default boot item?
I do not know, last time this came up the answer was no. And such tool, to be complete, has to handle also the "source" command.
I know 'grub2' is considered the future -- if only because grub1 is unsupported. I'm not always sure it's 'progress' though. If only on the server-side. LT -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
I do not know, last time this came up the answer was no. And such tool, to be complete, has to handle also the "source" command.
Easy to do if not generic - sufficient for the case of sources only in grub.cfg & custom.cfg grep "^menuentry" /boot/grub2/grub.cfg /boot/grub2/custom.cfg | cut -d "'" -f2 > /tmp/grubentries.txt nl -nln -v0 /tmp/grubentries.txt 0 openSUSE 1 openSUSE GNU/Linux, with Xen hypervisor 2 title kernel-default test 3 title kernel-xen test A more generic "grub2-list-menuentries" would be nice. LT -- To unsubscribe, e-mail: opensuse-virtual+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-virtual+owner@opensuse.org
participants (5)
-
Charles Arnold
-
Jan Beulich
-
Jim Fehlig
-
lyndat3@your-mail.com
-
Olaf Hering