Normally, Xen will not work with LILO, as LILO can't use multiple initrd images, which Xen needs.
A workaround is to use mbootpack utility: "It takes a multiboot kernel and modules (e.g. a Xen VMM, linux kernel and initrd), and packages them up as a single file that looks like a bzImage linux kernel".
Below - instruction for Xen 3.1, compiled from sources; if you have other kernel version, just change the text appropriately before pasting it.
- First, uncompress your /boot/xen-3.1.gz image file:
- You also have to uncompress your Xen dom0 kernel:
- If you don't have the initrd file yet, create it now:
- After downloading and compiling
mbootpack
, make a single kernel image out of your existing kernel/initrd/Xen:
Where -o
parameter specifies your new, "integrated" dom0 kernel, -m
specify your dom0 kernel and initrd, and xen-3.3.0
is an uncompressed Xen image (which we did a while before).
- The last step is to add an entry in /etc/lilo.conf:
Followed by the lilo
command to update the changes:
One could ask why bother with LILO, if everything above can be done with Grub? Setting up Grub can be really painful, if one has the root filesystem (/), including /boot, on top of LVM2, on top of RAID-1. LVM support is planned for the upcoming Grub2, still alpha.
If it's the case for you, don't forget to edit /etc/lilo.conf and run lilo
twice, to have it installed an all your RAID-1 disks - i.e., change all boot=/dev/sda
to boot=/dev/sdb
(why not add raid-extra-boot=mbr-only
, which solved this problem for me).
This will make sure that your system will boot even if any of the disks failed - well, at least one has to still work, right? :)
Also, using this method is needed if you want to have a diskless Xen server - see https://lxadm.com/Diskless_/_remote_boot_with_Open-iSCSI#Configuring_tftp_server.
Note: in my case (mdadm RAID1) i had to use the following settings: append = "dom0_mem=512M noreboot -- netloop.nloopback=16 root=/dev/md1 ro"