O P E N M O S I X M I C R O - H O W T O (V1.0 - 2003-03-15) =============================================================== TABLE OF CONTENTS 1. Introduction 2. Openmosix patch version 3. Kernel sources 4. Patch the kernel 5. Configure your kernel 6. Create your kernel 7. Install your kernel 8. Update your boot loader 9. Reboot 10. Verify if openmosix is working 11. Install openmosix programs 12. Try the cluster 13. Author of this document 1. Introduction =============== The whole document is based on Debian distribution only. For other distributions refer you to the Mosix's howto. You can find it at http://www.tldp.org/HOWTO/Mosix-HOWTO/index.html Openmosix is a very simple version of clustering. The futures are directly implemented in the kernel. You can optionally install some user tools to manage the whole cluster. If you don't know what a cluster is, you can read this short document http://www.tldp.org/HOWTO/Mosix-HOWTO/x78.html 2. Openmosix patch version ========================== Before installing your kernel sources, verify for what Debian's kernel versions are there Debian's kernel patches. To do this you must first install the related package with apt-get install kernel-patch-openmosix and then look the patch version with ls /usr/src/kernel-patches/i386/openmosix You should see something like openMosix-xxx.gz where xxx is the kernel version. e.g.: openMosix-2.4.19-3.gz 3. Kernel sources ================= Before proceeding with this step, please verify what version of kernel patches are been released under Debian following the step 1. Install the kernel sources with the following command apt-get install kernel-source-xxx where xxx is the kernel version. This will install a package like /usr/src/kernel-source-YOUR_KERNEL_SOURCE.tar.bz2 You must know extract it executing the following command cd /usr/src/ tar -xjvf kernel-source-2.4.19.tar.bz2 This will create the directory with all the needed sources to compile your kernel. 4. Patch the kernel =================== To patch the kernel you must be in the /usr/src/YOUR_KERNEL_SOURCE Therefore make a cd /usr/src/YOUR_KERNEL_SOURCE and call ../kernel-patches/i386/apply/openmosix This script will patch your kernel in a easily way. 5. Configure your kernel ======================== If you aren't in /usr/src/YOUR_KERNEL_SOURCE change directory with cd /usr/src/YOUR_KERNEL_SOURCE and then configure your kernel with your preferred tool: - make config - make menuconfig - make xconfig (this is my preferred) Set the following fields in the openMosix menu (it's the first menu) as showed below # openMosix # CONFIG_MOSIX=y # CONFIG_MOSIX_TOPOLOGY is not set CONFIG_MOSIX_SECUREPORTS=y CONFIG_MOSIX_DISCLOSURE=1 # CONFIG_MOSIX_EXTMOSIX is not set CONFIG_MOSIX_FS=y CONFIG_MOSIX_PIPE_EXCEPTIONS=y # CONFIG_openMosix_NO_OOM is not set 6. Create your kernel ===================== It's now time to compile your kernel. Call the following command make-kpkg clean make-kpkg --append-to-version=-open-mosix --revision=1 kernel_image This will create the package kernel-image-YOUR_KERNEL_VERSION-open-mosix_1_i386.deb If the last three lines doesn't seem like this make[3]: Leaving directory `/usr/src/kernel-source-2.4.19/Documentation/DocBook' make[2]: Leaving directory `/usr/src/kernel-source-2.4.19' rm -f stamp-build touch stamp-image make[1]: Leaving directory `/usr/src/kernel-source-2.4.19' means that you encountered any errors. Don't proceed if you have any errors here! 7. Install your kernel ========================= The new package with your custom kernel is placed in /usr/src/, therefore cd to this directory with cd .. (or cd /usr/src/) and install it calling dpkg -i kernel-image-YOUR_KERNEL_VERSION-open-mosix_1_i386.deb The most important file that are installed are: /boot/config-YOUR_KERNEL_VERSION-open-mosix /boot/vmlinuz-YOUR_KERNEL_VERSION-open-mosix /boot/System.map-YOUR_KERNEL_VERSION-open-mosix /lib/modules/YOUR_KERNEL_VERSION-open-mosix/ If you want, you can give a look inside this package with dpkg -c kernel-image-YOUR_KERNEL_VERSION-open-mosix_1_i386.deb This will list all the files/directories that this package contains. 8. Update your boot loader ========================== If are you using the lilo as boot loader, make a backup of your lilo configuration's file and put a new entry for it. e.g.: cd /etc/ cp lilo.conf lilo.conf.old vi lilo.conf image=/boot/vmlinuz-YOUR_KERNEL_VERSION-open-mosix label=Linux.YOUR_KERNEL_VERSION-m read-only After have written the file, call lilo from a shell lilo In the output of the lilo command, you should find a line containing something like Added Linux.YOUR_KERNEL_VERSION-m 9. Reboot ========= To work with your custom kernel, you must reboot your machine. If you are logged in as root your can type reboot This will reboot your machine immediately. When lilo starts, select the new kernel. If you don't know how, press the SHIFT key as soon as you see LILO: on your monitor, then use the arrow keys to choice your new kernel and press ENTER to start booting. 10. Verify if openmosix is working ================================== When your system has finished booting, execute the following command dmesg | grep -i openmosix and verify that there aren't any errors messages. 11. Install openmosix programs ============================== To install the openmosix package I had a strange problem. By installing this package, the service is automatically started, but the service requires the configuration file /etc/hpc.map and also requires that this file is right configured. The problem is that is not so easy for a newbie to configure the file before installing the package. Therefore my solution is a little bit dirty but easier. Install the following package apt-get install openmosix that will give an error because it's not possible to start the openmosix service due the wrong file configuration. therefore edit your /etc/hpc.map as below: - remove the following line 1 127.0.0.1 1 - add a line for each node (PC) of your cluster. The first value is the node id, the second value is the ip address or name, the third value is how many nodes can be reached e.g.: 1 pc_1 1 2 pc_2 1 Note that this file must be identical on each node! You can easily copy it to others machine with scp /etc/hpc.map yourRemoteHost:/etc/ Repeat now the last apt-get command apt-get install openmosix Now, if your hpc.map file is right configured, the daemon will be started and since now you should profit from your cluster. You can additionally install a lot of useful openmosix tool with apt-get install openmosixview If you want to create a template file with your cluster configuration to use for other machine in your cluster, you can also install the following package apt-get install update-cluster I didn't use it, therefore I can't give you more informations about them. 12. Try the cluster =================== This simple script works very well with the openmosix features. awk 'BEGIN {for(i=0;i<10000;i++)for(j=0;j<10000;j++);}' If you execute it, you can monitor what happens thanks the openmosixview tool. 13. Author of this document =========================== Any hints and corrections would be appreciated. mailto:eplanamente@gmx.net