kernel-xen.sh: This script builds the Linux Kernel for the Xen Hypervisor.
To run this scipt you will need the rebased OpenSUSE Xen kernel patches:
Since the patches are for 220.127.116.11 kernel, you can get it from here:
The configuration files included here are based on Slackware 18.104.22.168 configs.
For 32bit systems, SMP based config was used. You may run "make menuconfig"
before compiling a Xen kernel by passing the "MENUCONFIG=yes" to the scipt.
Another variable worth mentioning here is "BOOTLOADER=", wich can be used to
select how kernel is packed. Valid options are "lilo" and "grub".
By default, a "huge" kernel config is chosen, but you may opt for the generic
kernel by passing the "KERNEL=generic" variable to the script. In this case,
you will need to make an ad-hoc initrd after installing this package.
# depmod 22.214.171.124-xen
# mkinitrd -c -k 126.96.36.199-xen -f ext4 -r /dev/sda1 -m ext4 -o /boot/initrd-xen.gz
For details on initrd, read /boot/README.initrd, for hints run:
/usr/share/mkinitrd/mkinitrd_command_generator.sh script and read the Xen
User Manual and the README file that comes with the Xen package.
Originaly, booting a Xen kernel with LILO bootloader is not supported, so GRUB
has to be used. Since some of us still preffer LILO over GRUB, there is a way
to accomplish this with mbootpack. Basicly mbootpack takes Linux kernel, initrd
and Xen VMM, and packages them up as a single file that looks like a bzImage
Linux kernel. For example this is how mbootpack works:
# cd /boot
# gzip -d -c /boot/xen-4.1.1.gz > /boot/xen-4.1.1
# gzip -d -c /boot/initrd-xen.gz > /boot/initrd-xen
# mbootpack -o /boot/vmlinuz-188.8.131.52-xen -m /usr/src/linux-184.108.40.206-xen/vmlinux \
-m /boot/initrd-xen /boot/xen-4.1.1
After a new kernel image is created, add something like the folowing to lilo.conf:
image = /boot/vmlinuz-xen
root = /dev/sda1
label = XenLinux
append="dom0_mem=256M -- nomodeset"
Note: everything before "--" is passed to Xen, and everything after "--" is
passed to the Linux kernel.
If for some reason LILO is not good enough, you can always use GRUB.
GRUB may be installed from Slackware's extra repository. The GRUB package
is not available from the Slackware x86_64 distribution, but the source
and a SlackBuild may be found in its extra/source repository.
grubconfig that comes with Slackware's GRUB package may give a starting point
to configure GRUB. Moreover, the Xen User Manual and its README file installed
with the Xen package include details on which parameters to include in the GRUB
configuration file. For example, include these lines in /boot/grub/menu.lst:
title Slackware XenLinux 13.37
kernel /boot/xen.gz dom0_mem=262144 console=vga
module /boot/vmlinuz-xen root=/dev/sda1 ro console=tty0 nomodeset
Additional notes about bootloaders:
A dom0_mem parameter is critical for a 32bit Slackware install.
You only need the initrd if you install a generic kernel.
Aditional notes on framebuffer problems:
If your dom0 kernel crashes or freezes at boot, either with an automatic
reboot or with the blank screen, here are some things to try:
- Specify an out of range number to "fbcon" to disable FB altogether,
for an example append fbcon=map:9 to the Linux kernel.
(To see a list of available devices in your system: cat /proc/fb)
- Blacklist FB module from loading, this one requires a bit of
digging arround in dmesg/lsmod to find out wich module is loading.
- Disable FB device in question or simply set CONFIG_FB=n in kernel config.
- Replace the VGA card? :^)