Beowulf & VMWare

Robert G. Brown rgb at phy.duke.edu
Thu Oct 31 06:54:04 PST 2002


On Thu, 31 Oct 2002, Henderson, TL Todd wrote:

> Just to add my two cents.
> 
> I've just jumped into the reboot the company computers for a 'midnight
> cluster'.  It is actually, not working too badly.  We started it when we had
> a bunch of new 1.7 ghz P4 boxes going out and I helped them set up the
> image.  They(IT group) put on Windows, I put on Linux and installed grub as
> the boot loader.  They are using that image to deploy the new machines with.
> Now then, at night when people go home, instead of using the start menu to
> log out, they do a restart and select linux.  I have a command that runs
> during init on each machine that does a 'touch /cfd/nodes/`hostname`.  /cfd
> is a nfs mounted directory that all the machines use for the cfd account.  I
> then built some scripts that go to the /cfd/nodes directory, gather all the
> hosts that have reported at around 6:30pm, build an input file for a mpi cfd
> code and off it goes.  At that same time, I build a new .rhosts file and
> .ghosts file and issue an 'at' command to stop my cfd job at 6:00am and
> reboot all the nodes.  All the nodes are defaulted to windows in grub, so by
> 6:30 everyone has windows back.

You might try the following.  I haven't tried the windows side myself
and no longer run windows on anything at all even to test with, but it
"should" work.  If you can put your /boot partition with
/boot/grub/grub.conf in it on something both linux WinXX can mount AND
grub can read (it imports knowledge of how to read a variety of
filesystems in "stage 1.5" of the boot cycle), then you can maintain a
couple or three grub.conf's therein.  One of them could have Windows as
the default.  Another could have linux.

It should be simple on the linux side to write a script that, when the
system is shutting down, looks at the time and if the time is (say)
greater than 5:30 am does a cp /boot/grub/grub.conf.windows
/boot/grub.conf so that the reboot in process (or next boot) will be
windows, and match this with a cron job that terminates your cfd jobs
and reboots at 6 am.  I don't do Windows anymore and I'm sure Win9X and
NT and XP and 2K are all different anyway, but I would guess that it has
SOME provision for either a "cron"-like execution of scripted commands
or a script of some sort that can similarly be executed when shutting
down for a reboot that checks the time and copies
/boot/grub/grub.conf.linux into /boot/grub/grub.conf if appropriate so
that the system comes up in linux.  It might even be able to do this
automagically at 6:30 p.m., subject to idleness constraints or the like.

Since grub doesn't require any lilo-like command to be run after
changing the boot configuration file, grub can easily be toggled.  I've
used it to control my kids access to windows (and games), but never
bothered to work out the windows half of the conf file toggling and then
got sufficiently annoyed at Microsoft and Windows in general that I
banned it entirely.  Similar toggles permit an easy remote update --
maintain a grub.conf that boots into a kickstart install, for example,
the last step of which is to reboot back into normal operation.  With
this we can reinstall any workstation or node to a clean current
kickstart-specified configuration from anywhere net/ssh accessible with
literally two commands (so few we haven't bother wrapping them up into a
script:-).

   rgb

-- 
Robert G. Brown	                       http://www.phy.duke.edu/~rgb/
Duke University Dept. of Physics, Box 90305
Durham, N.C. 27708-0305
Phone: 1-919-660-2567  Fax: 919-660-2525     email:rgb at phy.duke.edu







More information about the Beowulf mailing list