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:

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