Description of problem: Grub2 cfgfile was added to Xen pygrub in here: https://bugzilla.redhat.com/show_bug.cgi?id=577511 . It works OK for Ubuntu 10.04 LTS but fails for new Debian 6.0 Squeeze. Debian uses a newer version of grub2 with a slightly different syntax. Version-Release number of selected component (if applicable): xen-3.0.3-120.el5 How reproducible: Always. Steps to Reproduce: 1. Install RHEL5.6 Xen dom0 2. Install Debian 6.0 Squeeze PV domU using the debian installer. 3. After installation try to boot it using pygrub. Actual results: # xm create -f debian1.cfg -c Using config file "./debian1.cfg". 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/bin/pygrub", line 691, in ? chosencfg = run_grub(file, entry, fs) File "/usr/bin/pygrub", line 545, in run_grub g = Grub(file, fs) File "/usr/bin/pygrub", line 203, in __init__ self.read_config(file, fs) File "/usr/bin/pygrub", line 407, in read_config self.cf.parse(buf) File "/usr/lib64/python2.4/site-packages/grub/GrubConf.py", line 401, in parse self.add_image(Grub2Image(title, img)) File "/usr/lib64/python2.4/site-packages/grub/GrubConf.py", line 318, in __init__ _GrubImage.__init__(self, title, lines) File "/usr/lib64/python2.4/site-packages/grub/GrubConf.py", line 84, in __init__ self.reset(lines) File "/usr/lib64/python2.4/site-packages/grub/GrubConf.py", line 102, in reset self._parse(lines) File "/usr/lib64/python2.4/site-packages/grub/GrubConf.py", line 96, in _parse map(self.set_from_line, lines) File "/usr/lib64/python2.4/site-packages/grub/GrubConf.py", line 328, in set_from_line setattr(self, self.commands[com], arg.strip()) File "/usr/lib64/python2.4/site-packages/grub/GrubConf.py", line 105, in set_root self._root = GrubDiskPart(val) File "/usr/lib64/python2.4/site-packages/grub/GrubConf.py", line 54, in __init__ (self.disk, self.part) = str.split(",", 2) File "/usr/lib64/python2.4/site-packages/grub/GrubConf.py", line 79, in set_part self._part = int(val) ValueError: invalid literal for int(): msdos1 No handlers could be found for logger "xend" Error: Boot loader didn't return any data! Expected results: pygrub works and domU starts fine. Additional info: grub2 grub.cfg menuentry from Debian 6.0 (Squeeze): menuentry 'Debian GNU/Linux, with Linux 2.6.32-5-686-bigmem' --class debian --class gnu-linux --class gnu --class os { insmod part_msdos insmod ext2 set root='(hd0,msdos1)' search --no-floppy --fs-uuid --set 5e7e881f-9f52-40e4-a74e-65cc87cf1cbc echo 'Loading Linux 2.6.32-5-686-bigmem ...' linux /boot/vmlinuz-2.6.32-5-686-bigmem root=UUID=5e7e881f-9f52-40e4-a74e-65cc87cf1cbc ro console=hvc0 quiet echo 'Loading initial ramdisk ...' initrd /boot/initrd.img-2.6.32-5-686-bigmem } grub2 grub.cfg menuentry from Ubuntu 10.04 LTS (this works OK): menuentry 'Ubuntu, with Linux 2.6.32-30-generic' --class ubuntu --class gnu-linux --class gnu --class os { recordfail insmod ext2 set root='(hd0,1)' search --no-floppy --fs-uuid --set 75ec40b9-050f-4fbd-91ce-9b14cd28a18a linux /boot/vmlinuz-2.6.32-30-generic root=UUID=75ec40b9-050f-4fbd-91ce-9b14cd28a18a ro console=hvc0 splash quiet initrd /boot/initrd.img-2.6.32-30-generic } Upstream Xen has patches to fix pygrub for Debian 6.0 Squeeze.
We already had a bug about this, bug 675733. I've been testing it and it's working fine so this one is already fixed. Michal *** This bug has been marked as a duplicate of bug 675733 ***
Debian 6.0 guest: > set root='(hd0,msdos1)' Ubuntu 10.04 LTS: > set root='(hd0,1)' This is the issue. The patch for bug 675733 fixes this and it's already verified. Pasi, please use package xen-3.0.3-124.el5 or higher that's having this fix applied already :) Michal
Oh, nice, I didn't spot that. Thanks a lot!
(In reply to comment #4) > Oh, nice, I didn't spot that. Thanks a lot! No problem with that. We just let you know it' fixed already :) Michal