General Info About Using Kernels

All files on this site are provided without guarantee or warranty. Use at your own risk.

IMPORTANT UPDATE

This document describes using the 2.6.18 domU kernel. For more recent kernels such as 2.6.35 the documentation at the link here is more up-to-date: HOWTO Deploy A Paravirtualized Xen Kernel

Install to dom0

  • Download the kernel file from Stacklet (eg. linux-2.6-xenU.x86.tar.bz2 )
  • Extract it to /: tar -xjf linux-2.6-xenU.x86.tar.bz2 -C /
  • depmod 2.6.18.8-xenU

At this point you will have a file (exact name may be different) /boot/vmlinuz-2.6.18.8-xenU. This file can be used to boot any of the images without an initrd, you simply need to reference it in the config file that launches the image:
kernel = "/boot/vmlinuz-2.6.18.8-xenU"

Install to an image

If you do not want the kernel installed to dom0, this section describes how to install it into the image itself. Keep in mind that with this option you are editing files such as grub.conf and securettty in the image, not dom0!

  • Download the kernel file from Stacklet (eg. linux-2.6-xenU.x86.tar.bz2 )
  • Mount the image as a loop device to /mnt/loop
  • Extract it to /mnt/loop: tar -xjf linux-2.6-xenU.x86.tar.bz2 -C /mnt/loop
  • depmod -b /mnt/loop/ 2.6.18.8-xenU

The image can now be booted using pygrub, but first you will need to edit /boot/grub/grub.conf inside the image. Here is a sample grub.conf:

default=0
timeout=10
title vmlinuz-2.6.18.8-xenU
root (hd0,0)
kernel /boot/vmlinuz-2.6.18.8-xenU console=xvc0 root=/dev/sda1 ro

Depending on the distribution, you may need to add xvc0 to /etc/securetty and /etc/inittab, although these entries may already exist

Update! With the 2.6.31 kernel the standard is now /dev/xvda1 for the root device and hvc0 for the console. Also, some distributions (eg Ubuntu) do not use /etc/inittab. Please see your distribution's documentation on how to define consoles if /etc/inittab does not exist.


© 2010-2013 Stacklet LLC - Privacy