WARNING - OLD ARCHIVES

This is an archived copy of the Xen.org mailing list, which we have preserved to ensure that existing links to archives are not broken. The live archive, which contains the latest emails, can be found at http://lists.xen.org/
   
 
 
Xen 
 
Home Products Support Community News
 
   
 

xen-users

Re: [Xen-users] 4.0.1, Debian Squeeze, and p[yv]grub

To: Alexandre Chapellon <a.chapellon@xxxxxxxxx>
Subject: Re: [Xen-users] 4.0.1, Debian Squeeze, and p[yv]grub
From: David Markey <admin@xxxxxxxxxxx>
Date: Mon, 30 May 2011 11:29:23 +0100
Cc: Simon Hobson <linux@xxxxxxxxxxxxxxxx>, xen-users@xxxxxxxxxxxxxxxxxxx
Delivery-date: Tue, 31 May 2011 08:13:50 -0700
Envelope-to: www-data@xxxxxxxxxxxxxxxxxxx
In-reply-to: <1306582774.3071.92.camel@xxxxxxxxxxxxxxxxxxxx>
List-help: <mailto:xen-users-request@lists.xensource.com?subject=help>
List-id: Xen user discussion <xen-users.lists.xensource.com>
List-post: <mailto:xen-users@lists.xensource.com>
List-subscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=subscribe>
List-unsubscribe: <http://lists.xensource.com/mailman/listinfo/xen-users>, <mailto:xen-users-request@lists.xensource.com?subject=unsubscribe>
References: <p06240811ca0569c8e1c5@xxxxxxxxxxxxxxxxxxxxxx> <1306582774.3071.92.camel@xxxxxxxxxxxxxxxxxxxx>
Reply-to: admin@xxxxxxxxxxx
Sender: xen-users-bounces@xxxxxxxxxxxxxxxxxxx
I think you are facing 2 problems here.

1. The parsing logic is flaky in pygrub at best. Its a game of catch-up to ensure we are parsing grub.cfg properly.

2. I *think* at some stage, debian started forcing block devices from xen-blkfront to be /dev/sda instead of /dev/xvda. So once you're dropped to a shell, do a dmesg and look in /dev.


On 28 May 2011 12:39, Alexandre Chapellon <a.chapellon@xxxxxxxxx> wrote:
What filesystem are you using?
I remember have read pygrub only support ext filesystems.

Le vendredi 27 mai 2011 à 16:25 +0100, Simon Hobson a écrit :
> The system is a new install of Debian Squeeze, with Xen 4.0.1 (latest
> stable package for Debian). I'm trying to get guests booted with
> pygrub, or even better pvgrub but it's not working for me.
>
> First off, as far as I can tell, pvgrub isn't in Debian - and it
> won't be as it's been rejected. Does anyone know if this is being
> worked on ?
>
> As for pygrub, that's failing as well. Apart from hitting the known
> bug that stops GRUB2 from installing on the guest (had to pull a
> later version down from Testing), starting a domain gives the error :
>
> >    Error: Boot loader didn't return any data!
>
> /var/log/xen/xend.log contains :
>
> >Traceback (most recent call last):
> >   File "/usr/lib/xen-4.0/lib/python/xen/xend/XendDomainInfo.py",
> >line 104, in create
> >     vm.start()
> >   File "/usr/lib/xen-4.0/lib/python/xen/xend/XendDomainInfo.py",
> >line 469, in start
> >     XendTask.log_progress(31, 60, self._initDomain)
> >   File "/usr/lib/xen-4.0/lib/python/xen/xend/XendTask.py", line 209,
> >in log_progress
> >     retval = func(*args, **kwds)
> >   File "/usr/lib/xen-4.0/lib/python/xen/xend/XendDomainInfo.py",
> >line 2820, in _initDomain
> >     self._configureBootloader()
> >   File "/usr/lib/xen-4.0/lib/python/xen/xend/XendDomainInfo.py",
> >line 3266, in _configureBootloader
> >     bootloader_args, kernel, ramdisk, args)
> >   File "/usr/lib/xen-4.0/lib/python/xen/xend/XendBootloader.py",
> >line 215, in bootloader
> >     raise VmError, msg
> >VmError: Boot loader didn't return any data!
>
>
> Following a hint I came across, I tried manually calling pygrub with :
> >  /usr/lib/xen-default/bin/pygrub --args="root=/dev/xvda1 ro"
> >/dev/vgmain/ipv6root
>
> And got these errors :
>
> >Using <class 'grub.GrubConf.Grub2ConfigFile'> to parse /boot/grub/grub.cfg
> >WARNING:root:Unknown directive load_video
> >WARNING:root:Unknown directive terminal_output
> >Traceback (most recent call last):
> >   File "/usr/lib/xen-default/bin/pygrub", line 669, in <module>
> >     chosencfg = run_grub(file, entry, fs, incfg["args"])
> >   File "/usr/lib/xen-default/bin/pygrub", line 549, in run_grub
> >     g = Grub(file, fs)
> >   File "/usr/lib/xen-default/bin/pygrub", line 205, in __init__
> >     self.read_config(file, fs)
> >   File "/usr/lib/xen-default/bin/pygrub", line 413, in read_config
> >     self.cf.parse(buf)
> >   File "/usr/lib/xen-4.0/bin/../lib/python/grub/GrubConf.py", line
> >402, in parse
> >     self.add_image(Grub2Image(title, img))
> >   File "/usr/lib/xen-4.0/bin/../lib/python/grub/GrubConf.py", line
> >318, in __init__
> >     _GrubImage.__init__(self, title, lines)
> >   File "/usr/lib/xen-4.0/bin/../lib/python/grub/GrubConf.py", line
> >87, in __init__
> >     self.reset(lines)
> >   File "/usr/lib/xen-4.0/bin/../lib/python/grub/GrubConf.py", line
> >103, in reset
> >     self._parse(lines)
> >   File "/usr/lib/xen-4.0/bin/../lib/python/grub/GrubConf.py", line
> >98, in _parse
> >     map(self.set_from_line, lines)
> >   File "/usr/lib/xen-4.0/bin/../lib/python/grub/GrubConf.py", line
> >328, in set_from_line
> >     setattr(self, self.commands[com], arg.strip())
> >   File "/usr/lib/xen-4.0/bin/../lib/python/grub/GrubConf.py", line
> >106, in set_root
> >     self._root = GrubDiskPart(val)
> >   File "/usr/lib/xen-4.0/bin/../lib/python/grub/GrubConf.py", line
> >57, in __init__
> >     self.disk = str
> >   File "/usr/lib/xen-4.0/bin/../lib/python/grub/GrubConf.py", line
> >70, in set_disk
> >     self._disk = int(val[2:])
> >ValueError: invalid literal for int() with base 10: 'ev/xvda1'
>
>
> Based on the last line of that, I tried an experiment and edited the
> script. AFAICS, the line in question is trying to extract a number
> from a device name, so I tried changing it from
> >self._disk = int(val[2:])
> to
> >self._disk = int(val[9:])
>
> I can then get the GRUB menu, and then quits - putting :
> >linux (kernel /var/run/xend/boot/boot_kernel._IqLoQ)(ramdisk
> >/var/run/xend/boot/boot_ramdisk.XUIE7W)(args
> >"root=UUID=0fdd2127-ff17-4bd4-b1b8-08fd8b27ec9a ro  quiet
> >root=/dev/xvda1 ro")
> to the terminal - but not starting the guest.
>
> Trying to start the guest with "xm create -c ipv6" gives :
>
> >Started domain ipv6 (id=3)
> >                           [    0.204334] PCI: Fatal: No config space
> >access function found
> >[    0.251557] i8042.c: No controller found.
> >Loading, please wait...
> >mount: No such device
> >W: devtmpfs not available, falling back to tmpfs for /dev
> >Gave up waiting for root device.  Common problems:
> >  - Boot args (cat /proc/cmdline)
> >    - Check rootdelay= (did the system wait long enough?)
> >    - Check root= (did the system wait for the right device?)
> >  - Missing modules (cat /proc/modules; ls /dev)
> >ALERT!  /dev/xvda1 does not exist.  Dropping to a shell!
> >(initramfs)
>
> So it seems to have started the guest, but not with the right setup.
>
> If I change the boot settings back to using kernel= and ramdisk=
> gives me a working guest again.
>
> Any hints ?
>
> Bear in mind that I'm trying to keep it entirely with packaged
> software, and 4.1 is only in the Debian unstable repository at the
> moment.
>



_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users

_______________________________________________
Xen-users mailing list
Xen-users@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users