Fedora 11 Xen domU grub.conf timeout=0 problem with pygrub

View: New views
6 Messages — Rating Filter:   Alert me  

Fedora 11 Xen domU grub.conf timeout=0 problem with pygrub

by Pasi Kärkkäinen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

Hello,

I just installed Fedora 11 Xen PV domU on Fedora 11 Xen dom0, using virt-install
like this:

virt-install -n testvm -r 512 --vcpus=1 -f /dev/vg_dom0test/testvm --vnc -p
-l "ftp://ftp.funet.fi/pub/mirrors/fedora.redhat.com/pub/fedora/linux/releases/11/Fedora/i386/os"

Installation goes fine, but after the installation is complete, and the domU
gets rebooted, it will never come up again. I tried multiple times, and it's
always the same. Installation starts and works fine, but after installation domU
doesn't start anymore - not even after "xm destroy" and "xm start".

I started investigating the problem, and from "xm log" I noticed the last
line of output is about starting pygrub and nothing after that.

I checked "ps aux" and noticed pygrub is there, waiting for something.
"strace -p" shows it's waiting for something, and checking the status all the time.

I tried running the same pygrub command from cmdline, and noticed I have to
press enter before the kernel gets chosen by pygrub. After pressing enter pygrub
copies the kernel/initrd/configuration and exists OK.

I echoed the config from manual pygrub run to /var/run/xend/boot/xenbl.pid file,
killed pygrub, and after that the after-installation-reboot continued normally..

When the domU got up I checked grub.conf from it:

# grub.conf generated by anaconda
#
# Note that you do not have to rerun grub after making changes to this file
# NOTICE:  You have a /boot partition.  This means that
#          all kernel and initrd paths are relative to /boot/, eg.
#          root (hd0,0)
#          kernel /vmlinuz-version ro root=/dev/mapper/vg_f11domu-lv_root
#          initrd /initrd-version.img
#boot=/dev/xvda
default=0
timeout=0
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Fedora (2.6.29.4-167.fc11.i686.PAE)
        root (hd0,0)
        kernel /vmlinuz-2.6.29.4-167.fc11.i686.PAE ro
        root=/dev/mapper/vg_f11domu-lv_root rhgb quiet
        initrd /initrd-2.6.29.4-167.fc11.i686.PAE.img


timeout=0 looks suspicious.. so I changed it to 5.
After that domU comes up OK on its own..

I changed timeout back to 0, and pygrub gets stuck again.

Is this a bug of pygrub, or a broken default grub.conf timeout value of F11?

-- Pasi

--
Fedora-xen mailing list
Fedora-xen@...
https://www.redhat.com/mailman/listinfo/fedora-xen

Re: Fedora 11 Xen domU grub.conf timeout=0 problem with pygrub

by Mark McLoughlin :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, 2009-08-19 at 01:34 +0300, Pasi Kärkkäinen wrote:

> #boot=/dev/xvda
> default=0
> timeout=0
> splashimage=(hd0,0)/grub/splash.xpm.gz
> hiddenmenu
> title Fedora (2.6.29.4-167.fc11.i686.PAE)
>         root (hd0,0)
>         kernel /vmlinuz-2.6.29.4-167.fc11.i686.PAE ro
>         root=/dev/mapper/vg_f11domu-lv_root rhgb quiet
>         initrd /initrd-2.6.29.4-167.fc11.i686.PAE.img
>
>
> timeout=0 looks suspicious.. so I changed it to 5.
> After that domU comes up OK on its own..
>
> I changed timeout back to 0, and pygrub gets stuck again.
>
> Is this a bug of pygrub, or a broken default grub.conf timeout value of F11?

timeout=0 should be fine, it sounds like a pygrub bug

Cheers,
Mark.

--
Fedora-xen mailing list
Fedora-xen@...
https://www.redhat.com/mailman/listinfo/fedora-xen

Re: Fedora 11 Xen domU grub.conf timeout=0 problem with pygrub

by Pasi Kärkkäinen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Aug 19, 2009 at 10:09:15AM +0000, Mark McLoughlin wrote:

> On Wed, 2009-08-19 at 01:34 +0300, Pasi Kärkkäinen wrote:
>
> > #boot=/dev/xvda
> > default=0
> > timeout=0
> > splashimage=(hd0,0)/grub/splash.xpm.gz
> > hiddenmenu
> > title Fedora (2.6.29.4-167.fc11.i686.PAE)
> >         root (hd0,0)
> >         kernel /vmlinuz-2.6.29.4-167.fc11.i686.PAE ro
> >         root=/dev/mapper/vg_f11domu-lv_root rhgb quiet
> >         initrd /initrd-2.6.29.4-167.fc11.i686.PAE.img
> >
> >
> > timeout=0 looks suspicious.. so I changed it to 5.
> > After that domU comes up OK on its own..
> >
> > I changed timeout back to 0, and pygrub gets stuck again.
> >
> > Is this a bug of pygrub, or a broken default grub.conf timeout value of F11?
>
> timeout=0 should be fine, it sounds like a pygrub bug
>

Indeed.

RHEL5.3 version of pygrub seems to work with F11 domU, but the upstream Xen
3.4.1 pygrub doesn't. The version numbers are the same (both are 0.6).

I'll make a diff and try to figure out the fix for this..

Are you guys planning to post the RHEL5 pygrub fixes upstream?

-- Pasi

--
Fedora-xen mailing list
Fedora-xen@...
https://www.redhat.com/mailman/listinfo/fedora-xen

Re: Fedora 11 Xen domU grub.conf timeout=0 problem with pygrub / patch

by Pasi Kärkkäinen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Aug 19, 2009 at 06:30:06PM +0300, Pasi Kärkkäinen wrote:

> On Wed, Aug 19, 2009 at 10:09:15AM +0000, Mark McLoughlin wrote:
> > On Wed, 2009-08-19 at 01:34 +0300, Pasi Kärkkäinen wrote:
> >
> > > #boot=/dev/xvda
> > > default=0
> > > timeout=0
> > > splashimage=(hd0,0)/grub/splash.xpm.gz
> > > hiddenmenu
> > > title Fedora (2.6.29.4-167.fc11.i686.PAE)
> > >         root (hd0,0)
> > >         kernel /vmlinuz-2.6.29.4-167.fc11.i686.PAE ro
> > >         root=/dev/mapper/vg_f11domu-lv_root rhgb quiet
> > >         initrd /initrd-2.6.29.4-167.fc11.i686.PAE.img
> > >
> > >
> > > timeout=0 looks suspicious.. so I changed it to 5.
> > > After that domU comes up OK on its own..
> > >
> > > I changed timeout back to 0, and pygrub gets stuck again.
> > >
> > > Is this a bug of pygrub, or a broken default grub.conf timeout value of F11?
> >
> > timeout=0 should be fine, it sounds like a pygrub bug
> >
>
> Indeed.
>
> RHEL5.3 version of pygrub seems to work with F11 domU, but the upstream Xen
> 3.4.1 pygrub doesn't. The version numbers are the same (both are 0.6).
>
> I'll make a diff and try to figure out the fix for this..
>
Attached is a patch to make upstream Xen 3.4.1 pygrub work with F11 domU grub.conf timeout=0
default setting. Works for me. Change is taken from the RHEL5.3 version of pygrub.

-- Pasi

> Are you guys planning to post the RHEL5 pygrub fixes upstream?
>
> -- Pasi
>
> --
> Fedora-xen mailing list
> Fedora-xen@...
> https://www.redhat.com/mailman/listinfo/fedora-xen


--- pygrub-xen341 2009-08-17 22:22:29.000000000 +0300
+++ pygrub 2009-08-19 18:39:17.000000000 +0300
@@ -447,7 +447,7 @@
                     # So we may come here even after a key has been pressed.
                     # Check both timeout and mytime to avoid exiting
                     # when we shouldn't.
-                    if timeout != -1 and mytime >= int(timeout):
+    if mytime >= int(timeout):
                         self.isdone = True
                         break
             else:


--
Fedora-xen mailing list
Fedora-xen@...
https://www.redhat.com/mailman/listinfo/fedora-xen

Re: Fedora 11 Xen domU grub.conf timeout=0 problem with pygrub / patch

by Pasi Kärkkäinen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Aug 19, 2009 at 07:46:26PM +0300, Pasi Kärkkäinen wrote:

> On Wed, Aug 19, 2009 at 06:30:06PM +0300, Pasi Kärkkäinen wrote:
> > On Wed, Aug 19, 2009 at 10:09:15AM +0000, Mark McLoughlin wrote:
> > > On Wed, 2009-08-19 at 01:34 +0300, Pasi Kärkkäinen wrote:
> > >
> > > > #boot=/dev/xvda
> > > > default=0
> > > > timeout=0
> > > > splashimage=(hd0,0)/grub/splash.xpm.gz
> > > > hiddenmenu
> > > > title Fedora (2.6.29.4-167.fc11.i686.PAE)
> > > >         root (hd0,0)
> > > >         kernel /vmlinuz-2.6.29.4-167.fc11.i686.PAE ro
> > > >         root=/dev/mapper/vg_f11domu-lv_root rhgb quiet
> > > >         initrd /initrd-2.6.29.4-167.fc11.i686.PAE.img
> > > >
> > > >
> > > > timeout=0 looks suspicious.. so I changed it to 5.
> > > > After that domU comes up OK on its own..
> > > >
> > > > I changed timeout back to 0, and pygrub gets stuck again.
> > > >
> > > > Is this a bug of pygrub, or a broken default grub.conf timeout value of F11?
> > >
> > > timeout=0 should be fine, it sounds like a pygrub bug
> > >
> >
> > Indeed.
> >
> > RHEL5.3 version of pygrub seems to work with F11 domU, but the upstream Xen
> > 3.4.1 pygrub doesn't. The version numbers are the same (both are 0.6).
> >
> > I'll make a diff and try to figure out the fix for this..
> >
>
> Attached is a patch to make upstream Xen 3.4.1 pygrub work with F11 domU grub.conf timeout=0
> default setting. Works for me. Change is taken from the RHEL5.3 version of pygrub.
>

I just noticed that with the default version of pygrub of Xen 3.4.1 you need to
go to "xm console <f11domU>" to choose the kernel, and after that it boots up normally..

The patch I sent takes care of auto-selecting the kernel when timeout=0.
 
-- Pasi

>
> > Are you guys planning to post the RHEL5 pygrub fixes upstream?
> >
> > -- Pasi
> >
> > --
> > Fedora-xen mailing list
> > Fedora-xen@...
> > https://www.redhat.com/mailman/listinfo/fedora-xen

> --- pygrub-xen341 2009-08-17 22:22:29.000000000 +0300
> +++ pygrub 2009-08-19 18:39:17.000000000 +0300
> @@ -447,7 +447,7 @@
>                      # So we may come here even after a key has been pressed.
>                      # Check both timeout and mytime to avoid exiting
>                      # when we shouldn't.
> -                    if timeout != -1 and mytime >= int(timeout):
> +    if mytime >= int(timeout):
>                          self.isdone = True
>                          break
>              else:

> --
> Fedora-xen mailing list
> Fedora-xen@...
> https://www.redhat.com/mailman/listinfo/fedora-xen

--
Fedora-xen mailing list
Fedora-xen@...
https://www.redhat.com/mailman/listinfo/fedora-xen

Re: Fedora 11 Xen domU grub.conf timeout=0 problem with pygrub / patch

by Pasi Kärkkäinen :: Rate this Message:

Reply to Author | View Threaded | Show Only this Message

On Wed, Aug 19, 2009 at 08:24:56PM +0300, Pasi Kärkkäinen wrote:

> On Wed, Aug 19, 2009 at 07:46:26PM +0300, Pasi Kärkkäinen wrote:
> > On Wed, Aug 19, 2009 at 06:30:06PM +0300, Pasi Kärkkäinen wrote:
> > > On Wed, Aug 19, 2009 at 10:09:15AM +0000, Mark McLoughlin wrote:
> > > > On Wed, 2009-08-19 at 01:34 +0300, Pasi Kärkkäinen wrote:
> > > >
> > > > > #boot=/dev/xvda
> > > > > default=0
> > > > > timeout=0
> > > > > splashimage=(hd0,0)/grub/splash.xpm.gz
> > > > > hiddenmenu
> > > > > title Fedora (2.6.29.4-167.fc11.i686.PAE)
> > > > >         root (hd0,0)
> > > > >         kernel /vmlinuz-2.6.29.4-167.fc11.i686.PAE ro
> > > > >         root=/dev/mapper/vg_f11domu-lv_root rhgb quiet
> > > > >         initrd /initrd-2.6.29.4-167.fc11.i686.PAE.img
> > > > >
> > > > >
> > > > > timeout=0 looks suspicious.. so I changed it to 5.
> > > > > After that domU comes up OK on its own..
> > > > >
> > > > > I changed timeout back to 0, and pygrub gets stuck again.
> > > > >
> > > > > Is this a bug of pygrub, or a broken default grub.conf timeout value of F11?
> > > >
> > > > timeout=0 should be fine, it sounds like a pygrub bug
> > > >
> > >
> > > Indeed.
> > >
> > > RHEL5.3 version of pygrub seems to work with F11 domU, but the upstream Xen
> > > 3.4.1 pygrub doesn't. The version numbers are the same (both are 0.6).
> > >
> > > I'll make a diff and try to figure out the fix for this..
> > >
> >
> > Attached is a patch to make upstream Xen 3.4.1 pygrub work with F11 domU grub.conf timeout=0
> > default setting. Works for me. Change is taken from the RHEL5.3 version of pygrub.
> >
>
> I just noticed that with the default version of pygrub of Xen 3.4.1 you need to
> go to "xm console <f11domU>" to choose the kernel, and after that it boots up normally..
>
> The patch I sent takes care of auto-selecting the kernel when timeout=0.
>

This is now fixed in xen-unstable and xen-3.4-testing:

http://xenbits.xen.org/staging/xen-unstable.hg?rev/3509276d8ad6
http://xenbits.xen.org/staging/xen-3.4-testing.hg?rev/7a57911ff09e

-- Pasi
 

> -- Pasi
>
> >
> > > Are you guys planning to post the RHEL5 pygrub fixes upstream?
> > >
> > > -- Pasi
> > >
> > > --
> > > Fedora-xen mailing list
> > > Fedora-xen@...
> > > https://www.redhat.com/mailman/listinfo/fedora-xen
>
> > --- pygrub-xen341 2009-08-17 22:22:29.000000000 +0300
> > +++ pygrub 2009-08-19 18:39:17.000000000 +0300
> > @@ -447,7 +447,7 @@
> >                      # So we may come here even after a key has been pressed.
> >                      # Check both timeout and mytime to avoid exiting
> >                      # when we shouldn't.
> > -                    if timeout != -1 and mytime >= int(timeout):
> > +    if mytime >= int(timeout):
> >                          self.isdone = True
> >                          break
> >              else:
>
> > --
> > Fedora-xen mailing list
> > Fedora-xen@...
> > https://www.redhat.com/mailman/listinfo/fedora-xen
>
> --
> Fedora-xen mailing list
> Fedora-xen@...
> https://www.redhat.com/mailman/listinfo/fedora-xen

--
Fedora-xen mailing list
Fedora-xen@...
https://www.redhat.com/mailman/listinfo/fedora-xen