Captain's Universe Home
Captain's Universe Home
Cosmic Ray Muon DetectorTeleGarden Pages
Time on MarsBryophyllum Plants
Jupiter Radio AstronomyAncient Pages
Salzburg Tourist GuideEarth Magnetometer
  H O M E     AJAX & MORE     LINUX & MORE     RTAI     XENOMAI     ADEOS IPIPE      
    JAVA & BROWSERS     *NIX     ELECTRONICS     REVIEWS     ARTEMIA     FAIRY SHRIMP      



Linux Cluster with OpenMOSIX - Your own boot CD

This project uses Martin Purschke's wonderful Setup CD (1.6):
Martin L. Purschke's Setup CD
and the OpenMOSIX kernel and binaries from openmosix.sf.net (rpm's)

If you want a openMosix Boot Floppy click here

HOWTO USE THE RPMS FROM openmosix.sf.net

Extract the rpm's:
# mkdir /tmp/openmosix
copy the openmosix-kernel and usertools rpm's to /tmp/openmosix
# rpm2cpio openmosix-kernel.rpm > kernel
# rpm2cpio usertools.rpm > tools
optional: list contents of the cpio archive:
# cpio -t < tools
extract the contents of the cpio files
# cpio -d -i < kernel
# cpio -d -i < tools
(-i = extract; -d = create directories)
now we have extracted the rpm's into /tmp/openmosix and we can copy all files

* copy files from the extracted rpm's to the ramdisktree (except the system-map; you might want to remove kernel stuff to reduce the ramdisk-size)
* exchange bootimagetree/vmlinuz with the openmosix-kernel
* mkdir ramdisktree/dev/shm
* chmod +x ramdisktree/etc/init.d/openmosix
* chmod +x ramdisktree/sbin/*
* mkdir ramdisktree/var/lock
* chmod 0777 ramdisktree/var/lock
* mkdir ramdisktree/var/lock/subsys
* chmod 0777 ramdisktree/var/lock/subsys/
* mkdir ramdisktree/mfs
* chmod 0777 ramdisktree/mfs

modify:
ramdisktree/etc/fstab and add:
mfs	/mfs	mfs	dfsa=1	0	0
Since the openmosix.sf.net kernel doesn't recognize the CDROM drive, we must load the modules manually:
The .o modules are in /lib/modules/2.4.xx-openmosix-x/kernel/drivers/cdrom/cdrom.o and
/lib/modules/2.4.xx-openmosix-x/kernel/drivers/ide/ide-cd.o
* copy ide-cd.o to initrdtree/lib/modules
* copy cdrom.o to initrdtree/lib/modules
* copy ramdisktree/bin/insmod to initrdtree/
* chmod 0777 initrdtree/insmod

insert at the top of initrdtree/mount_cdrom:
/insmod /lib/modules/cdrom.o
/insmod /lib/modules/ide-cd.o
modify load_eth0.sh:
insmod crc32 >/dev/null 2>&1
insmod mii >/dev/null 2>&1
insmod 8390.o >/dev/null 2>&1
[...]
if insmod ${card} >/dev/null 2>&1
create etc/ominit.sh:
ifconfig eth0 192.168.0.2
omdiscd -i eth0
/etc/init.d/openmosix start
mount /mfs
# chmod +x ominit.sh
Modify ominit.sh to your needs. After the system has booted just issue /etc/ominit.sh and the cluster member is up!

Simple test programm for the linux cluster



Just for completeness, here is the former HOWTO. Basically the same steps, but the kernel and binaries are taken from Clusterknoppix

ClusterKNOPPIX3.3

This is just a tutorial to get you started. You might want to change things for automatic configuration of the network cards and automatic startup of openmosix.

First we need the binaries and the kernel from ClusterKNOPPIX:
1. boot from ClusterKNOPPIX
2. Mount your local harddisk with: mount /dev/hda1 /mnt/hd (or similar)
3. copy these files to your HD:
  • etc/init.d/openmosix
  • usr/sbin/setpe
  • usr/sbin/omdiscd
  • usr/bin/mosctl
  • etc/openmosix.map
  • copy all needed kernel modules - in my case especially crc32.o and 8139too.o for the network card. Better copy all NIC drivers for max. compatibility

Boot from your harddisk and exchange/copy/create/modify the following files in the SetupCD directories:
copy files to:
ramdisktree/bin/omdiscd
ramdisktree/bin/setpe
ramdisktree/bin/mosctl
chmod +x omdiscd
chmod +x setpe
chmod +x mosctl
ramdisktree/etc/openmosix.map
ramdisktree/etc/init.d/openmosix
chmod +x openmosix

exchange files:
bootimagetree/vmlinuz with openmosix-kernel from ClusterKNOPPIX

create:
mkdir ramdisktree/var/lock
chmod 0777 ramdisktree/var/lock

modify:
ramdisktree/etc/fstab and add:
mfs	/mfs	mfs	dfsa=1	0	0
ramdisktree/etc/init.d/openmosix (paths for the openmosix tools):
SETPE="/bin/setpe"
OMDISCD="/bin/omdiscd"
MOSCTL="/bin/mosctl"

exchange all kernel modules in:
ramdisktree/lib/modules/net

Now we're ready to build the boot CD iso image:

Set your CD build directory with:
# export TOPDIR=/path/to/cd-template-root
# ./build.sh

Boot machine #1 (192.168.0.1) with ClusterKNOPPIX3.3
Burn your CD image and boot machine #2 (192.168.0.2) with it.

If your network card didn't come up properly on machine #1 (ClusterKNOPPIX), do this:
boot # knoppix 2

# /etc/init.d/openmosix stop

openMosix: Using map file /etc/openmosix.map
Stopping openMosix...
openMosix: openMosix: All guest processes evacuated and no further guest allowed
All remote processes were expelled and no further remote processes accepted:
Cancelling DFSA entry #1 (was </mfs>)

# ifconfig eth1 192.168.0.1

# omdiscd -i eth1
openMosix configuration changed: This is openMosix #1 (of 1 configured)
openMosix #1 is at IP address 192.168.0.1
omdiscd[PID]: Notified kernel to activate openMosix

# /etc/init.d/openmosix start

openMosix: Using map file /etc/openmosix.map
Initializing openMosix...
omdiscd[PID]: Unable to determine address of default interface.
This may happen because there is no default route configured.
Without a default route, an interface must be: Network is unreachable
omdiscd[PID]: Unable to initialize network. Exiting.
Local processes already allowed to leave automatically.
automatic load-balancing already enabled.
openMosix: guest-processes now accepted again.
Remote processes now allowed in.
MFS access already enabled.
Adding </mfs> as DFSA entry #1

# mount /mfs
Just ignore the omdiscd error messages. This seems to be OK, since we started omdiscd before.

On machine #2 (our own CD), do this (we have to start openmosix manually - automate this if you desire):
# cd /lib/modules
# insmod crc32.o
# /etc/load_eth0.sh     ( or manually with # insmod 8139too )
[...]
Ethernet card eth0 is a 8139too
# ifconfig eth0 192.168.0.2
# omdiscd -i eth0
openMosix configuration changed: This is openMosix #2 (of 1 configured)
openMosix #2 is at IP address 192.168.0.2
openMosix configuration changed: This is openMosix #2 (of 2 configured)
openMosix range: 1-2 begins at 192.168.0.1
# /etc/init.d/openmosix start
openMosix: Using map file /etc/openmosix.map
Initializing openMosix...
# mount /mfs
Adding </mfs> as DFSA entry #1
Go to /mfs and you should see:
# cd /mfs
# ls
1 2 here home lastexec magic selected
So if you start the second machine and you see "This is openMosix #2 (of 2 configured)" everything is up and running. Process sharing has started, aswell as the MFS (Mosix File System). You can access the local file system of every machine simply by cd'ing to /mfs/number , where 'number' is the last number of the machines IP, in our case 1 is 192.168.0.1 and 2 is 192.168.0.2

Simple test programm for the linux cluster

Last-Modified: Thu, 10 Feb 2005 10:01:52 GMT

Google
 
Web www.captain.at
go to top
© 1996-2010 . All rights reserved.
No reproduction, distribution, publishing or transmission of the copyrighted materials at this site is permitted. Policy
go to top