Why does xen PV bootloader select bootloader = '/usr/bin/pygrub' Why?
Pygrub enables you to start Linux Domus with the kernels that lie in the filesystem of the domu instead of with a kernel that lies in the filesystem of the dom0.this enables easier kernel update from domu or migration of hvm 'ed linuxes.
Concept
It is used as a Bootloader and provided with xen. pygrub behaves like grub and reads the standard GRUB menu. lst to provide the xen create process with the required parameters and SXP stanzas.
Therefore usage is quite easy.
Security Question: some time ago, someone found a security problem with pygrub that allowed it to break out of the domu, I did not find any fix notices-it that problem still relevant?
Resolved: this issue has been resolved. Check outhttp: // bugzilla.xensource.com/bugzilla/show_bug.cgi? Id = 1068 & http://cve.mitre.org/cgi-bin/cvename.cgi? Name = CVE-2007-4993 for details
How?
- Install grub
- Install a Linux-image-xen of your choice.
- Create the/boot/GRUB directory if it is not present.
- Let it create its default menu. lst (Update-grub in Debian)
- Change your domu. cfg in the dom0 like this:
-Remove kernel and initd stanza-add bootloader stanza, e.g.
Bootloader = '/usr/bin/pygrub'
You need to see where in the filesystem pygrub lies, Debian does not use this path but/usr/lib/xen-$ version/bin/pygrub or something like this.
Important tip/Caveat
On your disk line, e.g.
Disk = ['file:/vserver/mail/guest_base2g.img, hda1, W', 'file:/vserver/mail/guest_swap256m.img, hda2, W', 'phy: Data/mail, hda3, W']
Make sure that the partition/LVM/container that contains the kernel and initrd comes first. xend passes the * First * entry to pygrub. (at least for version 3.2.1) if the first disk entry does not contain a kernel you will most likely get
Set Menu. lst
Error: Boot Loader didn't return any data
If you get this error have a look at/var/log/xen/xend. log. you can read here which parameters were given to pygrub, try them by hand see if pygrub outputs the right stanzas for domu startup. (they look a little like grub entries lispified, SXP-format ).
Thanks to (the following is taken from http://lists.xensource.com/archives/html/xen-users/2007-09/msg00524.html and own experience) for first pygrub reference.