Why does xen PV bootloader choose pygrub?

Source: Internet
Author: User
Tags cve
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.

    • Question is: does it copy the req 'd kernel and initd temporarily out to dom0 for it to access it there or does dom0 access the kernel and initd in their filesystem? Anyone?

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?
    1. Install grub
    2. Install a Linux-image-xen of your choice.
    3. Create the/boot/GRUB directory if it is not present.
    4. Let it create its default menu. lst (Update-grub in Debian)
    5. 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.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.