* Re: Bug#617538: update-grub (mk-grubconfig) does not support old "xenkopt"
[not found] <19831.45049.172606.321868@mariner.uk.xensource.com>
@ 2011-03-09 17:48 ` Colin Watson
2011-03-23 12:42 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 1 reply; 2+ messages in thread
From: Colin Watson @ 2011-03-09 17:48 UTC (permalink / raw)
To: Ian Jackson, 617538; +Cc: grub-devel
On Wed, Mar 09, 2011 at 04:51:05PM +0000, Ian Jackson wrote:
> The grub 2 config generator does not appear to support an equivalent
> to the "xenkopt" option from old (grub 1) update-grub.
>
> This is used to provide kernel command line arguments that apply only
> when booting the kernel under Xen. For example, a pvops kernel which
> can boot dom0 vs. baremetal, and where a serial console is in use,
> would normally want
> kopt="console=ttyS0,115200,8n1"
> xenkopt="console=hvc0"
> since when booting under Xen the kernel needs to use the Xen console
> rather than direct access to the serial port.
>
> I suggest adding two variables
> GRUB_CMDLINE_LINUX_XEN
> GRUB_CMDLINE_LINUX_XEN_DEFAULT
> which when specified /override/ the values of
> GRUB_CMDLINE_LINUX
> GRUB_CMDLINE_LINUX_DEFAULT
Seems reasonable, although I think the naming is confusing; it's not
necessarily obvious that GRUB_CMDLINE_LINUX_XEN overrides
GRUB_CMDLINE_LINUX while GRUB_CMDLINE_XEN appends to it. How about
GRUB_CMDLINE_LINUX_XEN_REPLACE and
GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT? They're a bit long, but ...
(CCing patch to grub-devel.)
2011-03-09 Colin Watson <cjwatson@ubuntu.com>
* util/grub.d/20_linux_xen.in: Honour GRUB_CMDLINE_LINUX_XEN_REPLACE
and GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT, which replace
GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT (complementing the
existing options which append).
* docs/grub.texi (Simple configuration): Document new options.
=== modified file 'docs/grub.texi'
--- docs/grub.texi 2011-03-09 17:35:16 +0000
+++ docs/grub.texi 2011-03-09 17:46:20 +0000
@@ -1114,8 +1114,14 @@ NetBSD.
@item GRUB_CMDLINE_XEN
@itemx GRUB_CMDLINE_XEN_DEFAULT
-As @samp{GRUB_CMDLINE_LINUX} and @samp{GRUB_CMDLINE_LINUX_DEFAULT}, but for
-Linux and Xen.
+The values of these options are appended to the values of
+@samp{GRUB_CMDLINE_LINUX} and @samp{GRUB_CMDLINE_LINUX_DEFAULT} for Linux
+and Xen menu entries.
+
+@item GRUB_CMDLINE_LINUX_XEN_REPLACE
+@item GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT
+The values of these options replace the values of @samp{GRUB_CMDLINE_LINUX}
+and @samp{GRUB_CMDLINE_LINUX_DEFAULT} for Linux and Xen menu entries.
@item GRUB_DISABLE_LINUX_UUID
Normally, @command{grub-mkconfig} will generate menu entries that use
=== modified file 'util/grub.d/20_linux_xen.in'
--- util/grub.d/20_linux_xen.in 2011-02-11 13:00:54 +0000
+++ util/grub.d/20_linux_xen.in 2011-03-09 17:44:27 +0000
@@ -51,6 +51,14 @@ else
LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
fi
+# Allow overriding GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT.
+if [ "${GRUB_CMDLINE_LINUX_XEN_REPLACE}" ]; then
+ GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX_XEN_REPLACE}"
+fi
+if [ "${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}" ]; then
+ GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}"
+fi
+
linux_entry ()
{
os="$1"
--
Colin Watson [cjwatson@ubuntu.com]
^ permalink raw reply [flat|nested] 2+ messages in thread
* Re: Bug#617538: update-grub (mk-grubconfig) does not support old "xenkopt"
2011-03-09 17:48 ` Bug#617538: update-grub (mk-grubconfig) does not support old "xenkopt" Colin Watson
@ 2011-03-23 12:42 ` Vladimir 'φ-coder/phcoder' Serbinenko
0 siblings, 0 replies; 2+ messages in thread
From: Vladimir 'φ-coder/phcoder' Serbinenko @ 2011-03-23 12:42 UTC (permalink / raw)
To: The development of GNU GRUB
[-- Attachment #1: Type: text/plain, Size: 3236 bytes --]
The patch is ok after 1.99.
On 09.03.2011 18:48, Colin Watson wrote:
> On Wed, Mar 09, 2011 at 04:51:05PM +0000, Ian Jackson wrote:
>
>> The grub 2 config generator does not appear to support an equivalent
>> to the "xenkopt" option from old (grub 1) update-grub.
>>
>> This is used to provide kernel command line arguments that apply only
>> when booting the kernel under Xen. For example, a pvops kernel which
>> can boot dom0 vs. baremetal, and where a serial console is in use,
>> would normally want
>> kopt="console=ttyS0,115200,8n1"
>> xenkopt="console=hvc0"
>> since when booting under Xen the kernel needs to use the Xen console
>> rather than direct access to the serial port.
>>
>> I suggest adding two variables
>> GRUB_CMDLINE_LINUX_XEN
>> GRUB_CMDLINE_LINUX_XEN_DEFAULT
>> which when specified /override/ the values of
>> GRUB_CMDLINE_LINUX
>> GRUB_CMDLINE_LINUX_DEFAULT
>>
> Seems reasonable, although I think the naming is confusing; it's not
> necessarily obvious that GRUB_CMDLINE_LINUX_XEN overrides
> GRUB_CMDLINE_LINUX while GRUB_CMDLINE_XEN appends to it. How about
> GRUB_CMDLINE_LINUX_XEN_REPLACE and
> GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT? They're a bit long, but ...
>
> (CCing patch to grub-devel.)
>
> 2011-03-09 Colin Watson <cjwatson@ubuntu.com>
>
> * util/grub.d/20_linux_xen.in: Honour GRUB_CMDLINE_LINUX_XEN_REPLACE
> and GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT, which replace
> GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT (complementing the
> existing options which append).
> * docs/grub.texi (Simple configuration): Document new options.
>
> === modified file 'docs/grub.texi'
> --- docs/grub.texi 2011-03-09 17:35:16 +0000
> +++ docs/grub.texi 2011-03-09 17:46:20 +0000
> @@ -1114,8 +1114,14 @@ NetBSD.
>
> @item GRUB_CMDLINE_XEN
> @itemx GRUB_CMDLINE_XEN_DEFAULT
> -As @samp{GRUB_CMDLINE_LINUX} and @samp{GRUB_CMDLINE_LINUX_DEFAULT}, but for
> -Linux and Xen.
> +The values of these options are appended to the values of
> +@samp{GRUB_CMDLINE_LINUX} and @samp{GRUB_CMDLINE_LINUX_DEFAULT} for Linux
> +and Xen menu entries.
> +
> +@item GRUB_CMDLINE_LINUX_XEN_REPLACE
> +@item GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT
> +The values of these options replace the values of @samp{GRUB_CMDLINE_LINUX}
> +and @samp{GRUB_CMDLINE_LINUX_DEFAULT} for Linux and Xen menu entries.
>
> @item GRUB_DISABLE_LINUX_UUID
> Normally, @command{grub-mkconfig} will generate menu entries that use
>
> === modified file 'util/grub.d/20_linux_xen.in'
> --- util/grub.d/20_linux_xen.in 2011-02-11 13:00:54 +0000
> +++ util/grub.d/20_linux_xen.in 2011-03-09 17:44:27 +0000
> @@ -51,6 +51,14 @@ else
> LINUX_ROOT_DEVICE=UUID=${GRUB_DEVICE_UUID}
> fi
>
> +# Allow overriding GRUB_CMDLINE_LINUX and GRUB_CMDLINE_LINUX_DEFAULT.
> +if [ "${GRUB_CMDLINE_LINUX_XEN_REPLACE}" ]; then
> + GRUB_CMDLINE_LINUX="${GRUB_CMDLINE_LINUX_XEN_REPLACE}"
> +fi
> +if [ "${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}" ]; then
> + GRUB_CMDLINE_LINUX_DEFAULT="${GRUB_CMDLINE_LINUX_XEN_REPLACE_DEFAULT}"
> +fi
> +
> linux_entry ()
> {
> os="$1"
>
>
--
Regards
Vladimir 'φ-coder/phcoder' Serbinenko
[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 294 bytes --]
^ permalink raw reply [flat|nested] 2+ messages in thread
end of thread, other threads:[~2011-03-23 12:43 UTC | newest]
Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
[not found] <19831.45049.172606.321868@mariner.uk.xensource.com>
2011-03-09 17:48 ` Bug#617538: update-grub (mk-grubconfig) does not support old "xenkopt" Colin Watson
2011-03-23 12:42 ` Vladimir 'φ-coder/phcoder' Serbinenko
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.