summaryrefslogtreecommitdiff
path: root/system/xen/dom0/README.dom0
blob: c2f8c72270612500ae3243de4b33dedf1bc8cf8b (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
kernel-xen.sh: Xen dom0 kernel using rebased OpenSUSE xen-patches.

This script patches and builds the Linux Kernel for the Xen Hypervisor.

To run this scipt you will need the Xen kernel patches in this directory.
The patches may be downloaded from:
http://gentoo-xen-kernel.googlecode.com/files/xen-patches-2.6.34-4.tar.bz2
(md5sum: 25ba07cf0702130af26c045fd6227f2f)

Note on kernel: You will need to get kernel version 2.6.34.4 because patches
based on Slackware stock kernel tree (2.6.33.4) do not work as expected.
Anyway, you can get it from:
http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.33.4.tar.bz2
(md5sum: f75d21e5c60f18adf0e99d61c243f964)

The included configuration files are based on Slackware's kernel. For
Slackware32, the SMP kernels were used as the non-smp kernels would not compile
with the Xen patches. For the Xen-specific parameters, the default options were
used as much as possible. You may run "make menuconfig" before compiling the
Xen kernel by passing the "MENUCONFIG=yes" to the scipt.

Another variable worth mentioning here is "BOOTLOADER=", you can use it to
select how kernel is packed. Valid options are "lilo" and "grub".

By default, the huge kernel 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.
For example:

depmod 2.6.34.4-xen
mkinitrd -c -k 2.6.34.4-xen -f ext4 -r /dev/sda1 -m ext4 -o /boot/initrd-xen.gz

For details on initrd, read /boot/README.initrd, run
/usr/share/mkinitrd/mkinitrd_command_generator.sh for hints and read the Xen
User Manual and the README file that comes with the Xen package.

Since booting Xen kernel with LILO is not supported by default we have to
either use GRUB, or mbootpack to create a LILO compatible kernel.

This is an example how to do it with LILO, mbootpack and initrd:

cd /boot
gzip -d -c /boot/xen-4.0.1.gz > /boot/xen-4.0.1
gzip -d -c /boot/initrd-xen.gz > /boot/initrd-xen
mbootpack -o /boot/vmlinuz-2.6.34.4-xen -m /usr/src/linux-2.6.34.4-xen/vmlinux \
  -m /boot/initrd-xen /boot/xen-4.0.1

After 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"
  read-only

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.1
         root (hd0,0)
         kernel /boot/xen.gz dom0_mem=262144 console=vga
         module /boot/vmlinuz-xen root=/dev/sda1 ro console=tty0 nomodeset
         module /boot/initrd-xen.gz

Notes on bootloader:
  A dom0_mem parameter is critical for Slackware32.
  You only need the initrd module if you install the generic kernel.

Aditional notes on framebuffer:
  If your dom0 kernel gets stuck on boot with a blinking cursor on the screen,
  and you have an old VGA card, don't panic, there is a way arround it!
  Easiest method is to boot from non-xen kernel, and blacklist a framebuffer
  module from ever loading. Another option would be to replace VGA card with
  a newer one, or remove module in the next kernel build.