Panix V-Colo VPS: Booting a custom linux kernel using PV-Grub


PV-GRUB
-------

    PV-Grub is grub-0.97 compiled to run directly under Xen. The main
    documentation for grub 0.97 is here:

	http://www.gnu.org/software/grub/manual/html_node/index.html

    Since you neither need to build nor install grub, you mainly just
    need to know how to create a grub configuration file:

	http://www.gnu.org/software/grub/manual/html_node/Configuration.html

    The usual place for the grub-0.97 config file is
    /boot/grub/menu.lst.

    A simple configuration to boot Linux might look like this (assumes
    the root partition is on the first partition of disk 0):

	default=0
	timeout=30

	title Linux 2.6.31
	  root (hd0,0)
	  kernel (hd0,0)/vmlinuz root=/dev/xvda1

    The first number after "(hd" above corresponds to the V-Colo disk
    number. The number after the "," is the partition number on the
    disk except that grub starts numbering them at 0 where Linux
    starts with 1.


LINUX KERNEL
------------

    To boot a Linux kernel using pv-grub, you need a mainline linux
    kernel with "paravirt-ops" support (from www.kernel.org).

    The kernel must be configured with the options below. The name of
    the option is in all uppercase, followed by its location within
    "make menuconfig".

        CONFIG_PARAVIRT

	    "Processor type and features" -> "Paravirtualized guest
	    support"

        CONFIG_XEN

	    "Processor type and features" -> "Paravirtualized guest
	    support" -> "Xen guest support"

        CONFIG_XEN_BLKDEV_FRONTEND

	    "Device Drivers" -> "Block devices" -> "Xen virtual block
	    device support"

        CONFIG_XEN_NETDEV_FRONTEND

	    "Device Drivers" -> "Network device support" -> "Xen
	    network device frontend driver"

        CONFIG_HVC_XEN

	    "Device Drivers" -> "Character devices" -> "Xen Hypervisor
	    Console support"

    After the kernel is configured and built with "make", you need
    strip and compress the kernel (do not try to use the "bzimage"):

        strip vmlinux
	gzip -9 vmlinux

    The kernel can then be copied to the /boot directory:

        cp -p vmlinux.gz /boot/vmlinuz


V-COLO PROFILE EDITOR
---------------------

    After you have your kernel and grub configuration in the right
    places, you can make a new profile.

    Using the username and password you selected when you signed up,
    please log into the management interface at
    https://config.panix.com/vc and click on the "V-Colo Management"
    tab. If you have more than one V-Colo, you'll need to select a
    V-Colo at the top of the page.

    Under the "Boot Options" tab, click on "Boot Profiles".

    Click on "Create a new profile".

    Enter a name for this profile in the "Profile description" field.

    In the kernel box, select either:

        PV-Grub for 32 bit kernels
        PV-Grub for 64 bit kernels

    This must match the type of kernel you will be booting.

    Press "Set kernel to proceed"

    Method 1:

        Set "Location of PV-Grub configuration" to the disk,partition
        where your grub configuration is located. In this example, it
        is:

            (hd0,0)

        In the next box, enter the path name of the grub configuration
        file. In this example:

            /boot/grub/menu.lst

        Press "Create profile"

    Method 2:

        Set "Location of PV-Grub configuration" to "Boot profile"

        In the next box, enter the entire grub configuration:

            default=0
            timeout=30

            title Linux 2.6.31
              root (hd0,0)
              kernel (hd0,0)/vmlinuz root=/dev/xvda1

	Press "Create profile"

    Back at the boot profiles page, you can now select the boot
    profile you just created and press "Set as boot profile".

    Log into the console server so you can see the progress of grub
    and your kernel. Instructions are on the management interface
    under Tools->Console.

    Reboot your V-Colo. You will be able to access the console shortly
    after the reboot.

    If the boot fails and you need additional help, please send us any
    error messages from the console plus the last screenful of text.



Last Modified:Wednesday, 30-Jan-2013 12:14:14 EST
© Copyright 2010, Public Access Networks Corporation