Commit c8b39d4b authored by Kevin Atkinson's avatar Kevin Atkinson

Added notes on creating a testbed image from a fresh FC4 install.

parent 3eb99a18
#
# Stuff to do in order to make a fresh FC4 testbed ready
#
#
# NOTE: Not meant to be run as a script.
# SO DON'T!
#
##
##
testbed_src=/z/testbed
etc_patches=${testbed_src}/doc/updating-RHL/etc-patches
tarbars=/proj/utahstud/users/kevina/FC4/tarbars
tz=MST7MDT
## Mount /share to make some things easier.
##
cd /
mkdir -p "/share"
mount -o hard,intr,udp "fs:/share" "/share"
## Disable kudzu at boot-time.
/sbin/chkconfig kudzu off
## Kill off CUPS.
/sbin/chkconfig cups off
## Enable ssh 1
##
patch /etc/ssh/sshd_config < $etc_patches/sshd_config.patch
## run `ntp' at run levels 2--5. (`/etc/inittab' described the levels.)
##
/sbin/chkconfig --level 2345 ntpd on
## Install an appropriate /etc/inittab:
## - Run a getty in ttyS0
## - Do not run getty's for most virtual consoles (tty1, ...)
##
patch /etc/inittab < $etc_patches/inittab.patch
## Enable root logins on ttyS0.
##
patch /etc/securetty < $etc_patches/securetty.patch
## Enable all wheel members to `sudo'.
##
...
## Log `ssh' logins to `users.emulab.net'.
##
patch /etc/syslog.conf < $etc_patches/syslog.conf.patch
# * /etc/localtime
# Copy the correct file over from /usr/share/zoneinfo
#
rm -f /etc/localtime
install -o root -g root -m 644 "/usr/share/zoneinfo/${tz}" /etc/localtime
####
# Make the default locale "C"
patch /etc/sysconfig/i18n < $etc_patches/sysconfig-i18n.patch
## Add sbin to path for all users not just root
##
patch /etc/profile < $etc_patches/profile
patch /etc/csh.login < $etc_patches/csh.login.patch
###############################################################################
## Install Keys
## emulab-keys.tar.gz created by running
## sh ${testbed_src}/doc/updating-RHL/tar-keys
## on an exiting node
tar xfvz $tarbars/emulab-keys.tar.gz
# * /etc/emulab/shadow
# Change the root password, this file will get installed by prepare.
#
#install -o root -g root -m 600 {"${image_root}",}/etc/emulab/shadow
#
#NOTE: I just had Kirk reset it manually
###############################################################################
# We must look in /usr/local/lib.
#
patch /etc/ld.so.conf < $etc_patches/ld.so.conf.patch
###############################################################################
## Install "our version of the elvin libraries."
##
cd "${local_build_root}"
wget "http://www.emulab.net/downloads/libelvin-4.0.3.tar.gz"
tar zxf libelvin-4.0.3.tar.gz
wget "http://www.emulab.net/downloads/libelvin-4.0.3.patch"
patch -p0 < libelvin-4.0.3.patch
cd libelvin-4.0.3
#
# Ancient software. Without `-fno-strict-aliasing', the `configure' script
# dies. It's not at all clear to me if `-fno-strict-aliasing' is required for
# elvin itself.
export CC=gcc32
export CFLAGS="-g -O2 -fno-strict-aliasing"
#
# Need these to find the Kerberos support, for SSL stuff.
export CPPFLAGS="`/usr/kerberos/bin/krb5-config --cflags`"
export LIBS="`/usr/kerberos/bin/krb5-config --libs`"
./configure
gmake
gmake install
unset CC CFLAGS CPPFLAGS LIBS
## We now also require the actual `elvind'.
##
cd "${local_build_root}"
export CC=gcc32
wget "http://www.emulab.net/downloads/elvind-4.0.3.tar.gz"
tar zxf elvind-4.0.3.tar.gz
wget "http://www.emulab.net/downloads/elvind-4.0.3.patch"
patch -p0 < elvind-4.0.3.patch
cd elvind-4.0.3
./configure
gmake
gmake install
unset CC
## Install Boost.
## See <http://www.boost.org/more/getting_started.html>
##
cd "${local_build_root}"
cp -p $tarbars/boost_1_31_0.tar.bz2 .
# wget "http://unc.dl.sourceforge.net/sourceforge/boost/boost_1_31_0.tar.bz2"
tar jxf boost_1_31_0.tar.bz2
# First, one must build their builder, `bjam'.
cd boost_1_31_0/tools/build/jam_src
sh ./build.sh
install -m 755 bin.linuxx86/bjam /usr/local/bin
ln /usr/local/bin/bjam /usr/local/bin/jam
cd "${local_build_root}"/boost_1_31_0
bjam -sTOOLS=gcc --with-python-root=/usr install
# I'm not sure if this is standard, but it is needed for the Emulab client
# stuff:
#
ln -s boost-1_31/boost /usr/local/include/boost
## Install the Emulab client stuff. XXX --- the current way of getting the
## source is icky.
##
export CVS_RSH=ssh
cd "${local_build_root}"
# cvs -d ... co testbed
#
cd testbed
./configure
gmake client
gmake client-install
## Install `gated'.
## XXX --- compile w/o debugging?
##
#cd "${local_build_root}"
## wget http://ftp.rge.com/pub/networking/gated/gated-3-6.tar.gz
#wget http://www.funet.fi/pub/unix/tcpip/gated/gated-3-6.tar.gz
#tar zxf gated-3-6.tar.gz
#cd gated-public-3_6
#./configure
#gmake depend
#gmake
#gmake install
## Installs just `/usr/local/sbin/gated'.
# Version built from source doesn't work, install RHL7.3 RPM instead
rpm -i /share/redhat/7.3/RPMS/gated-3.6-14.i386.rpm
###############################################################################
##
## Add/remove rpms.
##
# Done manually, see FC4-rpm-remove.sh and FC4-yum-install.txt
###############################################################################
##
## Install Lilo
##
cd /
tar xfz $tarbars/lilo-emulab.tar.gz
cp /z/testbed/doc/updating-RHL/FC4-lilo.conf /etc/lilo.conf
/sbin/lilo
#
# NOW REBOOT TO MAKE SURE IT WORKS
#
# Remove all traces of grub, but backup "/boot/grub" incase we want
# to reinstall grub at a latter date
rpm -e grub
cd /boot
tar cfvz grub.tar.gz grub/*
rm -r grub
###############################################################################
## Install pathrate.
##
cd "${local_build_root}"
wget http://www.cc.gatech.edu/fac/Constantinos.Dovrolis/pathrate.tar.gz
tar zxf pathrate.tar.gz
cd pathrate_2.4.0
./configure
# XXX Build w/o -g?
gmake
# No install target
install -o root -g root -m 755 pathrate_rcv pathrate_snd /usr/local/bin
install -d -o root -g root -m 755 /usr/local/share/doc/pathrate
install -o root -g root -m 644 CHANGES README /usr/local/share/doc/pathrate
## Install rude/crude.
##
cd "${local_build_root}"
wget http://unc.dl.sourceforge.net/sourceforge/rude/rude-0.70.tar.gz
tar zxf rude-0.70.tar.gz
cd rude
./configure
gmake
gmake install
###############################################################################
## Install kernel
#...
#
# Once it works remove old kernel??
#
# It takes about 49 megs
#
# rm -r /lib/modules/2.6.11-1.1369_FC4
# rm /boot/*2.6.11-1.1369_FC4*
timeout=50
default=linux
boot=/dev/hda2
map=/boot/map
install=/boot/boot.b
serial=0,115200n8
lba32
ignore-table
prompt
image=/boot/vmlinuz-2.6.11-1.1369_FC4
label=linux
alias=emulab
read-only
root=/dev/hda2
initrd=/boot/initrd-2.6.11-1.1369_FC4.img
append="console=tty0 console=ttyS0,115200"
Here is the final list of installed rpms on the FC4 image:
4Suite-1.0-8.b1
MAKEDEV-3.19-1
PyXML-0.8.4-3
SysVinit-2.85-39
Xaw3d-1.5E-4
acl-2.2.23-8
acpid-1.0.4-1
anacron-2.3-34
arpwatch-2.1a13-13.FC4
aspell-0.50.5-6
aspell-en-0.51-12
at-3.1.8-77_FC4
atk-1.9.1-1
attr-2.4.16-5
audit-0.8.2-1
audit-libs-0.8.2-1
autoconf-2.59-5
autofs-4.1.4-5
automake-1.9.5-1
automake14-1.4p6-12
automake15-1.5-13
automake16-1.6.3-5
automake17-1.7.9-6
basesystem-8.0-5
bash-3.0-31
bc-1.06-18
beecrypt-4.1.2-8
bind-libs-9.3.1-4
bind-utils-9.3.1-4
binutils-2.15.94.0.2.2-2
bison-2.0-6
bitmap-fonts-0.3-4
bluez-hcidump-1.18-1
bluez-libs-2.15-1
boost-1.32.0-6
boost-devel-1.32.0-6
byacc-1.9-29
bzip2-1.0.2-16
bzip2-devel-1.0.2-16
bzip2-libs-1.0.2-16
checkpolicy-1.23.1-1
chkconfig-1.3.20-1
chkfontpath-1.10.0-4
ckermit-8.0.211-1
compat-gcc-32-3.2.3-47.fc4
compat-gcc-32-c++-3.2.3-47.fc4
compat-libstdc++-33-3.2.3-47.fc4
coreutils-5.2.1-48
cpio-2.6-7
cpp-4.0.0-8
cpuspeed-1.2.1-1.21
cracklib-2.8.2-1
cracklib-dicts-2.8.2-1
crash-3.10-13
crontabs-1.10-7
cscope-15.5-12
ctags-5.5.4-3
cups-1.1.23-15
cups-libs-1.1.23-15
curl-7.13.1-3
cvs-1.11.19-8
cyrus-sasl-2.1.20-5
cyrus-sasl-md5-2.1.20-5
db4-4.3.27-3
db4-devel-4.3.27-3
db4-utils-4.3.27-3
dbus-0.33-3
dbus-devel-0.33-3
dbus-glib-0.33-3
dbus-python-0.33-3
device-mapper-1.01.02-1.0
dhclient-3.0.2-12
dhcpv6_client-0.10-13
dialog-1.0.20050306-1
diffstat-1.38-2
diffutils-2.8.1-15
diskdumputils-1.0.1-6
distcache-1.4.5-7
dmidecode-2.6-1.14
dmraid-1.0.0.rc8-FC4_5
dos2unix-3.1-24
dosfstools-2.10-3
dump-0.4b40-2
e2fsprogs-1.37-4
e2fsprogs-devel-1.37-4
ed-0.2-38
elfutils-0.108-1
elfutils-libelf-0.108-1
elinks-0.10.3-3.1
emacs-21.4-5
emacs-common-21.4-5
emacs-leim-21.4-5
emacspeak-21.0-2
enscript-1.6.1-31
ethtool-3-1
expat-1.95.8-6
expat-devel-1.95.8-6
expect-5.43.0-1
fedora-logos-1.1.31-1
fedora-release-4-2
file-4.13-4
filesystem-2.3.4-1
findutils-4.2.20-1
finger-0.17-28
flex-2.5.4a-34
fontconfig-2.2.3-13
fontconfig-devel-2.2.3-13
fonts-xorg-100dpi-6.8.2-1
fonts-xorg-75dpi-6.8.2-1
fonts-xorg-base-6.8.2-1
freeglut-2.2.0-16
freetype-2.1.9-2
freetype-devel-2.1.9-2
ftp-0.17-26
gamin-0.1.1-1.FC4
gated-3.6-14
gawk-3.1.4-5.2
gcc-4.0.0-8
gcc-c++-4.0.0-8
gcc-gfortran-4.0.0-8
gd-2.0.33-2
gdb-6.3.0.0-1.21
gdbm-1.8.0-25
gdbm-devel-1.8.0-25
gdk-pixbuf-0.22.0-18
gettext-0.14.3-1
glib-1.2.10-16
glib-devel-1.2.10-16
glib2-2.6.4-1
glib2-devel-2.6.4-1
glibc-2.3.5-10
glibc-common-2.3.5-10
glibc-devel-2.3.5-10
glibc-headers-2.3.5-10
glibc-kernheaders-2.4-9.1.94
gmp-4.1.4-6
gmp-devel-4.1.4-6
gnupg-1.4.1-3
gpg-pubkey-1ac70ce6-41bebeef
gpg-pubkey-4f2a6fd2-3f9d9d3b
gpm-1.20.1-71
grep-2.5.1-48
groff-1.18.1.1-5
gtk+-1.2.10-39
gtk+-devel-1.2.10-39
gtk2-2.6.7-4
gzip-1.3.5-6
hardlink-1.0-1.13
hdparm-5.9-1
hesiod-3.0.2-31
hexedit-1.2.10-4
hotplug-2004_09_23-7
howl-0.9.8-3
howl-libs-0.9.8-3
hwdata-0.158.1-1
indent-2.2.9-8
info-4.8-4
initscripts-8.11.1-1
iproute-2.6.11-1
ipsec-tools-0.5-4
iptables-1.3.0-2
iptstate-1.4-1.1
iputils-20020927-22
joe-3.1-8
jpackage-utils-1.6.3-1jpp_1rh
jwhois-3.2.2-14
kernel-2.6.11-1.1369_FC4
kernel-devel-2.6.11-1.1369_FC4
krb5-devel-1.4-3
krb5-libs-1.4-3
krb5-workstation-1.4-3
ksh-20050202-1
less-382-7
lftp-3.1.3-1
libacl-2.2.23-8
libacl-devel-2.2.23-8
libattr-2.4.16-5
libattr-devel-2.4.16-5
libcap-1.10-22
libgcc-4.0.0-8
libgcrypt-1.2.1-1
libgfortran-4.0.0-8
libgpg-error-1.0-2
libidn-0.5.15-1
libidn-devel-0.5.15-1
libjpeg-6b-34
libpcap-0.8.3-13.FC4
libpng-1.2.8-2
libselinux-1.23.10-2
libselinux-devel-1.23.10-2
libsepol-1.5.9-2
libstdc++-4.0.0-8
libstdc++-devel-4.0.0-8
libtermcap-2.0.8-41
libtermcap-devel-2.0.8-41
libtiff-3.7.1-6
libtool-1.5.16.multilib2-1
libungif-4.1.3-3
libusb-0.1.10a-1
libusb-devel-0.1.10a-1
libuser-0.53.7-1
libuser-devel-0.53.7-1
libxml2-2.6.19-1
libxml2-devel-2.6.19-1
libxml2-python-2.6.19-1
libxslt-1.1.14-2
lm_sensors-2.8.8-5
lm_sensors-devel-2.8.8-5
lockdev-1.0.1-7
lockdev-devel-1.0.1-7
logrotate-3.7.1-10
logwatch-6.0.1-2
lrzsz-0.12.20-21
lsof-4.74-7
ltrace-0.3.36-3
lvm2-2.01.08-2.1
lynx-2.8.5-23
m4-1.4.3-1
mailcap-2.1.19-1
mailx-8.1.1-44
make-3.80-7
man-1.5p-4
man-pages-1.67-7
mdadm-1.11.0-4.fc4
mgetty-1.1.33-1
mingetty-1.07-5
minicom-2.00.0-21
mkbootdisk-1.5.2-5
mkinitrd-4.2.15-1
mktemp-1.5-23
module-init-tools-3.1-3
mtools-3.9.9-13
mtr-0.69-3
nano-1.3.5-0.20050302
nc-1.78-2
ncftp-3.1.9-1
ncurses-5.4-17
ncurses-devel-5.4-17
neon-0.24.7-6
neon-devel-0.24.7-6
net-tools-1.60-52
netdump-0.7.7-6
nfs-utils-1.0.7-8
nmap-3.81-3
nss_db-2.2-31
ntp-4.2.0.a.20040617-8
numactl-0.6.4-1.18
open-1.4-24
openldap-2.2.23-5
openldap-clients-2.2.23-5
openssh-4.0p1-3
openssh-clients-4.0p1-3
openssh-server-4.0p1-3
openssl-0.9.7f-7
openssl-devel-0.9.7f-7
pam-0.79-8
pam-devel-0.79-8
pam_ccreds-1-6
pam_passwdqc-0.7.6-1
pango-1.8.1-2
parted-1.6.22-3.FC4
passwd-0.69-2
patch-2.5.4-24
patchutils-0.2.30-4
pax-3.0-11
pciutils-2.1.99.test8-10
pcre-5.0-4
pcre-devel-5.0-4
perl-5.8.6-15
perl-BSD-Resource-1.24-3
perl-Compress-Zlib-1.34-2
perl-Convert-ASN1-0.19-1
perl-Crypt-SSLeay-0.51-6
perl-DateManip-5.42a-4
perl-Filter-1.30-7
perl-HTML-Parser-3.45-1
perl-HTML-Tagset-3.04-1
perl-LDAP-0.33-1
perl-Parse-Yapp-1.05-33
perl-URI-1.35-2
perl-XML-Dumper-0.71-4
perl-XML-Encoding-1.01-27
perl-XML-Grove-0.46alpha-27
perl-XML-LibXML-1.58-2
perl-XML-LibXML-Common-0.13-8
perl-XML-NamespaceSupport-1.08-7
perl-XML-Parser-2.34-6
perl-XML-SAX-0.12-7
perl-XML-Twig-3.17-1
perl-libwww-perl-5.803-2
perl-libxml-enno-1.02-31
perl-libxml-perl-0.08-1
pkgconfig-0.15.0-6
policycoreutils-1.23.10-2
popt-1.10.1-21
portmap-4.0-65
prelink-0.3.4-3
procmail-3.22-16
procps-3.2.5-6
psacct-6.3.2-37
psmisc-21.5-4
pstack-1.2-4
python-2.4.1-2
python-devel-2.4.1-2
python-elementtree-1.2.6-4
python-ldap-2.0.6-4
python-sqlite-1.1.6-1
python-urlgrabber-2.9.6-1
quagga-0.98.3-2
quota-3.12-6
rcs-5.7-28
rdate-1.4-4
readline-5.0-3
readline-devel-5.0-3
redhat-lsb-1.3-10
redhat-rpm-config-8.0.34-1
rmt-0.4b40-2
rootfiles-8.1-1
rpm-4.4.1-21
rpm-build-4.4.1-21
rpm-devel-4.4.1-21
rpm-libs-4.4.1-21
rpm-python-4.4.1-21
rsh-0.17-29
rsync-2.6.4-3
schedutils-1.4.0-4
screen-4.0.2-9
sed-4.1.4-1
selinux-policy-targeted-1.23.18-12
sendmail-8.13.4-2
setarch-1.7-3
setools-2.1.0-5
setserial-2.17-19
setup-2.5.44-1
sgml-common-0.6.3-17
shadow-utils-4.0.7-9
shared-mime-info-0.16-3
slang-1.4.9-17
slang-devel-1.4.9-17
slocate-2.7-22
specspo-9.0.92-1.3
sqlite-3.1.2-3
sqlite-devel-3.1.2-3
startup-notification-0.8-2
statserial-1.1-38
strace-4.5.11-1
stunnel-4.08-2
sudo-1.6.8p8-2.2
swig-1.3.24-2
symlinks-1.2-24
sysklogd-1.4.1-30
syslinux-3.08-2
sysreport-1.4.1-2
tar-1.15.1-5
tcl-8.4.9-3
tclx-8.3.5-6
tcp_wrappers-7.6-39
tcpdump-3.8.2-13.FC4
tcsh-6.14-1
telnet-0.17-35
termcap-5.4-4
tftp-0.40-6
time-1.7-27
tk-8.4.9-3
tmpwatch-2.9.3-1
traceroute-1.4a12-26
ttmkfdir-3.0.9-16
tux-3.2.18-4
tzdata-2005i-2
udev-058-1
unix2dos-2.2-26
unzip-5.51-10
urw-fonts-2.3-1
usermode-1.80-1
utempter-0.5.5-6
util-linux-2.12p-9.5
valgrind-2.4.0-2
valgrind-callgrind-0.9.11-1
vconfig-1.8-7
vim-X11-6.3.071-3
vim-common-6.3.071-3
vim-enhanced-6.3.071-3
vim-minimal-6.3.071-3
vixie-cron-4.1-33
wget-1.9.1-22
which-2.16-6
wireless-tools-28-0.pre4.3
words-3.0-7
xinitrc-4.0.18-1
xorg-x11-6.8.2-37
xorg-x11-Mesa-libGL-6.8.2-37
xorg-x11-Mesa-libGLU-6.8.2-37
xorg-x11-devel-6.8.2-37
xorg-x11-font-utils-6.8.2-37
xorg-x11-libs-6.8.2-37
xorg-x11-tools-6.8.2-37
xorg-x11-xauth-6.8.2-37
xorg-x11-xfs-6.8.2-37
xterm-200-6
yum-2.3.2-7
zip-2.3-30
zlib-1.2.2.2-3
zlib-devel-1.2.2.2-3
zsh-4.2.1-2
--- /etc/csh.login~ 2004-11-18 13:12:54.000000000 -0700
+++ /etc/csh.login 2005-06-30 03:37:42.000000000 -0600
@@ -7,11 +7,7 @@
setenv PATH "${PATH}:/usr/X11R6/bin"
endif
else
- if ( $uid == 0 ) then
- setenv PATH "/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"
- else
- setenv PATH "/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"
- endif
+ setenv PATH "/sbin:/usr/sbin:/usr/local/sbin:/bin:/usr/bin:/usr/local/bin:/usr/X11R6/bin"
endif
limit coredumpsize 0
--- /etc/inittab 2005-06-27 22:34:24.000000000 -0700
+++ /etc/inittab.orig 2005-06-27 22:33:44.000000000 -0700
@@ -43,11 +43,12 @@
# Run gettys in standard runlevels
1:2345:respawn:/sbin/mingetty tty1
-2:2345:respawn:/sbin/mingetty tty2
-3:2345:respawn:/sbin/mingetty tty3
-4:2345:respawn:/sbin/mingetty tty4
-5:2345:respawn:/sbin/mingetty tty5
-6:2345:respawn:/sbin/mingetty tty6
+# 2:2345:respawn:/sbin/mingetty tty2
+# 3:2345:respawn:/sbin/mingetty tty3
+# 4:2345:respawn:/sbin/mingetty tty4
+# 5:2345:respawn:/sbin/mingetty tty5
+# 6:2345:respawn:/sbin/mingetty tty6
+S0:2345:respawn:/sbin/agetty -L 115200 ttyS0 vt100
# Run xdm in runlevel 5
x:5:once:/etc/X11/prefdm -nodaemon
--- /etc/ld.so.conf~ 2005-05-30 05:15:10.000000000 -0600
+++ /etc/ld.so.conf 2005-06-28 00:23:57.000000000 -0600
@@ -1 +1,2 @@
include ld.so.conf.d/*.conf
+/usr/local/lib
--- /etc/profile~ 2005-04-15 14:49:52.000000000 -0600
+++ /etc/profile 2005-06-30 03:35:05.000000000 -0600
@@ -13,12 +13,9 @@
fi
}
-# Path manipulation
-if [ $EUID = 0 ]; then
- pathmunge /sbin
- pathmunge /usr/sbin
- pathmunge /usr/local/sbin
-fi
+pathmunge /sbin
+pathmunge /usr/sbin
+pathmunge /usr/local/sbin
pathmunge /usr/X11R6/bin after
--- /etc/securetty 2003-02-17 09:47:17.000000000 -0700
+++ /z/image/etc/securetty 2004-05-05 15:04:15.000000000 -0700
@@ -21,3 +21,4 @@
tty9
tty10
tty11
+ttyS0
--- /etc/ssh/sshd_config~ 2005-05-16 11:36:13.000000000 -0600
+++ /etc/ssh/sshd_config 2005-06-24 23:31:26.000000000 -0600
@@ -11,8 +11,8 @@
# default value.
#Port 22
-#Protocol 2,1
-Protocol 2
+Protocol 2,1
+#Protocol 2
#AddressFamily any
#ListenAddress 0.0.0.0
#ListenAddress ::
--- /etc/sysconfig/i18n~ 2005-06-14 18:12:59.000000000 -0600
+++ /etc/sysconfig/i18n 2005-06-28 01:19:10.000000000 -0600
@@ -1,3 +1,3 @@
-LANG="en_US.UTF-8"