operating_systems:linux:debian:comosix_quick_start
Table of Contents
CoMosix node(s)
coMosix installation
We can use KiXtart to do the installation of coMosix on domain members nodes (The microsoft XP machines).
common.kix
; REM *********************************************************************** ; REM ** ; REM ** FILE NAME: IRO_Login.bat ; REM ** LOCATION : \NETLOGON ; REM ** DEVELOPER: Sylvain Bolay - sylvain.bolay@irovision.ch ; REM ** This script is based on the original script of Robert Butler - rbutler@kodak.com ; REM ** PURPOSE : Automate some client and admin tasks, as well as enforce ; REM ** some IRO system standards. Displays security and ; REM ** logging message. Syncs time of local computer with logon ; REM ** server. Maps user's home and project directories. ; REM ** Verify the local client network configuration, as well as ; REM ** keep anti-virus signatures up-to-date. ; REM ** REVISIONS: See separate file DomainUser.ChangeLog for script ; REM ** revision history. ; REM ** ; REM *********************************************************************** ; REM ** Establish variables, constants. $SysDrive = (SUBSTR(%windir%,1,2)) ; REM ** Where is the OS installed? Win95/98 don't support %SystemDrive% $AcceptKey = "B" ; REM ** Key pressed to accept Security Warning Message $AdminEmail = "abuse@@mydomain.com" ; REM ** Where to send all of the warning messages $AdminEmail2 = "" ; REM ** Second email address for CC on warning messages $DaysSince1970 = ((((@YEAR - 1970) * 365) + @YDAYNO) + ((@YEAR - 1972) / 4)) ; REM ** Quick function to count the number of days since 1970. Used for some date checks in the script. $DebugFile = "$SysDrive\@LDOMAIN\Debug.Log" ; REM ** Location of the script debug log $INIFile = "$SysDrive\@LDOMAIN\@LDOMAIN.INI" ; REM ** INI file used for script settings and event checking $JobsFile = "$SysDrive\@LDOMAIN\Jobs.txt" ; REM ** Jobs file which collects all software that needs to be installed (at once!) $DisplayWarning = "No" ; REM ** Do we need to show the Security Warning message $EmailMessage = " " ; REM ** Message sent to the $AdminEmail address $ErrorNumber = 0 ; REM ** Holder for Kix32 Error number $ErrorString = " " ; REM ** Holder for Kix32 Error string $MailServer = "pop.mydomain.com" ; REM ** POP3 mail server $OS = "UnKnown" ; REM ** What OS is the client system? $DNS1 = "" ; REM ** DNS1 set to the local dns server on myserver $Domain = "mydomain" ; REM ** Search Domain set to the LAN domain mydomain $WINS1 = "myserver.mydomain" ; REM ** WINS1 server set to myserver. $WINS2 = "" ; REM ** WINS2 server not set $SubnetMask = "255.255.255.0" ; REM ** subnet mask for iro users on 192.168.1.0/24 $HomePage = "http://mydomain.com/" ; REM ** WARNING: This is overwritten by GPOs $Privilege = "User" ; REM ** User's priviledge level (User, Guest, Admin, Domain Admin, Local Admin, Power User) $Reboot = "No" ; REM ** Reason for rebooting the user's computer $Row = 4 ; REM ** What row to place the cursor on $TmpRow = 0 ; REM ** What tmpRow to add to row to place the cursor on $Status = " " ; REM ** Reused throughout the script for status messages $TempKey = " " ; REM ** Used to capture key pressed during Security Message $TempNumber = 0 ; REM ** Reused throughout the script for several functions $TempString = " " ; REM ** Reused throughout the script for several functions $UserEmail = "sendmail@@mydomain.com" ; REM ** Email address for the sender of the logs $ToolsOnServer = "\\myserver.mydomain\netlogon\Tools" ; REM ** Where all connexion tools are located $JobsOnServer = "\\myserver.mydomain\netlogon\CPAU_Script" ; REM ** Where all jobs files are located $List = "" ; REM ** Where the list to execute is located . . . ; REM *****************************OpenMosix********************************************************* ; REM Install Winpcap! $key1 = "HKEY_LOCAL_MACHINE\SOFTWARE\Microsoft\Windows\CurrentVersion\Uninstall\WinPcapInst" ;$key1 = "HKEY_LOCAL_MACHINE\SOFTWARE\WinPcap" IF NOT KEYEXIST("$key1") $List = $List + "installWpcap"+ CHR(13) + CHR(10) ;SHELL "@LSERVER" + "\network\OpenMosix\wpcap.exe" ELSE $Dummy = WRITELINE (10, "WinPcap already installed!" + CHR(13) + CHR(10)) ENDIF ; REM Check boot.ini and patch it if necessary $key2 = "HKEY_LOCAL_MACHINE\Software\bootini" $entry = "version" $bootPatchLatestVersion = "1.0" ;REM is the OM version $bootPatchVersion = READVALUE("$key2","$entry") IF ( (NOT KEYEXIST("$key2")) OR ($bootPatchVersion <> $bootPatchLatestVersion) ) $List = $List + "patchBootIni"+ CHR(13) + CHR(10) ELSE $Dummy = WRITELINE (10, "boot.ini registry key ok (V.$bootPatchVersion)" + CHR(13) + CHR(10)) ENDIF ; REM If winpcap is installed and boot.ini is patched, then install coMosix IF KEYEXIST("$key1") AND KEYEXIST("$key2") $key = "HKEY_LOCAL_MACHINE\Software\coMosix" $entry = "version" $omLatestVersion = "1.2.1" ;REM is the OM version $omVersion = READVALUE("$key","$entry") ; REM Install coMosix if not already done! IF ( (NOT KEYEXIST("$key")) OR ($omVersion <> $omLatestVersion) ) $List = $List + "openMosixInstall"+ CHR(13) + CHR(10) ELSE $Dummy = WRITELINE (10, "coMosix registry key ok (V.$omVersion)" + CHR(13) + CHR(10)) ; REM SHELL "C:\WINDOWS\SYSTEM32\CMD.EXE /C " + @LSERVER + "\netlogon\CPAU_Script\calljob.bat coMosix" ENDIF ELSE $Dummy = WRITELINE (10, "coMosix can not be installed. Pre-requists are not reached!" + CHR(13) + CHR(10)) ENDIF . . . ; REM ********************************************************************** ; REM ** ; REM ** Write the file with the list of jobs to be executed and execute it ; REM ** ; REM ********************************************************************** AT ($Row,6) "Launch install script ... " IF $List <> "" IF EXIST($JobsFile) ;REM ** Remove Read-only on the file $Dummy = SETFILEATTR ($JobsFile, 128) DEL $JobsFile ENDIF ;REM ** Create the file and fill it with the job list $Dummy = OPEN (2, $JobsFile, 5) $Dummy = WRITELINE (2,$List) $Dummy = CLOSE (2) ;REM ** set read-only on the file $Dummy = SETFILEATTR ($JobsFile, 1) ;REM ** Execute the script exec.job with CPAU SHELL "cmd /C start /BELOWNORMAL /min $ToolsOnServer\CPAU.exe -file "+ CHR(34) +"$JobsOnServer\exec.job"+ CHR(34) +" -cwd C:\IRO\ -dec -wait -profile -hide" ;REM ** Check if the execution did have an error, or not. IF @ERROR $ErrorNumber = $ErrorNumber + @ERROR $Dummy = WRITELINE (10, "Jobs launching failed! (ERRORLEVEL: $ErrorNumber) " + CHR(13) + CHR(10)) $Status = "FAILED " ELSE $Dummy = WRITELINE (10, "Jobs launched successfully!" + CHR(13) + CHR(10)) $Status = "OK " ENDIF ELSE $Dummy = WRITELINE (10, "No Job to launch!" + CHR(13) + CHR(10)) $Status = "OK " ENDIF AT ($Row,70) "$Status" $Row = $Row + 1
installWpcap - Install Winpcap
installWpcap.bat
@ECHO OFF
START \\myserver.mydomain\network\OpenMosix\wpcap.exe
patchBootIni - Patch the boot.ini file
openMosixInstall - Install the coMosix daemon
openMosixInstall.bat
@ECHO OFF
\\myserver.mydomain\network\OpenMosix\silent_om_w32.exe
NFS exportation
/etc/exports
/data/comosix/omrootfs *(ro,sync,all_squash)
and once exported, exportfs says:
/srv/comosix/omrootfs <world>
Server directory tree
/data/comosix/
comosix/ `-- omrootfs -> /srv/comosix/omrootfs
/srv/comosix/
This is the most sensitive part. In these directories, numerous modifications are performed. If you do not know how to test the system, you may be interested on this. Otherwise, you can ask the comosix project developpers for more help!
comosix/ |-- omrootfs | |-- bin | |-- boot | |-- dev | |-- etc | |-- home | |-- lib | |-- lost+found | |-- media | |-- mnt | |-- opt | |-- proc | |-- root | |-- sbin | |-- srv | |-- sys | |-- tmp | |-- usr | `-- var `-- omrootfs.260707.tgz
\\myserver.mydomain\network\OpenMosix
OpenMosix/ |-- WinPcap_3_1_beta4-1.exe |-- boot.ini.modified |-- coMosix-1.2.0-Sinstall.exe |-- coMosix-1.2.1-Sinstall.exe |-- comosix.ini |-- debug_om_w32.exe |-- net_card_name.exe |-- om_tools | |-- libmos.a | |-- libmos.la | |-- libmos.so | |-- libmos.so.0 | |-- libmos.so.0.3.0 | |-- mosctl | |-- moslimit | |-- mosmon | |-- mosrun | |-- omdiscd | `-- openmosix |-- om_w32.exe |-- silent_om_w32-0.1.1.exe |-- silent_om_w32-0.1.2.exe |-- silent_om_w32-0.1.3.exe |-- silent_om_w32-0.1.4.exe |-- silent_om_w32-1.0.0.exe |-- silent_om_w32.exe -> coMosix-1.2.1-Sinstall.exe |-- silent_om_w32.exe.bck |-- winpcap_card_name |-- winpcap_silent | `-- silent_om_w32.exe `-- wpcap.exe
with comosix.ini file looking like:
; coMosix Ini File ; General coMosix configuration [comosix] memory_size=64 ; NFS configuration for the kernel [nfs] ; At IRO we do not use options, just server and share ... server=172.16.30.22 share=/data/comosix/omrootfs ; ... but you may want to use it. ;options=port=12,rsize=1024 ; COBD config : from path_0 to path_9. Cannot jump numbers, like path_0, path_2, ... [cobd] ;path_0=\DosDevice\C:\a
Microsoft Nodes
This is a sample on what you should find on the XP machine once the installation is finished.
c:\Program Files\coMosix
coMosix/ |-- colinux-bridged-net-daemon.exe |-- colinux-daemon.exe |-- comosix.xml |-- linux.sys |-- uninstall.exe `-- vmlinux
with the generated comosix.xml file looking like:
<?xml version="1.0" encoding="UTF-8"?> <colinux> <bootparams> root=/dev/nfs nfsroot=172.16.30.22:/data/comosix/omrootfs ip=dhcp devfs=mount video=vesafb:mtrr,ywrap,1280x1024-32@60 windows_name=IRO039 </bootparams> <memory size="64" /> <network index="0" name="Broadcom NetXtreme Gigabit Ethernet Driver (Microsoft's Packet Scheduler) " type="bridged" mac="00:FF:02:25:30:53" /> </colinux>
c:\Program Files\WinPcap
WinPcap/ |-- INSTALL.LOG |-- NetMonInstaller.exe |-- Uninstall.exe |-- daemon_mgm.exe |-- npf_mgm.exe `-- rpcapd.exe
Running daemons
SERVICE_NAME: coMosix DISPLAY_NAME: coMosix TYPE : 10 WIN32_OWN_PROCESS STATE : 4 RUNNING (STOPPABLE,NOT_PAUSABLE,IGNORES_SHUTDOWN) WIN32_EXIT_CODE : 0 (0x0) SERVICE_EXIT_CODE : 0 (0x0) CHECKPOINT : 0x0 WAIT_HINT : 0x0
operating_systems/linux/debian/comosix_quick_start.txt · Last modified: 2011/08/15 05:56 by sbolay