Mailing List Archive

[PATCH 0 of 6] pygrub fixes to support a Fedora 16 guest
This series contains patches that may be needed to allow pygrub to boot a
Fedora 16 guest.

By default, Fedora 16 has GPT partitions and uses grub2. The first GPT
partition is a grub2 boot partition to store the grub2 code. The second
GPT partition contains the /boot filesystem with the kernel and initramfs
files and grub2 configuration files. The remaining space is an LVM
partition containing the remaining file systems.

The first patch allows pygrub to check all the GPT partitions, rather than
just the first. This is a repost of the patch I submitted a few days ago
with a slightly edited introductory text.

The second patch allows pygrub to find the grub2 configuration file which
are in the /boot/grub2 directory on Fedora 16.

The third patch allows pygrub to handle partition references such as
(hd0,gpt2) which occur in the Fedora 16 grub2 configuration file.

The fourth patch allows pygrub to parse grub2 configuration files with sub
menus by ignoring the submenu line and the corresponding } line. A default
Fedora 16 grub2 configuration file doesn't have sub menus but they do
occur if the xen hypervisor is installed on the guest.

The fifth patch allows pygrub to parse grub2 configurations with the line
set default="${saved_entry}"
which can occur in the Fedora 16 grub2 configuration file.

The final patch adds a sample Fedora 16 grub2 configuration file
containing the problems fixed by patches 3,4 and 5.

Michael Young

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH 0 of 6] pygrub fixes to support a Fedora 16 guest [ In reply to ]
On Thu, Oct 20, 2011 at 12:02:21AM +0100, M A Young wrote:
> This series contains patches that may be needed to allow pygrub to
> boot a Fedora 16 guest.
>
> By default, Fedora 16 has GPT partitions and uses grub2. The first
> GPT partition is a grub2 boot partition to store the grub2 code. The
> second GPT partition contains the /boot filesystem with the kernel
> and initramfs files and grub2 configuration files. The remaining
> space is an LVM partition containing the remaining file systems.
>
> The first patch allows pygrub to check all the GPT partitions,
> rather than just the first. This is a repost of the patch I
> submitted a few days ago with a slightly edited introductory text.
>
> The second patch allows pygrub to find the grub2 configuration file
> which are in the /boot/grub2 directory on Fedora 16.
>
> The third patch allows pygrub to handle partition references such as
> (hd0,gpt2) which occur in the Fedora 16 grub2 configuration file.
>
> The fourth patch allows pygrub to parse grub2 configuration files
> with sub menus by ignoring the submenu line and the corresponding }
> line. A default Fedora 16 grub2 configuration file doesn't have sub
> menus but they do occur if the xen hypervisor is installed on the
> guest.
>
> The fifth patch allows pygrub to parse grub2 configurations with the line
> set default="${saved_entry}"
> which can occur in the Fedora 16 grub2 configuration file.
>
> The final patch adds a sample Fedora 16 grub2 configuration file
> containing the problems fixed by patches 3,4 and 5.

You can add Reviewed-by: Konrad Rzeszutek Wilk <konrad.wilk@oracle.com>
to them too.

Thanks for making the changes.

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH 0 of 6] pygrub fixes to support a Fedora 16 guest [ In reply to ]
On Thu, Oct 20, 2011 at 12:02:21AM +0100, M A Young wrote:
> This series contains patches that may be needed to allow pygrub to boot a
> Fedora 16 guest.
>

Thanks a lot!

This series should be backported to xen-4.1-testing.hg and xen-4.0-testing.hg aswell,
after committed to xen-unstable. It's important to have pygrub support for GPT in those branches aswell.

-- Pasi


> By default, Fedora 16 has GPT partitions and uses grub2. The first GPT
> partition is a grub2 boot partition to store the grub2 code. The second
> GPT partition contains the /boot filesystem with the kernel and initramfs
> files and grub2 configuration files. The remaining space is an LVM
> partition containing the remaining file systems.
>
> The first patch allows pygrub to check all the GPT partitions, rather
> than just the first. This is a repost of the patch I submitted a few days
> ago with a slightly edited introductory text.
>
> The second patch allows pygrub to find the grub2 configuration file which
> are in the /boot/grub2 directory on Fedora 16.
>
> The third patch allows pygrub to handle partition references such as
> (hd0,gpt2) which occur in the Fedora 16 grub2 configuration file.
>
> The fourth patch allows pygrub to parse grub2 configuration files with
> sub menus by ignoring the submenu line and the corresponding } line. A
> default Fedora 16 grub2 configuration file doesn't have sub menus but
> they do occur if the xen hypervisor is installed on the guest.
>
> The fifth patch allows pygrub to parse grub2 configurations with the line
> set default="${saved_entry}"
> which can occur in the Fedora 16 grub2 configuration file.
>
> The final patch adds a sample Fedora 16 grub2 configuration file
> containing the problems fixed by patches 3,4 and 5.
>
> Michael Young
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH 0 of 6] pygrub fixes to support a Fedora 16 guest [ In reply to ]
Please, back port  to xen-4.1-testing.hg.

Boris

--- On Wed, 10/19/11, M A Young <m.a.young@durham.ac.uk> wrote:

From: M A Young <m.a.young@durham.ac.uk>
Subject: [Xen-devel] [PATCH 0 of 6] pygrub fixes to support a Fedora 16 guest
To: xen-devel@lists.xensource.com
Cc: "Ian Campbell" <Ian.Campbell@citrix.com>
Date: Wednesday, October 19, 2011, 7:02 PM

This series contains patches that may be needed to allow pygrub to boot a Fedora 16 guest.

By default, Fedora 16 has GPT partitions and uses grub2. The first GPT partition is a grub2 boot partition to store the grub2 code. The second GPT partition contains the /boot filesystem with the kernel and initramfs files and grub2 configuration files. The remaining space is an LVM partition containing the remaining file systems.

The first patch allows pygrub to check all the GPT partitions, rather than just the first. This is a repost of the patch I submitted a few days ago with a slightly edited introductory text.

The second patch allows pygrub to find the grub2 configuration file which are in the /boot/grub2 directory on Fedora 16.

The third patch allows pygrub to handle partition references such as (hd0,gpt2) which occur in the Fedora 16 grub2 configuration file.

The fourth patch allows pygrub to parse grub2 configuration files with sub menus by ignoring the submenu line and the corresponding } line. A default Fedora 16 grub2 configuration file doesn't have sub menus but they do occur if the xen hypervisor is installed on the guest.

The fifth patch allows pygrub to parse grub2 configurations with the line
set default="${saved_entry}"
which can occur in the Fedora 16 grub2 configuration file.

The final patch adds a sample Fedora 16 grub2 configuration file
containing the problems fixed by patches 3,4 and 5.

    Michael Young

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH 0 of 6] pygrub fixes to support a Fedora 16 guest [ In reply to ]
On Sat, Oct 22, 2011 at 07:22:46AM -0700, Boris Derzhavets wrote:
> Please, back port to xen-4.1-testing.hg.
>

Yep, this pygrub patch series is already in xen-unstable.hg,
and it should be backported to xen-4.1-testing.hg aswell,
so upcoming Xen 4.1.3 will support F16 PV domUs.

(It's already included in Michael's Fedora 16 xen rpms,
and works well there.)

-- Pasi


>
> --- On Wed, 10/19/11, M A Young <m.a.young@durham.ac.uk> wrote:
>
> From: M A Young <m.a.young@durham.ac.uk>
> Subject: [Xen-devel] [PATCH 0 of 6] pygrub fixes to support a Fedora 16
> guest
> To: xen-devel@lists.xensource.com
> Cc: "Ian Campbell" <Ian.Campbell@citrix.com>
> Date: Wednesday, October 19, 2011, 7:02 PM
>
> This series contains patches that may be needed to allow pygrub to boot
> a Fedora 16 guest.
>
> By default, Fedora 16 has GPT partitions and uses grub2. The first GPT
> partition is a grub2 boot partition to store the grub2 code. The second
> GPT partition contains the /boot filesystem with the kernel and
> initramfs files and grub2 configuration files. The remaining space is an
> LVM partition containing the remaining file systems.
>
> The first patch allows pygrub to check all the GPT partitions, rather
> than just the first. This is a repost of the patch I submitted a few
> days ago with a slightly edited introductory text.
>
> The second patch allows pygrub to find the grub2 configuration file
> which are in the /boot/grub2 directory on Fedora 16.
>
> The third patch allows pygrub to handle partition references such as
> (hd0,gpt2) which occur in the Fedora 16 grub2 configuration file.
>
> The fourth patch allows pygrub to parse grub2 configuration files with
> sub menus by ignoring the submenu line and the corresponding } line. A
> default Fedora 16 grub2 configuration file doesn't have sub menus but
> they do occur if the xen hypervisor is installed on the guest.
>
> The fifth patch allows pygrub to parse grub2 configurations with the
> line
> set default="${saved_entry}"
> which can occur in the Fedora 16 grub2 configuration file.
>
> The final patch adds a sample Fedora 16 grub2 configuration file
> containing the problems fixed by patches 3,4 and 5.
>
> Michael Young
>
> _______________________________________________
> Xen-devel mailing list
> [1]Xen-devel@lists.xensource.com
> [2]http://lists.xensource.com/xen-devel
>
> References
>
> Visible links
> 1. file:///mc/compose?to=Xen-devel@lists.xensource.com
> 2. http://lists.xensource.com/xen-devel

> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel


_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH 0 of 6] pygrub fixes to support a Fedora 16 guest [ In reply to ]
On Wed, Nov 16, 2011 at 08:41:08PM +0200, Pasi Kärkkäinen wrote:
> On Sat, Oct 22, 2011 at 07:22:46AM -0700, Boris Derzhavets wrote:
> > Please, back port to xen-4.1-testing.hg.
> >
>
> Yep, this pygrub patch series is already in xen-unstable.hg,
> and it should be backported to xen-4.1-testing.hg aswell,
> so upcoming Xen 4.1.3 will support F16 PV domUs.
>
> (It's already included in Michael's Fedora 16 xen rpms,
> and works well there.)
>

Fedora 16 Xen 4.1.2 src.rpm is for example here:
ftp://ftp.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/updates/16/SRPMS/xen-4.1.2-2.fc16.src.rpm

and that includes a working backport of these pygryb patches,
in a case they don't apply cleanly to xen-4.1-testing.hg.

-- Pasi


>
>
> >
> > --- On Wed, 10/19/11, M A Young <m.a.young@durham.ac.uk> wrote:
> >
> > From: M A Young <m.a.young@durham.ac.uk>
> > Subject: [Xen-devel] [PATCH 0 of 6] pygrub fixes to support a Fedora 16
> > guest
> > To: xen-devel@lists.xensource.com
> > Cc: "Ian Campbell" <Ian.Campbell@citrix.com>
> > Date: Wednesday, October 19, 2011, 7:02 PM
> >
> > This series contains patches that may be needed to allow pygrub to boot
> > a Fedora 16 guest.
> >
> > By default, Fedora 16 has GPT partitions and uses grub2. The first GPT
> > partition is a grub2 boot partition to store the grub2 code. The second
> > GPT partition contains the /boot filesystem with the kernel and
> > initramfs files and grub2 configuration files. The remaining space is an
> > LVM partition containing the remaining file systems.
> >
> > The first patch allows pygrub to check all the GPT partitions, rather
> > than just the first. This is a repost of the patch I submitted a few
> > days ago with a slightly edited introductory text.
> >
> > The second patch allows pygrub to find the grub2 configuration file
> > which are in the /boot/grub2 directory on Fedora 16.
> >
> > The third patch allows pygrub to handle partition references such as
> > (hd0,gpt2) which occur in the Fedora 16 grub2 configuration file.
> >
> > The fourth patch allows pygrub to parse grub2 configuration files with
> > sub menus by ignoring the submenu line and the corresponding } line. A
> > default Fedora 16 grub2 configuration file doesn't have sub menus but
> > they do occur if the xen hypervisor is installed on the guest.
> >
> > The fifth patch allows pygrub to parse grub2 configurations with the
> > line
> > set default="${saved_entry}"
> > which can occur in the Fedora 16 grub2 configuration file.
> >
> > The final patch adds a sample Fedora 16 grub2 configuration file
> > containing the problems fixed by patches 3,4 and 5.
> >
> > Michael Young
> >
> > _______________________________________________
> > Xen-devel mailing list
> > [1]Xen-devel@lists.xensource.com
> > [2]http://lists.xensource.com/xen-devel
> >
> > References
> >
> > Visible links
> > 1. file:///mc/compose?to=Xen-devel@lists.xensource.com
> > 2. http://lists.xensource.com/xen-devel
>
> > _______________________________________________
> > Xen-devel mailing list
> > Xen-devel@lists.xensource.com
> > http://lists.xensource.com/xen-devel
>
>
> _______________________________________________
> Xen-devel mailing list
> Xen-devel@lists.xensource.com
> http://lists.xensource.com/xen-devel

_______________________________________________
Xen-devel mailing list
Xen-devel@lists.xensource.com
http://lists.xensource.com/xen-devel
Re: [PATCH 0 of 6] pygrub fixes to support a Fedora 16 guest [ In reply to ]
On Wed, 14 Dec 2011, Pasi Kärkkäinen wrote:

> On Wed, Nov 16, 2011 at 08:41:08PM +0200, Pasi Kärkkäinen wrote:
>> On Sat, Oct 22, 2011 at 07:22:46AM -0700, Boris Derzhavets wrote:
>>> Please, back port to xen-4.1-testing.hg.
>>>
>>
>> Yep, this pygrub patch series is already in xen-unstable.hg,
>> and it should be backported to xen-4.1-testing.hg aswell,
>> so upcoming Xen 4.1.3 will support F16 PV domUs.
>>
>> (It's already included in Michael's Fedora 16 xen rpms,
>> and works well there.)
>>
>
> Fedora 16 Xen 4.1.2 src.rpm is for example here:
> ftp://ftp.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/updates/16/SRPMS/xen-4.1.2-2.fc16.src.rpm
>
> and that includes a working backport of these pygryb patches,
> in a case they don't apply cleanly to xen-4.1-testing.hg.

It doesn't have 24003:c681dd5aecf3 which adds a sample grub2 configuration
file though I expect that will backport cleanly, as should
23998:85d7b207fabc , 24000:65679fee0177 , 24001:152049468175 and
24002:979bc34d0ad0 .
The exception is 23999:138f707fa598 (getting pygrub to look in the /grub2
directories that Fedora 16 uses) which needs obvious adjustments because
the checking order changed from grub, grub2, extlinux in 4.1 to grub2,
extlinux, grub in 4.2.
The relevant bits of the Fedora package for this (if my mail client
doesn't mess them up) are below

Michael Young

--- xen-4.1.2/tools/pygrub/src/pygrub.orig 2011-10-13 18:56:41.000000000 +0100
+++ xen-4.1.2/tools/pygrub/src/pygrub 2011-10-13 20:46:58.000000000 +0100
@@ -394,7 +404,8 @@
["/boot/grub/menu.lst", "/boot/grub/grub.conf",
"/grub/menu.lst", "/grub/grub.conf"]) + \
map(lambda x: (x,grub.GrubConf.Grub2ConfigFile),
- ["/boot/grub/grub.cfg", "/grub/grub.cfg"]) + \
+ ["/boot/grub/grub.cfg", "/grub/grub.cfg",
+ "/boot/grub2/grub.cfg", "/grub2/grub.cfg"]) + \
map(lambda x: (x,grub.ExtLinuxConf.ExtLinuxConfigFile),
["/boot/isolinux/isolinux.cfg",
"/boot/extlinux.conf"])