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

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@xxxxxxxxxxxxxxxxxxx
http://lists.xensource.com/xen-users