Kerrighed Installation

The following document is a mix and match of the installation document found on http://www.kerrighed.org http://www.kerrighed.org/wiki/index.php/Installing_Kerrighed_2.3.0 and http://www.kerrighed.org/wiki/index.php/Kerrighed_on_NFSROOT and various other debian and gentoo forums. I owe a big thank you to Dr.louis Rilling , Rainer finnochiaro and everybody else on the kerrighed mailing list , you guys are really very helpful and patient with newbies like me.


Install a debian lenny (i386) system - netinst cd you dont need to add the desktop system , if you want to keep it simple, just aptitude install xorg fluxbox and then startx.

well once your debian lenny system is ready do the following in a command prompt

aptitude install tftpd-hpa

aptitude install dhcp3-server

aptitude install nfs-kernel-server

mkdir /srv/tftp

mkdir /srv/tftp/grub

mkdir /NFSROOT

aptitude install debootstrap

debootstrap etch /NFSROOT/kerrighed http://ftp.debian.org/debian

chroot /NFSROOT/kerrighed ( from now on your in the chroot directory )

passwd ( change your root password here )

mount -t proc none /proc

nano /etc/fstab — copy paste the below

###############################################################################
# A swap partition
/dev/hda    none   swap   sw            0 0
none        /proc  proc   defaults      0 0
none        /sys sysfs    defaults      0 0
#
# NFSROOT
# Following partitions are mounted in rw mode, for the moment, I have
# some troubles with lockd daemon that's why I added the 'nolock' params
192.168.0.1:/NFSROOT/kerrighed/dev  /dev  nfs rw,hard,nolock 0 0
192.168.0.1:/NFSROOT/kerrighed/var  /var  nfs rw,hard,nolock 0 0
192.168.0.1:/NFSROOT/kerrighed/tmp  /tmp  nfs rw,hard,nolock 0 0
192.168.0.1:/NFSROOT/kerrighed/root /root nfs rw,hard,nolock 0 0
#
# TMPFS
none                             /var/run tmpfs defaults     0 0

#################################################

nano /etc/hosts — copy paste the below

########################################

127.0.0.1 localhost.localdomain localhost

192.168.0.1    server.mycluster.home server
192.168.0.101  ssi1.mycluster.home ssi1
192.168.0.102  ssi2.mycluster.home ssi2
192.168.0.103  ssi3.mycluster.home ssi3
192.168.0.104  ssi4.mycluster.home ssi4

#####################################

ln -sf /etc/network/if-up.d/mountnfs /etc/rcS.d/S35mountnfs

aptitude install grub

aptitude install gcc ssh libncurses5 libncurses5-dev lsb-release xmlto libtool pkg-config automake rsync bzip2

aptitude install dhcp3-common nfs-common nfsbooted

wget -O /usr/src/kerrighed-latest.tar.gz http://kerrighed.gforge.inria.fr/kerrighed-latest.tar.gz

wget -O /usr/src/linux-2.6.20.tar.bz2 http://www.kernel.org/pub/linux/kernel/v2.6/linux-2.6.20.tar.bz2

cd /usr/src

tar xzf kerrighed-latest.tar.gz

tar jxf linux-2.6.20.tar.bz2

cd kerrighed-2.3.0

***********************************************

./configure –with-kernel=/usr/src/linux-2.6.20 ( if it fails here you might install pkgconfig again)

****************************************************

make patch

make defconfig

make -C /usr/src/linux-2.6.20 menuconfig ( this is too add/remove parameters for your kernel- i suggest you leave it default for the first time - exit will ask you to save if you have done any changes, say yes )

make kernel

make

make kernel-install

make install ( once make install completes your new kerrighed enabled kernel is ready )

exit ( this removes you out of your chroot window - if not sure just open a new terminal )

nano /etc/default/dhcp3-server ( add your ethernet card here , you should have a line like this INTERFACES=”eth0″) i added the eth0 here.

ctrl-o writes the file and ctrl-x exits from the nano editor

change your ip address to 192.168.0.1 to keep in line with this document by editing /etc/network/interfaces and then do /etc/init.d/networking restart , you might need to do a ifconfig eth0 up later.

nano /etc/default/tftpd-hpa

change the settings to make it look like RUN_DAEMON = “yes” and OPTIONS = ‘-l -s /srv/tftp’

nano /etc/exports - copy paste the below

*************************************************************************

/NFSROOT/kerrighed *(ro,async,no_root_squash,no_subtree_check)
/NFSROOT/kerrighed/tmp *(rw,sync,no_root_squash,no_subtree_check)
/NFSROOT/kerrighed/var *(rw,sync,no_root_squash,no_subtree_check)
/NFSROOT/kerrighed/dev *(rw,sync,no_root_squash,no_subtree_check)
/NFSROOT/kerrighed/root *(rw,sync,no_root_squash,no_subtree_check)

**************************************************************************

mv /etc/dhcp3/dhcpd.conf /etc/dhcp3/dhcpd.conf.old

nano /etc/dhcp3/dhcpd.conf

copy paste the following

*******************************************************************************************************

### PART 1

# GRUB magic
option grub-menu code 150 = string;

# General options
option dhcp-max-message-size 2048;
use-host-decl-names on;
deny unknown-clients;
deny bootp;

### PART 2
option domain-name “mycluster.home”;
option domain-name-servers 123.123.123.123, 124.124.124.124;
option ntp-servers ntp.network.net;

### PART 3
subnet 192.168.0.0 netmask 255.255.255.0 {
option routers 192.168.0.1;
option broadcast-address 192.168.0.255;
}

### PART 4
group {
filename “pxegrub”;
next-server 192.168.0.1;
option grub-menu = concat(”(nd)/grub/”, host-decl-name);
option dhcp-parameter-request-list = concat(option dhcp-parameter-request-list,96);
option root-path “/NFSROOT/kerrighed”;
host ssi1 { fixed-address 192.168.0.101; hardware ethernet 00:1e:43:43:34:34; }
host ssi2 { fixed-address 192.168.0.102; hardware ethernet 00:1e:43:32:23:32; }
# host ssi3 { fixed-address 192.168.0.103; hardware ethernet xx:xx:xx:xx:xx:xx; }
# host ssi4 { fixed-address 192.168.0.104; hardware ethernet xx:xx:xx:xx:xx:xx; }
}

*********************************************************************************************************************

save the file. write in the mac-addresses of the network cards, i have set up only a two node cluster here

download the following pxegrub file from here

copy it to /srv/tftp

mv /srv/tftp/pxegrub.doc /srv/tftp/pxegrub

or you can download a pxegrub file from here

http://os.inf.tu-dresden.de/~adam/grub/0.97/pxegrub-0.97-os.3.gz.

unzip it rename it to pxegrub and then move it to /srv/tftp

nano /srv/tftp/grub/ssi1

copy paste the following

******************************************************************************************

timeout 1

title Kerrighed Cluster for Me
root (nd)
kernel /vmlinuz-2.6.20-krg root=/dev/nfs ip=dhcp nfsroot=192.168.0.1:/NFSROOT/kerrighed session_id=121

***************************************************************************************************

you can change the session_id to whatever you want

save the file and copy it to ssi2 ssi3 ssi4 as you want it

cp /srv/tftp/grub/ssi1 /srv/tftp/grub/ssi2

/etc/init.d/tftpd-hpa restart

/etc/init.d/dhcp3-server restart

/etc/init.d/nfs-kernel-server restart

boot your two nodes , they should get a ip address and start booting up the kerrighed kernel,

( Note at this point you might get a pxe file not found error - just apt-get remove tftpd-hpa and apt-get install tftpd-hpa to resolve the issue )

once both nodes are up , login and issue the command

krgadm cluster start

thats it for now, ill put up the X installation tommorrow.