Derwynd's Weblog

Derwynd's Weblog

Fedora/Redhat Kernel RPM with Xen & reiserfs

Download the src rpm

(eg. kernel-2.6.18-92.el5.src.rpm)

$ rpm -ivh kernel-2.6.18-92.el5.src.rpm

$ cd /usr/src/redhat/SPECS/

$ rpmbuild -bb kernel-2.6.spec

This will build
kernel-2.6.18-92.el5.x86_64.rpm                   kernel-devel-2.6.18-92.el5.x86_64.rpm
kernel-debug-2.6.18-92.el5.x86_64.rpm             kernel-headers-2.6.18-92.el5.x86_64.rpm
kernel-debug-debuginfo-2.6.18-92.el5.x86_64.rpm   kernel-xen-2.6.18-92.el5.x86_64.rpm
kernel-debug-devel-2.6.18-92.el5.x86_64.rpm       kernel-xen-debuginfo-2.6.18-92.el5.x86_64.rpm
kernel-debuginfo-2.6.18-92.el5.x86_64.rpm         kernel-xen-devel-2.6.18-92.el5.x86_64.rpm
kernel-debuginfo-common-2.6.18-92.el5.x86_64.rpm

Install the following rpm
$ kernel-xen-2.6.18-53.el5 xen-libs

Check the grub.conf file the xen lines will be added

#boot=/dev/sda
default=2
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-53.el5xen)
root (hd0,0)
kernel /xen.gz-2.6.18-53.el5
module /vmlinuz-2.6.18-53.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
module /initrd-2.6.18-53.el5xen.img
title Red Hat Enterprise Linux Server (2.6.18-53.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-53.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-53.el5.img

If you list the files in /boot/ are added
vmlinuz-2.6.18-53.el5
initrd-2.6.18-53.el5.img
xen.gz-2.6.18-53.el5
xen-syms-2.6.18-53.el5

Now to build the kernel from the BUILD dir

$ cd /usr/src/redhat/BUILD/kernel-2.6.18/linux-2.6.18.x86_64/
$ make menuconfig

——————————————————————-

Processor type and features  —>
[*] Enable Xen compatible kernel

File systems  —>
<M> Reiserfs support
[ ]   Enable reiserfs debug mode
[ ]   Stats in /proc/fs/reiserfs
[*]   ReiserFS extended attributes
[ ]     ReiserFS POSIX Access Control Lists
[ ]     ReiserFS Security Labels

XEN  —>
[*] Privileged Guest (domain 0)
<*> Backend driver support
<M>   Block-device backend driver
<M>   Block-device tap backend driver
<M>   Network-device backend driver
[ ]     Pipelined transmitter (DANGEROUS)
<M>     Network-device loopback driver
<M>   PCI-device backend driver
PCI Backend Mode (Virtual PCI)  —>
[ ]     PCI Backend Debugging
< >   TPM-device backend driver
<M> Block-device frontend driver
<M> Network-device frontend driver
<*> Framebuffer-device frontend driver
<*>   Keyboard-device frontend driver
[*] Scrub memory before freeing it to Xen
[ ] Disable serial port drivers
<*> Export Xen attributes in sysfs
Xen version compatibility (3.0.2 and later)  —>

——————————————————————-
Build the kernel (if you have not changed the Makefile the subversion is EXTRAVERSION = -92.el5debug)

This will create vmlinuz-2.6.18-92.el5debug

$ mkinitrd /boot/initrd-2.6.18-92.el5debug.img 2.6.18-92.el5debug
(For the initrd img)

Add lines to grub.conf
——————————————————————
default=2
timeout=5
splashimage=(hd0,0)/grub/splash.xpm.gz
hiddenmenu
title Red Hat Enterprise Linux Server (2.6.18-53.el5xen)
root (hd0,0)
kernel /xen.gz-2.6.18-53.el5
module /vmlinuz-2.6.18-53.el5xen ro root=/dev/VolGroup00/LogVol00 rhgb quiet
module /initrd-2.6.18-53.el5xen.img
title Red Hat Enterprise Linux Server (2.6.18-53.el5)
root (hd0,0)
kernel /vmlinuz-2.6.18-53.el5 ro root=/dev/VolGroup00/LogVol00 rhgb quiet
initrd /initrd-2.6.18-53.el5.img
title Red Hat Enterprise Linux Server (2.6.18-53.el5Debxen)
root (hd0,0)
kernel /xen.gz-2.6.18-53.el5
module /vmlinuz-2.6.18-92.el5debug ro root=/dev/VolGroup00/LogVol00 rhgb quiet
module /initrd-2.6.18-92.el5debug.img
——————————————————————

Reboot

Advertisements

November 10, 2008 - Posted by | Uncategorized

Sorry, the comment form is closed at this time.

%d bloggers like this: