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/ipv6rootAnd 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. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Alexandre Chapellon
2011-May-28 11:39 UTC
Re: [Xen-users] 4.0.1, Debian Squeeze, and p[yv]grub
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@lists.xensource.com http://lists.xensource.com/xen-users
Alexandre Chapellon wrote:>What filesystem are you using? >I remember have read pygrub only support ext filesystems.EXT3 -- Simon Hobson _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
> What filesystem are you using? > I remember have read pygrub only support ext filesystems. > > 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_outputThe filesystem seems to be supported, but /boot/grub/grub.cfg cannot be parsed.> > 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.The easiest way would be to install grub-legacy (which happens to be grub1 -- ie. the one with /boot/grub/menu.lst) and remove /boot/grub/grub.cfg. The error in installing grub in the guest system can safely be ignored as pygrub only relys on a valid grub.cfg or menu.lst. A valid boot sector is not required.> > 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 ?Assuming you''ve installed a working domU kernel in domU -- just try to switch back to grub1. Actually just manually creating a simple "menu.lst" file should suffice: title Debian GNU/Linux, kernel 2.6.32-5-amd64 root (hd0,1) kernel /boot/vmlinuz-2.6.32-5-amd64 root=/dev/xvda1 ro quiet initrd /boot/initrd.img-2.6.32-5-amd64 (all paths should be absolute within your virtual machine. -- Adi _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
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@horoa.net> 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@lists.xensource.com > http://lists.xensource.com/xen-users >_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi Simon, Debian with Xen 4.0.1 and pygrub works just fine if you take care of the following: ln -s /usr/lib/xen-4.0/bin/pygrub /usr/bin/pygrub ln -s /usr/lib/xen-4.0 /usr/lib/xen make sure your domU root fs is the first disc in your list of virtual discs make sure your domU root fs is ext3 or ext4 (I can confirm that ext3 works - haven''t tried ext4) Good luck, Jan On 28/05/11 03:25, Simon Hobson wrote:> 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@lists.xensource.com http://lists.xensource.com/xen-users
Adi Kriegisch wrote:>Assuming you''ve installed a working domU kernel in domU -- just try to >switch back to grub1. Actually just manually creating a simple "menu.lst" >file should suffice: >title Debian GNU/Linux, kernel 2.6.32-5-amd64 >root (hd0,1) >kernel /boot/vmlinuz-2.6.32-5-amd64 root=/dev/xvda1 ro quiet >initrd /boot/initrd.img-2.6.32-5-amd64 >(all paths should be absolute within your virtual machine.OK, made a menu.lst with the kernel and initrd to match the system, it still doesn''t boot. I''ve also updated the guest to 2.6.32-5-xen-686 and it still doesn''t boot.. After going a bit square eyed looking in the logs, I noticed something in xend.log that seems relevant. Booting with kernel= and initrd= lines, I see this in the log : DEBUG (image:723) image = /etc/xen/ipv6-kernel/vmlinuz-2.6.32-5-xen-686 DEBUG (image:724) store_evtchn = 1 DEBUG (image:725) console_evtchn = 2 DEBUG (image:726) cmdline = root=/dev/xvda1 ro DEBUG (image:727) ramdisk = /etc/xen/ipv6-kernel/initrd.img-2.6.32-5-xen-686 But booting with pygrub I see : DEBUG (image:723) image = /var/run/xend/boot/boot_kernel.CxIYSU DEBUG (image:724) store_evtchn = 1 DEBUG (image:725) console_evtchn = 2 DEBUG (image:726) cmdline DEBUG (image:727) ramdisk = /var/run/xend/boot/boot_ramdisk.0LOwFy So it looks a bit like pygrub isn''t correctly passing the root= parameter through to the kernel. That might just explain why the guest can''t mount it''s root filesystem ! But, I went back to menu.lst and added root=... to the kernel line which I took out for a reason I''ll explain in a moment, and hey presto - I now have a booted guest with pygrub :D Now why did I take out the root=... bit ? Well earlier I wasn''t getting a successful boot (for a different but unknown reason !). I noticed the command line was being shown as : "root=/dev/xvda1 ro root=/dev/xvda1 ro" or more probably (there''s been a lot of lines up the screen since then !) : "root=/dev/xvda1 ro quiet root=/dev/xvda1 ro" AFAICT, pygrub seems to be concatenating the root= options from both the guest config file and from the menu.lst file. A bit more experimentation indicates that : If both are present, they are concatenated (menu.lst then guest config). If only the menu.lst option is supplied, then it''s used. If there is no root=... in menu.lst, then the root=... statement from the guest config file seems to be ignored. So I''ve commented out the root= line from the guest config file. PS - while searching, I came across this nugget. I get the impression this guy had a slightly frustrating time ! http://wiki.stocksy.co.uk/wiki/Xen_on_Debian_Squeeze_dom0_Using_pygrub -- Simon Hobson _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
And I''ve also figured out that pygrub doesn''t like there being multiple boot options in menu.lst. One kernel option and it works, more than one and it doesn''t (it gives "Error: Boot loader didn''t return any data!"). -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
On 01/06/11 03:45, Simon Hobson wrote:> And I''ve also figured out that pygrub doesn''t like there being > multiple boot options in menu.lst. One kernel option and it works, > more than one and it doesn''t (it gives "Error: Boot loader didn''t > return any data!"). >My systems disagree... happily having multiple boot options in menu.lst. Jan _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi!> >Assuming you''ve installed a working domU kernel in domU -- just try to > >switch back to grub1. Actually just manually creating a simple "menu.lst" > >file should suffice: > >title Debian GNU/Linux, kernel 2.6.32-5-amd64 > >root (hd0,1) > >kernel /boot/vmlinuz-2.6.32-5-amd64 root=/dev/xvda1 ro quiet > >initrd /boot/initrd.img-2.6.32-5-amd64 > >(all paths should be absolute within your virtual machine.[SNIP]> After going a bit square eyed looking in the logs, I noticed > something in xend.log that seems relevant. > > Booting with kernel= and initrd= lines, I see this in the log : > DEBUG (image:723) image = > /etc/xen/ipv6-kernel/vmlinuz-2.6.32-5-xen-686[...]> But booting with pygrub I see : > > DEBUG (image:723) image = /var/run/xend/boot/boot_kernel.CxIYSU[...]> So it looks a bit like pygrub isn''t correctly passing the root= > parameter through to the kernel. That might just explain why the > guest can''t mount it''s root filesystem !Nope, it doesn''t. And the reason for this is quite simple, it is how pygrub works: GRUB is a real bootloader that gets its first bits on the harddisk copied into the CPU and executed. From that moment on it is responsible for loading other relevant parts (including operating system) and run them. PYGRUB is a tool that is able to read filesystems (EXT*, iso9660, fat, reiserfs, ufs and zfs. For XFS there exists a patch somewhere that works perfectly fine for me and probably many others) and parse a menu.lst (and a grub.cfg). And here goes the big difference: pygrub copies kernel and initramfs to the Dom0 that needs to execute it -- just like with specifying kernel and initramfs in DomU config.> But, I went back to menu.lst and added root=... to the kernel line > which I took out for a reason I''ll explain in a moment, and hey > presto - I now have a booted guest with pygrub :Dgreat. so your issues are solved.> Now why did I take out the root=... bit ?[...]> AFAICT, pygrub seems to be concatenating the root= options from both > the guest config file and from the menu.lst file.If you aim at using pygrub, just don''t specify it in DomU config... ;-) IMHO the option in DomU config is just ignored when using pygrub -- at least that is what I experienced up to now. -- Adi _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Hi!> 1. The parsing logic is flaky in pygrub at best. Its a game of catch-up to > ensure we are parsing grub.cfg properly.right, but isn''t the issue that grub.cfg''s syntax has been a moving target for some time and the Squeeze version of pygrub is rather old?> 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.Didn''t upstream Xen rename block devices to xvd?[0-9]? -- Adi _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Christian Motschke
2011-Jun-01 09:28 UTC
Re: [Xen-users] 4.0.1, Debian Squeeze, and p[yv]grub
I use Debian 6 too, and my experience is, that pygrub works with grub2 in the DomU better than with grub. Just install grub-pc and grub2 in the DomU.There is a bug in /etc/grub/00_header. I don''t know, if it is fixed in the mean time. To be sure, call update-grub this way: LANG=C update-grub. Christian Am 01.06.2011 um 11:12 schrieb Adi Kriegisch:> Hi! > >> 1. The parsing logic is flaky in pygrub at best. Its a game of catch-up to >> ensure we are parsing grub.cfg properly. > right, but isn''t the issue that grub.cfg''s syntax has been a moving target > for some time and the Squeeze version of pygrub is rather old? > >> 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. > Didn''t upstream Xen rename block devices to xvd?[0-9]? > > -- Adi > > _______________________________________________ > Xen-users mailing list > Xen-users@lists.xensource.com > http://lists.xensource.com/xen-users_______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
At 20:28 +1200 1/6/11, Jan Bakuwel wrote:>On 01/06/11 03:45, Simon Hobson wrote: >> And I''ve also figured out that pygrub doesn''t like there being >> multiple boot options in menu.lst. One kernel option and it works, >> more than one and it doesn''t (it gives "Error: Boot loader didn''t >> return any data!"). >> > >My systems disagree... happily having multiple boot options in menu.lst.Well now I''m completely confused ! Yesterday I could only get this guest to boot if I only had one boot option in menu.lst. Tried it again this morning, expecting to reply "well it''s definitely not working for me" and ... it''s only gone and worked properly :-/ As far as I can remember, I haven''t changed anything since I last tried and found it didn''t work. Very odd, but it''s working now - I can even reboot the host and have the guest come up properly :-) Can start migrating my production stuff now. NB - when installing grub-legacy, the version (1.98+20100804-14) in Debian Stable (Squeeze) has the bug that prevents it installing in the guest. Installing grub-common from Testing gets a newer version (1.99~rc1-13) where this is fixed. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users
Adi Kriegisch wrote:>Hi! > >> >Assuming you''ve installed a working domU kernel in domU -- just try to >> >switch back to grub1. Actually just manually creating a simple "menu.lst" >> >file should suffice: >> >title Debian GNU/Linux, kernel 2.6.32-5-amd64 >> >root (hd0,1) >> >kernel /boot/vmlinuz-2.6.32-5-amd64 root=/dev/xvda1 ro quiet >> >initrd /boot/initrd.img-2.6.32-5-amd64 >> >(all paths should be absolute within your virtual machine. >[SNIP] >> After going a bit square eyed looking in the logs, I noticed >> something in xend.log that seems relevant. >> >> Booting with kernel= and initrd= lines, I see this in the log : >> DEBUG (image:723) image >> /etc/xen/ipv6-kernel/vmlinuz-2.6.32-5-xen-686 >[...] >> But booting with pygrub I see : >> > > DEBUG (image:723) image = /var/run/xend/boot/boot_kernel.CxIYSU >[...] >> So it looks a bit like pygrub isn''t correctly passing the root>> parameter through to the kernel. That might just explain why the > > guest can''t mount it''s root filesystem !>Nope, it doesn''t. And the reason for this is quite simple, it is how pygrub >works: >GRUB is a real bootloader that gets its first bits on the harddisk copied >into the CPU and executed. From that moment on it is responsible for >loading other relevant parts (including operating system) and run them. >PYGRUB is a tool that is able to read filesystems (EXT*, iso9660, fat, >reiserfs, ufs and zfs. For XFS there exists a patch somewhere that works >perfectly fine for me and probably many others) and parse a menu.lst (and >a grub.cfg). And here goes the big difference: pygrub copies kernel and >initramfs to the Dom0 that needs to execute it -- just like with specifying >kernel and initramfs in DomU config.I think a slight breakdown in communications there. Yes, as you describe, pygrub is copying the images to Dom0 - that''s where "image = /var/run/xend/boot/boot_kernel.CxIYSU" is coming from. If you look a couple of lines up, you''ll see "cmdline = root=/dev/xvda1 ro" or "cmdline =" depending on whether there are options appended to the kernel line in menu.lst.> > But, I went back to menu.lst and added root=... to the kernel line >> which I took out for a reason I''ll explain in a moment, and hey >> presto - I now have a booted guest with pygrub :D >great. so your issues are solved. > >> Now why did I take out the root=... bit ? >[...] >> AFAICT, pygrub seems to be concatenating the root= options from both >> the guest config file and from the menu.lst file. >If you aim at using pygrub, just don''t specify it in DomU config... ;-) >IMHO the option in DomU config is just ignored when using pygrub -- at >least that is what I experienced up to now.My testing indicated that if both are present, they are both added. Yes, I''ve just commented out the boot option from the guest config to deal with this. Of course, while experimenting, it''s one more change to make when switching between pygrub and host-based kernels. -- Simon Hobson Visit http://www.magpiesnestpublishing.co.uk/ for books by acclaimed author Gladys Hobson. Novels - poetry - short stories - ideal as Christmas stocking fillers. Some available as e-books. _______________________________________________ Xen-users mailing list Xen-users@lists.xensource.com http://lists.xensource.com/xen-users