Commit 17dc7a22 authored by Russ Fish's avatar Russ Fish
Browse files

Clean up the WinXP image build notes a little bit.

parent c91f644a
# Directions for setting up an XP image from scratch.
# These are raw notes and commands to paste into a shell on Windows.
# Further-indented stuff is optional, for checking or debugging.
# These are raw notes and commands to paste into a shell.
# Mostly Bash shell commands for Windows, some tcsh commands for Boss or Ops.
# Some (most?) of it could be scriptified with some work.
alias v 'ls -lsF' # "Verbose" listing
# Notice that this file has spaces instead of tabs at the beginning of lines.
# A tab in either Bash or tcsh causes it to display all of the possible command completions!
# By convention, "informational" commands are indented a couple of spaces more.
## Debugging and problem-solving stuff is double-commented.
alias v 'ls -lsF' # "Verbose" listing
setenv en emulab.net
alias rootpc 'sudo ssh pc\!^.$en \!:2*'
alias rootrd 'rd -K -g 1280x1024 -u root pc\!^.$en &'
. Start with a clean XP image, without all of the freight from Russ C's work.
......@@ -14,30 +22,45 @@ alias rootpc 'sudo ssh pc\!^.$en \!:2*'
- Set the Windows "w32time" NTP client to connect to the Emulab NTP host.
. Runs as a service, periodically contacts the time server.
Need to restart w32time before it sees the setsntp configuration. (?)
net time /querysntp
net stop w32time
net time /setsntp:ntp1
net time /querysntp
net start w32time
# May take a couple of minutes to take effect.
date
ntp1 is a DNS alias for Ops.
Need to restart w32time before it sees the setsntp configuration. (?)
net time /querysntp
net stop w32time
net time /setsntp:ntp1
net time /querysntp
net start w32time
# May take a couple of minutes to take effect.
date
. Need an NTP client, or at least the semblence of one.
cat /etc/ntp.drift
echo 0.000 > /etc/ntp.drift
- Disable the Messenger Service to keep annoying pop-ups away.
regtool -v list /HKLM/SYSTEM/CurrentControlSet/Services/Messenger
regtool -v set /HKLM/SYSTEM/CurrentControlSet/Services/Messenger/Start 4
- Disable the SSDP Discovery Service and Universal Plug and Play Device Host.
This closes port 5000 to attacks. Also the Remote Registry service.
regtool -v list /HKLM/SYSTEM/CurrentControlSet/Services/SSDPSRV
regtool -v list /HKLM/SYSTEM/CurrentControlSet/Services/upnphost
regtool -v list /HKLM/SYSTEM/CurrentControlSet/Services/RemoteRegistry
# (4 is Disabled, 3 is Manual, 2 is Automatic, 1 is only used for System services.)
regtool -v set /HKLM/SYSTEM/CurrentControlSet/Services/SSDPSRV/Start 4
regtool -v set /HKLM/SYSTEM/CurrentControlSet/Services/upnphost/Start 4
regtool -v set /HKLM/SYSTEM/CurrentControlSet/Services/RemoteRegistry/Start 4
- Set the workgroup name to EMULAB in Control Panel/System/Computer Name/Change...
No need to reboot yet.
- Make a "root" account in Control Panel/Administrative Tools/Computer Management/
System Tools/Local Users and Groups/Users, put it in the Administrators and Users groups.
. Also go into Services and Applications/Services and stop SSDP Discovery Service
and Remote Registry. Go into their Properties/Startup type and disable them as well.
. Also go into Services and Applications/Services and stop SSDP Discovery Service
and Remote Registry. Go into their Properties/Startup type and disable them as well.
. While you're there, Right-click Start/"Explore All Users" and copy the Computer Management
shortcut to the All Users/Desktop folder.
. While you're there, Right-click Start/"Explore All Users" and copy the Computer Management
shortcut to the All Users/Desktop folder.
- Start IE, make "blank" the home page. Click Tools/Internet Options/Home page/Use Blank.
......@@ -47,44 +70,42 @@ alias rootpc 'sudo ssh pc\!^.$en \!:2*'
- Create C:/Temp, C:/Software/CygWin
- Install CygWin
. Download setup from www.cygwin.com/setup.exe to C:/Software/CygWin (in /share/windows, too.)
. Run it. Install dir is C:\cygwin, package dir is C:\Software\CygWin .
. Mirror is http://mirrors.xmission.com .
. Click [View] to "Not Installed" (alphabetical.)
Click on the Skip in the "New" column to add a binary version of:
agetty, bison, cvs, cygrunsrv, ed, file, flex, gcc, gdb, make, minires-devel, nano,
openssh, openssl-devel, patch, perl, perl-libwin32, python, rpm, rpm-build,
rsync, shutdown, tcsh, vim, wget, zip .
. Don't "Create an icon on the Desktop", do "Add icon to Start Menu".
. Add ;C:\cygwin\bin to the end of the System PATH in
Control Panel/System/Advanced/Environment Variables.
. Start up a Cygwin shell and fix the shell properties:
Options QuickEdit Mode on, Layout/screen buffer height 3000, window height 55.
Check "Modify shortcut that started this window".
- Might as well fix the Start/Programs/Accessories/Command Prompt properties, too.
- Copy the bash shortcut to the All Users/Desktop.
- Copy it to a tcsh icon as well, changing the path to c:\cygin\cygwin-tcsh.bat .
- Copy the tcsh icon into All Users/Start Menu/Programs/Cygwin.
- Create c:\cygin\cygwin-tcsh.bat as a copy of c:\cygin\cygwin.bat with
bash --login -i
changed to
tcsh -l
. Set up local homedirs under /home as a symlink. ~root is already there.
cd /tmp
mv /home{,.orig}
ln -s /cygdrive/c/Documents\ and\ Settings/ /home
. Symlink the Windows hosts file.
ln -s /cygdrive/c/WINDOWS/system32/drivers/etc/hosts /etc/hosts
### Patch until liblocsetup HOSTSFILE is updated.
cp /etc/hosts /cygdrive/c/WINDOWS/system32/drivers/etc/hosts
. Create a proper group file. Make wheel an alias for Administrators.
. Run it. Install dir is C:\cygwin, package dir is C:\Software\CygWin .
. Mirror is http://mirrors.xmission.com .
. Click [View] to "Not Installed" (alphabetical.)
Click on the Skip in the "New" column to add a binary version of:
agetty, bison, cvs, cygrunsrv, ed, file, flex, gcc, gdb, make, minires-devel, nano,
openssh, openssl-devel, patch, perl, perl-libwin32, python, rpm, rpm-build,
rsync, shutdown, tcsh, vim, wget, zip .
. Don't "Create an icon on the Desktop", do "Add icon to Start Menu".
. Add ;C:\cygwin\bin to the end of the System PATH in
Control Panel/System/Advanced/Environment Variables.
. Start up a Cygwin shell and fix the shell properties:
Options QuickEdit Mode on, Layout/screen buffer height 3000, window height 55.
Check "Modify shortcut that started this window".
- Might as well fix the Start/Programs/Accessories/Command Prompt properties, too.
- Copy the bash shortcut to the All Users/Desktop.
- Copy it to a tcsh icon as well, changing the path to c:\cygin\cygwin-tcsh.bat .
- Copy the tcsh icon into All Users/Start Menu/Programs/Cygwin.
- Create c:\cygin\cygwin-tcsh.bat as a copy of c:\cygin\cygwin.bat with
bash --login -i
changed to
tcsh -l
. Set up local homedirs under /home as a symlink. ~root is already there.
cd /tmp
mv /home{,.orig}
ln -s /cygdrive/c/Documents\ and\ Settings/ /home
. Symlink the Windows hosts file into the Cygwin /etc.
ln -s /cygdrive/c/WINDOWS/system32/drivers/etc/hosts /etc/hosts
. Create a proper group file. Make wheel an alias for Administrators.
mkgroup -l | \
awk '/^Administrators:/{print "wheel" substr($0, index($0,":"))} \
{print}' > /etc/group.new
{print}' > /etc/group.new
diff /etc/group{,.new}
cp -p /etc/group{,.prev}
mv /etc/group{.new,}
......@@ -95,25 +116,25 @@ alias rootpc 'sudo ssh pc\!^.$en \!:2*'
diff /etc/passwd{,.new}
cp -p /etc/passwd{,.prev}
cp -p /etc/passwd{.new,}
chown root /etc/{passwd,group}*
chown root /etc/{passwd,group}*
. Set up sshd.
- Edit /bin/ssh-host-config to add a -i argument to the "cygrunsrv -I sshd" lines.
ed /bin/ssh-host-config
/cygrunsrv -I sshd/s//& -i/p
/cygrunsrv -I sshd/s//& -i/p
w
q
- Edit /bin/ssh-host-config to add a -i argument to the "cygrunsrv -I sshd" lines.
ed /bin/ssh-host-config
/cygrunsrv -I sshd/s//& -i/p
/cygrunsrv -I sshd/s//& -i/p
w
q
- Then start a cygwin shell and say:
ssh-host-config -y -c "ntsec tty"
or run ssh-host-config and answer the following interactive questions:
Select privilege separation = yes, sshd user = yes, install as service = yes,
CYGWIN=ntsec tty
- Check for -i flag: look for Interactive = 0x00000001 (1)
regtool -v list /HKLM/SYSTEM/CurrentControlSet/Services/sshd/Parameters
- Edit /etc/sshd_config
. Add this line: AuthorizedKeysFile /sshkeys/%u/authorized_keys
ssh-host-config -y -c "ntsec tty"
or run ssh-host-config and answer the following interactive questions:
Select privilege separation = yes, sshd user = yes, install as service = yes,
CYGWIN=ntsec tty
- Check for -i flag: look for Interactive = 0x00000001 (1)
regtool -v list /HKLM/SYSTEM/CurrentControlSet/Services/sshd/Parameters
- Edit /etc/sshd_config
. Add this line: AuthorizedKeysFile /sshkeys/%u/authorized_keys
ed /etc/sshd_config
/AuthorizedKeysFile
a
......@@ -121,63 +142,68 @@ AuthorizedKeysFile /sshkeys/%u/authorized_keys
.
w
q
. LogLevel defaults to INFO, can be set to VERBOSE, DEBUG1, etc.
Debug events are logged under Event View / Application / sshd,
One line per event (ugh.) Refresh to see new events with F5.
ls -l /etc/sshd_config
# Check.
grep LogLevel /etc/sshd_config
chmod g+w /etc/sshd_config
nano /etc/sshd_config
chmod g-w /etc/sshd_config
kill -HUP `cat /var/run/sshd.pid`
- Start sshd.
cygrunsrv -S sshd
. LogLevel defaults to INFO, can be set to VERBOSE, DEBUG1, etc.
Debug events are logged under Event View / Application / sshd,
One line per event (ugh.) Refresh to see new events with F5.
ls -l /etc/sshd_config
# Check.
grep LogLevel /etc/sshd_config
# Make it writable to edit, then change it back.
chmod g+w /etc/sshd_config
nano /etc/sshd_config
chmod g-w /etc/sshd_config
# Get a running sshd to read the config file with SIGHUP.
kill -HUP `cat /var/run/sshd.pid`
- Start sshd.
cygrunsrv -S sshd
- Set up for root ssh access from Boss.
chown root.wheel /home/root
chmod 755 /home/root
passwd root
chown root.wheel /home/root
chmod 755 /home/root
passwd root
daFluxGroup
daFluxGroup
mkdir ~root/.ssh
chown root.wheel ~root/.ssh
# On boss.
set pc=73
set ssh_args='-o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null"'
eval sudo ssh "$ssh_args" root@pc$pc id
mkdir ~root/.ssh
chown root.wheel ~root/.ssh
# [On boss.]
set pc=73
set ssh_args='-o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null"'
# This password isn't used for anything else, and doesn't need to be
# very secure because all users are in the Administrators group on the node.
eval sudo ssh "$ssh_args" root@pc$pc id
daFluxGroup
eval sudo scp "$ssh_args" ~root/.ssh/{id_dsa,identity}.pub root@pc$pc":".ssh
eval sudo scp "$ssh_args" ~root/.ssh/{id_dsa,identity}.pub root@pc$pc":".ssh
daFluxGroup
eval sudo ssh "$ssh_args" root@pc$pc
eval sudo ssh "$ssh_args" root@pc$pc
daFluxGroup
# On the target.
id
cd ~root/.ssh
cat {id_dsa,identity}.pub > authorized_keys
chmod 644 *
ls -ld /home /home/root /home/root/.ssh /home/root/.ssh/auth*
mkdir -p /sshkeys/root
v -d /sshkeys
chmod 700 /sshkeys/root
cp -p /home/root/.ssh/authorized_keys /sshkeys/root
ls -lR /sshkeys/root
exit
# Check back on Boss.
eval sudo ssh "$ssh_args" pc$pc id
# The following will likely complain due to nonstandard host keys.
rootpc $pc id
- Install the standard host keys, dated Jun 21 2001.
ls -l /etc/ssh*
# On boss.
set pc=136
set ssh_args='-o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null"'
eval sudo scp -rp "$ssh_args" /proj/testbed/fish/elab-host-keys root@pc$pc":"
eval sudo ssh "$ssh_args" root@pc$pc
# On the target.
# [On the target.]
id
cd ~root/.ssh
cat {id_dsa,identity}.pub > authorized_keys
chmod 644 *
ls -ld /home /home/root /home/root/.ssh /home/root/.ssh/auth*
mkdir -p /sshkeys/root
v -d /sshkeys
chmod 700 /sshkeys/root
cp -p /home/root/.ssh/authorized_keys /sshkeys/root
ls -lR /sshkeys/root
exit
# [Check back on Boss.]
eval sudo ssh "$ssh_args" pc$pc id
# The following will likely complain due to nonstandard host keys.
rootpc $pc id
- Install the standard host keys, dated Jun 21 2001.
ls -l /etc/ssh*
# [On boss.]
set pc=136
set ssh_args='-o "StrictHostKeyChecking no" -o "UserKnownHostsFile /dev/null"'
eval sudo scp -rp "$ssh_args" /proj/testbed/fish/elab-host-keys root@pc$pc":"
eval sudo ssh "$ssh_args" root@pc$pc
# [On the target.]
ls -l ~/elab-host-keys
ls -l /etc/ssh*key*
ls -l /etc/orig-ssh-keys
......@@ -192,162 +218,186 @@ daFluxGroup
chown SYSTEM /etc/ssh*key*
ls -l /etc/ssh*key*
# The following should no longer complain due to nonstandard host keys.
rootpc $pc id
# The following should no longer complain due to nonstandard host keys.
# [On Boss.]
rootpc $pc id
- Install tools: WinZip and Emacs.
# On boss:
sudo scp -rp /share/windows/emacs-21.3-fullbin-i386.tar.gz root@pc$pc":"/tmp
sudo scp -rp /share/windows/winzip90.exe root@pc$pc":"/tmp
# Log in as root via RDP.
# Graphical installer. Start with WinZip Classic, custon setup, no desktop icon.
/tmp/winzip90.exe
cd C:
# Don't worry about a plethora of "Cannot change ownership" warnings.
tar xfz /tmp/emacs-21.3-fullbin-i386.tar.gz
# Graphical, set up the registry, start menu, etc.
C:/emacs-21.3/bin/addpm.exe
Copy the Emacs shortcut to the All Users/Desktop folder.
# Make "emacs" be the NTEmacs runemacs starter, with "emacs-exe" for a compiler.
ln -s /cygdrive/c/emacs-21.3/bin/runemacs.exe /usr/local/bin/emacs
ln -s /cygdrive/c/emacs-21.3/bin/emacs.exe /usr/local/bin/emacs-exe
# [On boss:]
sudo scp -rp /share/windows/emacs-21.3-fullbin-i386.tar.gz root@pc$pc":"/tmp
sudo scp -rp /share/windows/winzip90.exe root@pc$pc":"/tmp
# Log in as root via RDP.
rootrd $pc
# [On the node, as root.]
# Graphical installer. Start with WinZip Classic, custon setup, no desktop icon.
/tmp/winzip90.exe
cd C:
# Don't worry about a plethora of "Cannot change ownership" warnings.
tar xfz /tmp/emacs-21.3-fullbin-i386.tar.gz
# Graphical, set up the registry, start menu, etc.
C:/emacs-21.3/bin/addpm.exe
# Then copy the Emacs shortcut to the All Users/Desktop folder.
# Make "emacs" be the NTEmacs runemacs starter, with "emacs-exe" for a compiler.
ln -s /cygdrive/c/emacs-21.3/bin/runemacs.exe /usr/local/bin/emacs
ln -s /cygdrive/c/emacs-21.3/bin/emacs.exe /usr/local/bin/emacs-exe
- Get other stuff that "make client" depends on.
# Include files for mysql and the Boost Graph Library.
cd $uli
tar cfz /share/windows/mysql-include.tgz mysql
tar cfz /share/windows/boost-include.tgz boost
# On Boss.
sudo scp -rp /share/windows/{mysql,boost}-include.tgz root@pc$pc":"/tmp
sudo scp -rp /share/windows/{WSName,addusers,usrtogrp,setx}.exe root@pc$pc":"/tmp
# On the target.
uli=/usr/local/include
mkdir $uli
cd $uli
tar xfz /tmp/mysql-include.tgz
tar xfz /tmp/boost-include.tgz
# Build Elvin libs with GCC for testbed client programs.
sudo scp -p /usr/testbed/www/distributions/*elvin*-4.0.3.tar.gz root@pc$pc":"/tmp
# (Need a path without embedded spaces for the make actions to work.)
mkdir C:/elvin
cd C:/elvin
# Don't worry about a plethora of "Cannot change ownership" warnings.
tar xfz /tmp/libelvin-4.0.3.tar.gz
tar xfz /tmp/elvind-4.0.3.tar.gz
cd C:/elvin/libelvin-4.0.3
# configure: error: Elvin requires that doubles be IEEE 754 compliant
# On XP w/ no SP's, edit configure, line 3547, add exit(0); to patch around it.
./configure >& configure.trace
tail configure.trace
# Comment out #elif defined(HAVE_WINBASE_H)
FreeLibrary(cat);
in c:/elvin/libelvin-4.0.3/src/lib/i18n.c
make >& make.log1
tail make.log1
make install >& install.log1
tail install.log1
make clean
SKIP[
# Build Elvin for Windows on Coke, and tar it up for later installation.
scp -p bos:"/usr/testbed/www/distributions/*elvin*-4.0.3.tar.gz" /tmp
mkdir C:/elvin
cd C:/elvin
tar xfz /tmp/libelvin-4.0.3.tar.gz
tar xfz /tmp/elvind-4.0.3.tar.gz
# Rename lib dir for makefiles in elvind.
mv libelvin-4.0.3 elvin4
cd C:/elvin/elvin4
nmake /k /f Makefile.win >& lib-make.winlog1
mkdir -p C:/Program\ Files/elvin4/{bin,lib,doc}
cp -p win32/bin/*.exe C:/Program\ Files/elvin4/bin
cp -p win32/lib/{,*/}*.{dll,lib} C:/Program\ Files/elvin4/lib
mkdir C:/Program\ Files/elvin4/include
cp -p src/include/elvin/*.h C:/Program\ Files/elvin4/include
cd C:/elvin/elvind-4.0.3
nmake /k /f Makefile.win >& program-make.winlog1
cp -p *.exe *.pem C:/Program\ Files/elvin4/bin
cp -p [A-Z][A-Z]* C:/Program\ Files/elvin4/doc
scp -p ../*/*.winlog* ops:/proj/testbed/fish/elvin
scp -p ops:/proj/testbed/fish/elvin-config /cygdrive/c/Program\ Files/elvin4/bin
# Install dll's in the system so the server can be run.
v C:/Program\ Files/elvin4/lib
chmod -R g-w C:/Program\ Files/elvin4
chmod a+x C:/Program\ Files/elvin4/lib/*
cp -p C:/Program\ Files/elvin4/lib/* $nts
elvin="C:/Program Files/elvin4/bin/elvinsvc.exe"
v "$elvin"
"$elvin" --help
# Application Error - The application failed to initialize properly (0xc0000022).
tar cfz /tmp/elvin4-windows.tar.gz -C /cygdrive/c Program\ Files/elvin4
scp -p /tmp/elvin4-windows.tar.gz ops:/share/windows
SKIP]
# Install the Windows Elvin, built on Coke above.
# On Boss.
sudo scp -p /share/windows/elvin4-windows.tar.gz root@pc$pc":"/tmp
sudo scp -p /share/windows/elvind.conf.windows root@pc$pc":"/tmp/elvind.conf
# On the experiment node as root (Bash shell):
rootpc $pc
cd C:
ls -ld Program\ Files/elvin*
tar xvfz /tmp/elvin4-windows.tar.gz
chown -R root Program\ Files/elvin4
cp -p C:/Program\ Files/elvin4/lib/* C:/WINDOWS/system32
cp -p C:/Program\ Files/elvin4/lib/* /usr/local/lib
diff /usr/local/etc/elvind_ssl.pem C:/Program\ Files/elvin4/bin/elvind_ssl.pem
cp -p C:/Program\ Files/elvin4/bin/elvind_ssl.pem /usr/local/etc/elvind_ssl.pem
elvind="C:/Program Files/elvin4"
elvin="$elvind/bin/elvinsvc.exe"
ls -l "$elvind/bin"
chmod -R g-w "C:/Program Files/elvin4"
"$elvin" --help &
# Install as a service.
"$elvin" -r
# Install a config file and set the path for the server.
diff /usr/local/etc/elvind.conf /tmp/elvind.conf
cp /tmp/elvind.conf /usr/local/etc/elvind.conf
ls -l /usr/local/etc/elvind.conf
"$elvin" -c `cygpath -w /usr/local/etc/elvind.conf`
## Testing: start elvinsvc from the Services Manager now.
# Make elvinsvc automatic in services manager.
## Remove "&& ! WINDOWS()" from $ftcc/rc.bootsetup.
pid=testbed eid=Windows-1
pid=testbed eid=Windows-1b
pid=testbed eid=Windows-1c
$BINDIR/evproxy -s event-server -e $pid/$eid
## Uncomment rc.progagent in $ftcc/rc.config
ps -Welf | grep program-agent
$rc/rc.progagent shutdown
$rc/rc.progagent boot
tail $LOGDIR/progagent.debug
# Could not become user: fish
# setuid(pw->pw_uid) $ftep/program-agent.c:560.
program-agent -d -e $pid/$eid -s localhost -c /var/emulab/boot/progagents
# On ops.
tevc -e testbed/Windows-1c now prog0 start \
COMMAND="bash -c 'date; hostname' > /tmp/host.txt"
# On the node.
tail /tmp/host.txt
cat /local/logs/prog0.status
# Root must have these rights: Create a token object; Replace a
## Collect the include files for mysql and the Boost Graph Library.
cd /usr/local/include
tar cfz /share/windows/mysql-include.tgz mysql
tar cfz /share/windows/boost-include.tgz boost
# [On Boss.]
sudo scp -rp /share/windows/{mysql,boost}-include.tgz root@pc$pc":"/tmp
sudo scp -rp /share/windows/{WSName,addusers,usrtogrp,setx}.exe root@pc$pc":"/tmp
# [On the target.]
mkdir /usr/local/include
cd /usr/local/include
tar xfz /tmp/mysql-include.tgz
tar xfz /tmp/boost-include.tgz
# Build Elvin libs with GCC for testbed client programs.
# [On Boss.]
sudo scp -p /usr/testbed/www/distributions/*elvin*-4.0.3.tar.gz root@pc$pc":"/tmp
# [On the node.]
# Need a path without embedded spaces for the make actions to work.
mkdir C:/elvin
cd C:/elvin
# Don't worry about a plethora of "Cannot change ownership" warnings.
tar xfz /tmp/libelvin-4.0.3.tar.gz
tar xfz /tmp/elvind-4.0.3.tar.gz
cd C:/elvin/libelvin-4.0.3
# configure: error: Elvin requires that doubles be IEEE 754 compliant
# On XP w/ no SP's, edit configure, line 3547, add exit(0); to patch around it.
./configure >& configure.trace
tail configure.trace
# Comment out #elif defined(HAVE_WINBASE_H)
FreeLibrary(cat);
in c:/elvin/libelvin-4.0.3/src/lib/i18n.c
make >& make.log1
tail make.log1
make install >& install.log1
tail install.log1
make clean
# SKIP[
# Build Elvin for Windows on Coke, and tar it up for later installation.
scp -p bos:"/usr/testbed/www/distributions/*elvin*-4.0.3.tar.gz" /tmp
mkdir C:/elvin
cd C:/elvin
tar xfz /tmp/libelvin-4.0.3.tar.gz
tar xfz /tmp/elvind-4.0.3.tar.gz
# Rename lib dir for makefiles in elvind.
mv libelvin-4.0.3 elvin4
cd C:/elvin/elvin4
nmake /k /f Makefile.win >& lib-make.winlog1
mkdir -p C:/Program\ Files/elvin4/{bin,lib,doc}
cp -p win32/bin/*.exe C:/Program\ Files/elvin4/bin
cp -p win32/lib/{,*/}*.{dll,lib} C:/Program\ Files/elvin4/lib
mkdir C:/Program\ Files/elvin4/include
cp -p src/include/elvin/*.h C:/Program\ Files/elvin4/include
cd C:/elvin/elvind-4.0.3
nmake /k /f Makefile.win >& program-make.winlog1
cp -p *.exe *.pem C:/Program\ Files/elvin4/bin
cp -p [A-Z][A-Z]* C:/Program\ Files/elvin4/doc
scp -p ../*/*.winlog* ops:/proj/testbed/fish/elvin
scp -p ops:/proj/testbed/fish/elvin-config /cygdrive/c/Program\ Files/elvin4/bin
# Install dll's in the system so the server can be run.
v C:/Program\ Files/elvin4/lib
chmod -R g-w C:/Program\ Files/elvin4
chmod a+x C:/Program\ Files/elvin4/lib/*
cp -p C:/Program\ Files/elvin4/lib/* $nts
elvin="C:/Program Files/elvin4/bin/elvinsvc.exe"
v "$elvin"
"$elvin" --help
# Application Error - The application failed to initialize properly (0xc0000022).
tar cfz /tmp/elvin4-windows.tar.gz -C /cygdrive/c Program\ Files/elvin4
scp -p /tmp/elvin4-windows.tar.gz ops:/share/windows
# SKIP]
# Install the Windows Elvin, built on Coke above.
# [On Boss.]
sudo scp -p /share/windows/elvin4-windows.tar.gz root@pc$pc":"/tmp
sudo scp -p /share/windows/elvind.conf.windows root@pc$pc":"/tmp/elvind.conf
# [On the experiment node as root (Bash shell):]
rootpc $pc
cd C:
ls -ld Program\ Files/elvin*
tar xvfz /tmp/elvin4-windows.tar.gz
chown -R root Program\ Files/elvin4
cp -p C:/Program\ Files/elvin4/lib/* C:/WINDOWS/system32
cp -p C:/Program\ Files/elvin4/lib/* /usr/local/lib
diff /usr/local/etc/elvind_ssl.pem C:/Program\ Files/elvin4/bin/elvind_ssl.pem
cp -p C:/Program\ Files/elvin4/bin/elvind_ssl.pem /usr/local/etc/elvind_ssl.pem
elvind="C:/Program Files/elvin4"
elvin="$elvind/bin/elvinsvc.exe"
ls -l "$elvind/bin"
chmod -R g-w "C:/Program Files/elvin4"
"$elvin" --help &
# Install as a service.
"$elvin" -r
# Install a config file and set the path for the server.
diff /usr/local/etc/elvind.conf /tmp/elvind.conf
cp /tmp/elvind.conf /usr/local/etc/elvind.conf
ls -l /usr/local/etc/elvind.conf
"$elvin" -c `cygpath -w /usr/local/etc/elvind.conf`
## Testing: start elvinsvc from the Services Manager now.
# Make elvinsvc automatic in services manager, or use these commands:
regtool -v list /HKLM/SYSTEM/CurrentControlSet/Services/elvinsvc.exe
# (4 is Disabled, 3 is Manual, 2 is Automatic, 1 is only used for System services.)
regtool -v set /HKLM/SYSTEM/CurrentControlSet/Services/elvinsvc.exe/Start 2
# SKIP[
## Use any Windows experiment with a Program object in it for testing.
pid=testbed eid=Windows-1
pid=testbed eid=Windows-1b
pid=testbed eid=Windows-1c
$BINDIR/evproxy -s event-server -e $pid/$eid
## program-agent debugging.
ps -Welf | grep program-agent
$rc/rc.progagent shutdown
$rc/rc.progagent boot
## Debugging.
tail $LOGDIR/progagent.debug
program-agent -d -e $pid/$eid -s localhost -c /var/emulab/boot/progagents
# [On ops.]
tevc -e testbed/Windows-1c now prog0 start \
COMMAND="bash -c 'date; hostname' > /tmp/host.txt"
# [On the node.]
tail /tmp/host.txt
cat /local/logs/prog0.status
## C:\cygwin\bin\tcsh.exe (2504): *** couldn't create window, Win32 error 5
## See http://comments.gmane.org/gmane.os.cygwin.patches/2559
## This is at cygwin-1.5.17-1-winsup/cygwin/window.cc:wininfo::winthread():96
## Try starting rc.progagent as a separate service with -i for a desktop.
## Started up and stopped immediately. Needs something else in rc.bootsetup.
--dep elvinsvc.exe \
## Depend on EmulabStartup (rc.bootsetup), which depends on the elvin service,
## and also starts evproxy. But it stops rather than staying running... </