Commit 59a919f4 authored by Kevin Atkinson's avatar Kevin Atkinson

Updated doc. on Creating a FC4 Image.

parent 17dc7a22
# Make sure you are using Bash
# Copy and replace each line and be sure to manually fix any errors
# Adjust These Variables As Approate
export SRC=/z/src TESTBED=/z/testbed
export VER=2.6.12 EXTRA=1.1390_FC4-emulab-1
export IPOD=patch-linux-2.6.12-1.1387_FC4
# chdir
cd $SRC
# copy
cp -r linux-$VER-1.1390_FC4 linux-$VER-$EXTRA
# chdir
cd linux-$VER-$EXTRA
# patch ipod
patch -p1 < $TESTBED/ipod/$IPOD
# copy config
cp $TESTBED/doc/updating-RHL/FC4-config-$VER .config
# update kernel version
perl -i.orig -p -e "s/^EXTRAVERSION\s*=.+/EXTRAVERSION = -$EXTRA/" Makefile
# config
make oldconfig
make bzImage && make modules
sudo make modules_install
sudo make install
# fix lilo.conf
sudo lilo
sudo cp .config /boot/config-$VER-$EXTRA
# Now Reboot to make sure everything works
#
# Stuff to do in order to make a fresh FC4 testbed ready
#
#
# NOTE: Not meant to be run as a script.
# SO DON'T!
# Copy and past into bash
#
##
##
export testbed_src=/z/testbed
export etc_patches=${testbed_src}/doc/updating-RHL/etc-patches
export tarbars=/proj/utahstud/users/kevina/FC4/tarbars
expoort 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
###############################################################################
##
## Update to latest version. Note this may also update the kernel, in
## which case you should recompile it. See below
##
yum update
###############################################################################
##
## Install Lilo
##
cd /
tar xfz $tarbars/lilo-emulab.tar.gz
cp /z/testbed/doc/updating-RHL/FC4-lilo.conf /etc/lilo.conf
/sbin/lilo
# if lilo fails then edit /etc/lilo.conf lilo.conf and try again
#
# 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
# Redhat no longer ships a seperate RPM for the kernel source. You
# have to use the source RPM:
# Edit $testbed_src/doc/updating-RHL/fetch-kernel-source.sh
# than: "bash $testbed_src/doc/updating-RHL/"
# Now go through $testbed_src/doc/FC4-build-kernel.txt
# Once it works remove old kernel??
# but since that is provided via the kernel rpm that might brake
# some things
#
# It takes about 49 megs
#
# rm -r /lib/modules/2.6.11-1.1369_FC4
# rm /boot/*2.6.11-1.1369_FC4*
###############################################################################
When all done testing create a final image.
# Drop into single user mode
init 1
# Prep the image
yum clean all
find /var/cache/man -name -type f | xargs rm
/usr/local/etc/emulab/prepare
# Create an image via the web interface. A few seconds after
# confirming the image creation reboot the machine. Since the machine
# is in single user mode the emulab scripts won't be able to ssh in
# to reboot. Don't give it a change to ipod or power cycle the
# machine as the disk may get corrupted.
This diff is collapsed.
......@@ -8,10 +8,9 @@ lba32
ignore-table
prompt
image=/boot/vmlinuz-2.6.11-1.1369_FC4
image=/boot/vmlinuz-2.6.12-1.1390_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"
initrd=/boot/initrd-2.6.12-1.1390_FC4.img
append="console=tty0 console=ttyS0,115200 root=LABEL=/"
Here is the final list of installed rpms on the FC4 image:
Here is the final list of installed rpms on the FC4 image as of 2005-07-13:
4Suite-1.0-8.b1
MAKEDEV-3.19-1
......@@ -29,7 +29,7 @@ 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
binutils-2.15.94.0.2.2-2.1
bison-2.0-6
bitmap-fonts-0.3-4
bluez-hcidump-1.18-1
......@@ -141,7 +141,7 @@ gnupg-1.4.1-3
gpg-pubkey-1ac70ce6-41bebeef
gpg-pubkey-4f2a6fd2-3f9d9d3b
gpm-1.20.1-71
grep-2.5.1-48
grep-2.5.1-48.2
groff-1.18.1.1-5
gtk+-1.2.10-39
gtk+-devel-1.2.10-39
......@@ -152,8 +152,6 @@ 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
......@@ -166,8 +164,7 @@ 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
kernel-2.6.12-1.1390_FC4
krb5-devel-1.4-3
krb5-libs-1.4-3
krb5-workstation-1.4-3
......@@ -202,9 +199,9 @@ 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
libxml2-2.6.20-1.FC4
libxml2-devel-2.6.20-1.FC4
libxml2-python-2.6.20-1.FC4
libxslt-1.1.14-2
lm_sensors-2.8.8-5
lm_sensors-devel-2.8.8-5
......@@ -298,7 +295,7 @@ popt-1.10.1-21
portmap-4.0-65
prelink-0.3.4-3
procmail-3.22-16
procps-3.2.5-6
procps-3.2.5-6.3
psacct-6.3.2-37
psmisc-21.5-4
pstack-1.2-4
......@@ -328,7 +325,7 @@ 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
selinux-policy-targeted-1.25.1-7
sendmail-8.13.4-2
setarch-1.7-3
setools-2.1.0-5
......@@ -401,6 +398,6 @@ 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
zlib-1.2.2.2-4.fc4
zlib-devel-1.2.2.2-4.fc4
zsh-4.2.1-2
rpm -e samba-common samba system-config-samba samba-client
rpm -e system-config-printer hal-cups-utils system-config-printer-gui
rpm -qa | grep system-config | sudo xargs rpm -e
rm /etc/sysconfig/system-config-securitylevel.rpmsave
rpm -e pcmcia-cs
rm /etc/sysconfig/pcmcia.rpmsave
rpm -e kudzu
rpm -qa | grep gnome | sudo xargs rpm -e libbonoboui gail gtkhtml2
rpm -e pciutils-devel
rpm -e a2ps
rm /usr/share/a2ps/afm/fonts.map.rpmsave
rpm -e alchemist
rpm -e apmd
rpm -e audiofile esound
rpm -e authconfig authconfig-gtk
rpm -e bind caching-nameserver NetworkManager
rm /etc/rndc.key.rpmsave
rpm -e comps comps-extras
rpm -e curl-devel
rpm -e cyrus-sasl-plain cyrus-sasl-devel openldap-devel
rpm -e desktop-backgrounds-basic
rpm -e doxygen
rpm -e fbset
rpm -e foomatic
rpm -e ghostscript ghostscript-fonts hpijs
rpm -e up2date
rm /etc/sysconfig/rhn/up2date-uuid.rpmsave
rpm -e gpm-devel
rpm -e hesiod-devel
rpm -e tetex tetex-fonts texinfo
rpm -e redhat-menus htmlview pinfo
rpm -e desktop-file-utils
rpm -e mod_perl mod_ssl mod_python httpd php webalizer httpd-manual php-ldap php-pear
rpm -e apr apr-util
rpm -e irda-utils
rpm -e isdn4k-utils
rpm -e kbd
rpm -e krbafs krbafs-devel
rm /etc/krb.conf.rpmsave
rpm -e lha
rpm -e libIDL ORBit2 pyorbit pyorbit libbonobo GConf2 bluez-pin
rpm -e libart_lgpl
rpm -e libcap-devel
rpm -e libglade2 pygtk2-libglade usermode-gtk
rpm -e qt oprofile
rpm -e libmng
rpm -e libogg libvorbis sox libogg-devel libvorbis-devel
rpm -e hal bluez-utils pm-utils
rpm -e libwnck
rpm -e libwvstreams wvdial
rpm -e mpage
rpm -e crypto-utils
rpm -e newt ntsysv setuptool newt-perl newt-devel
rpm -e nscd nss_ldap
rm /etc/ldap.conf.rpmsave
rpm -e pam_krb5 pam_smb
rm /etc/pam_smb.conf.rpmsave
rpm -e pnm2ppa
rpm -e ppp rp-pppoe
rpm -e psgml
rpm -e psutils
rpm -e pyOpenSSL pygtk2 rhnlib
rpm -e pyxf86config rhpl
rpm -e rdist
rpm -e talk
rpm -e xdelta
rpm -e yp-tools ypbind
rpm -e alsa-lib alsa-utils
rpm -e eject
rpm -e squid
rpm -e kernel-devel # since it headers may no longer be accurate
rpm -e howl-lib howl
yum install compat-gcc-32 compat-gcc-32-c++
make -f RHL90-yum-install.mk install
From "make .. install":
No Match for argument: bash-doc
No Match for argument: cproto
No Match for argument: pine
No Match for argument: perl-CGI
=============================================================================
Package Arch Version Repository Size
=============================================================================
Installing:
arpwatch i386 14:2.1a13-13.FC4 updates-released 178 k
expect i386 5.43.0-1 base 147 k
glib-devel i386 1:1.2.10-16 base 116 k
gtk+-devel i386 1:1.2.10-39 base 1.1 M
hexedit i386 1.2.10-4 base 32 k
lm_sensors i386 2.8.8-5 base 445 k
lm_sensors-devel i386 2.8.8-5 base 59 k
lynx i386 2.8.5-23 base 1.7 M
ncftp i386 2:3.1.9-1 extras 507 k
pcre-devel i386 5.0-4 base 107 k
tftp i386 0.40-6 base 20 k
Installing for dependencies:
dmidecode i386 1:2.6-1.14 base 29 k
fontconfig-devel i386 2.2.3-13 base 236 k
freetype-devel i386 2.1.9-2 base 527 k
gdk-pixbuf i386 1:0.22.0-18 base 226 k
gtk+ i386 1:1.2.10-39 base 885 k
xorg-x11-devel i386 6.8.2-37 updates-released 5.0 M
#!/bin/bash
set -e
VER=2.6.12-1.1390_FC4
BVER=2.6.12
MVER=2.6
SDIR=ftp://download.fedora.redhat.com/pub/fedora/linux/core/updates/4/SRPMS/
TDIR=/z/src
SRCRPM=kernel-$VER.src.rpm
cd /tmp/
wget $SDIR/$SRCRPM
rpm -Uvh $SRCRPM
rm $SRCRPM
cd /usr/src/redhat/SPECS
rpmbuild -bp --target $(arch) kernel-$MVER.spec
cd /usr/src/redhat/BUILD/kernel-$BVER
mv linux-$BVER $TDIR/linux-$VER
rpmbuild --clean --rmsource --rmspec /usr/src/redhat/SPECS/kernel-$MVER.spec
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment