On Thu, 2004-07-29 at 15:18, Chad Walstrom wrote:
> In order to limit your upgrades to security packages for sarge, you need
> to subscribe to the security announcements email list for Debian and
> manually populate your local archive with affected packages.

that's the clincher that kept me in the whitebox camp, regardless that
remote installs were to be a fair effort.  that effort spent, i'm
posting the procedure for posterity..

i managed to remotely install whitebox on a customer's new machines from
far away, and without burning or sending the whitebox CDs!

in theory i coulda just done a net install.  but i didn't want to munge
with my customer's server to setup a netboot.  maybe there are other
options.  do tell, if you've actually done them.

i figured it ought to work just as well via a knoppix CD.  well it
wasn't as easy as i thought it ought to be.  but now it can be, if
somebody is willing to roll in fixes for the anaconda bugs and
incompatibilities i found.

basic concept: install installer in what is to be the swap partition.

by the way i never bothered to go back over the process to sift out
packages i didn't really need just to run anaconda.  and similarly many
of the packages could have been downloaded via yum instead of rsync.  i
leave such fine tuning up to the next eager beaver.  fwiw it had seemed
i was needing to build a bootable install partition, but i ended up
squashing the anaconda bugs that were in the way of chrooting on top of
knoppix.

so anyway, here's how i did it.  or to be more accurate these are the
notes i kept, which were intended to be the significant net result of
all my thrashings as i laboured to make it work.  in other words, no
guarantees, and the usual yatta yatta disclaimers..

prepare this on existing (rh9) box: 
mkdir -p /b/iso/whitebox
rsync -vSPa\
   rsync://mirror.physics.ncsu.edu/whitebox/3.0/en/iso/i386/liberation-respin1-\*\
   /b/iso/whitebox
mkdir -p /b/installer/whitebox/var/cache/yum/base/packages
mkdir -p /b/installer/whitebox/var/cache/yum/updates-released/packages
mkdir -p /b/installer/whitebox/usr/src/redhat
rsync -vSPa\
   --include=anaconda-9.1.2-2.RHEL.WB2.src.rpm \
   --include=anaconda-9.1.2-2.RHEL.WB2.i386.rpm \
   --include=anaconda-runtime-9.1.2-2.RHEL.WB2.i386.rpm \
   --include=rpm-4.2.2-0.14.WB1.i386.rpm \
   --include=rpm-python-4.2.2-0.14.WB1.i386.rpm \
   --include=rhpl-0.110.4-1.i386.rpm \
   --include=popt-1.8.2-0.14.WB1.i386.rpm \
   --include=elfutils-0.94-1.i386.rpm \
   --include=elfutils-libelf-0.94-1.i386.rpm \
   --include=modutils-2.4.25-12.EL.i386.rpm \
   --include=shadow-utils-4.0.3-20.i386.rpm \
   --include=glibc-2.3.2-95.20.i386.rpm \
   --include=glibc-common-2.3.2-95.20.i386.rpm \
   --include=libgcc-3.2.3-39.i386.rpm\
   --include=libpng-1.2.2-24.i386.rpm \
   --include=libxml2-2.5.10-6.i386.rpm\
   --include=libxml2-python-2.5.10-6.i386.rpm\
   --include=laus-libs-0.1-56RHEL3.i386.rpm \
   --include=krb5-libs-1.2.7-24.i386.rpm \
   --include=XFree86-libs-4.3.0-62.EL.i386.rpm \
   --include=XFree86-libs-data-4.3.0-62.EL.i386.rpm \
   --include=fontconfig-2.2.1-8.0.i386.rpm \
   --include=dev-3.3.12-1.i386.rpm \
   --include=pam-0.75-54.i386.rpm \
   --include=openssl-0.9.7a-33.4.i386.rpm \
   --include=iproute-2.4.7-11.30E.1.i386.rpm \
   --include=initscripts-7.31.13.EL-1.WB2.i386.rpm \
   --include=SysVinit-2.85-4.2.i386.rpm \
   --include=sysklogd-1.4.1-12.1.i386.rpm \
   --include=kudzu-1.1.22.2-1.i386.rpm \
   --include=libgcj-3.2.3-39.i386.rpm\
   --exclude=\*\
   rsync://mirror.physics.ncsu.edu/whitebox/3.0/en/updates/i386/\
   /b/installer/whitebox/var/cache/yum/updates-released/packages
rsync -vSPa --include=bash-2.05b-29.i386.rpm\
   --include=bogl-0.1.9-27.i386.rpm\
   --include=booty-0.31.1-1.i386.rpm\
   --include=beecrypt-3.0.1-0.20030630.i386.rpm\
   --include=basesystem-8.0-2.noarch.rpm\
   --include=filesystem-2.2.1-3.i386.rpm\
   --include=findutils-4.1.7-9.i386.rpm\
   --include=coreutils-4.5.3-26.i386.rpm\
   --include=chkconfig-1.3.8-3.i386.rpm\
   --include=e2fsprogs-1.32-15.i386.rpm\
   --include=mktemp-1.5-18.i386.rpm\
   --include=hwdata-0.98-1.noarch.rpm\
   --include=tzdata-2003c-1.noarch.rpm\
   --include=parted-1.6.3-29.i386.rpm\
   --include=procps-2.0.13-9.2E.i386.rpm\
   --include=psmisc-21.3-1.RHEL.0.i386.rpm\
   --include=python-2.2.3-5.i386.rpm\
   --include=pyxf86config-0.3.5-1.i386.rpm\
   --include=pygtk2-1.99.16-8.i386.rpm\
   --include=pygtk2-devel-1.99.16-8.i386.rpm\
   --include=pygtk2-libglade-1.99.16-8.i386.rpm\
   --include=atk-1.2.4-3.0.i386.rpm\
   --include=gtk+-1.2.10-27.1.i386.rpm\
   --include=gtk2-2.2.4-4.0.i386.rpm\
   --include=glib-1.2.10-11.1.i386.rpm\
   --include=glib2-2.2.3-2.0.i386.rpm\
   --include=zlib-1.1.4-8.1.i386.rpm\
   --include=bzip2-1.0.2-11.i386.rpm\
   --include=bzip2-libs-1.0.2-11.i386.rpm\
   --include=cracklib-2.7-22.i386.rpm\
   --include=cracklib-dicts-2.7-22.i386.rpm\
   --include=libacl-2.2.3-1.i386.rpm\
   --include=libattr-2.2.0-1.i386.rpm\
   --include=libjpeg-6b-30.i386.rpm\
   --include=libtiff-3.5.7-13.i386.rpm\
   --include=libglade2-2.0.1-3.i386.rpm\
   --include=libtermcap-2.0.8-35.i386.rpm\
   --include=freetype-2.1.4-4.0.i386.rpm\
   --include=XFree86-Mesa-libGL-4.3.0-35.EL.i386.rpm\
   --include=db4-4.1.25-8.i386.rpm\
   --include=sed-4.0.7-3.i386.rpm\
   --include=gmp-4.1.2-5.i386.rpm\
   --include=gpm-1.19.3-27.2.i386.rpm\
   --include=gdbm-1.8.0-20.i386.rpm\
   --include=gawk-3.1.1-9.i386.rpm\
   --include=grep-2.5.1-16.i386.rpm\
   --include=info-4.5-3.i386.rpm\
   --include=newt-0.51.5-1.i386.rpm\
   --include=expat-1.95.5-6.i386.rpm\
   --include=mount-2.11y-31.1.i386.rpm\
   --include=pango-1.2.5-2.0.i386.rpm\
   --include=which-2.14-7.i386.rpm\
   --include=words-2-21.noarch.rpm\
   --include=setup-2.5.27-1.noarch.rpm\
   --include=slang-1.4.5-18.i386.rpm\
   --include=ncurses-5.3-9.3.i386.rpm\
   --include=termcap-11.0.1-17.1.noarch.rpm\
   --include=readline-4.3-5.i386.rpm\
   --include=mingetty-1.06-1.i386.rpm\
   --include=pcre-3.9-10.i386.rpm\
   --include=ethtool-1.8-2.i386.rpm\
   --include=net-tools-1.60-20.i386.rpm\
   --include=iputils-20020927-11.i386.rpm\
   --include=util-linux-2.11y-31.1.i386.rpm\
   --include=yum-2.0.4-2.WB1.noarch.rpm\
   --include=gettext-0.11.4-7.i386.rpm\
   --include=zip-2.3-16.i386.rpm\
   --exclude=\*\
   rsync://mirror.physics.ncsu.edu/whitebox/3.0/en/os/i386/RedHat/RPMS/\          
   /b/installer/whitebox/var/cache/yum/base/packages
rpm -Uvh --root=/b/installer/whitebox\
   /b/installer/whitebox/var/cache/yum/*/packages/*
ln -s /sbin/e2label /b/installer/whitebox/usr/sbin/e2label

edit /b/installer/whitebox/etc/yum.conf, hardcode $releasever
chroot /b/installer/whitebox
LC_ALL=C yum install gnupg grub vnc vnc-server openssh-server

fix booty bug:
edit /b/installer/whitebox/usr/lib/booty/butil.py, replace line 152:
   #path is None
   return "Sublime Booty Linux"

anaconda's attempt to protect the iso partition fails, so don't:
edit /b/installer/whitebox/usr/lib/anaconda/partitions.py, comment out line 944:
   #request.setProtected(1)

edit /b/installer/whitebox/usr/lib/anaconda/packages.py:
anaconda's attempt to launch syslog fails, so don't:
comment out lines 794,919,1185:
   #syslog.start (instPath, syslogname)
   #syslog.stop()
   #syslog.stop()
this umount will crash, so don't!  at line 1038 comment out:
   #if usbWasMounted:
   #    isys.umount('/proc/bus/usb', removeDir = 0)
   #    # see if unmount suceeded, if not pretent it isnt mounted
   #    # because we're screwed anywyas if system is going to
   #    # lock up
   #    if iutil.isUSBDevFSMounted():
   #    usbWasMounted = 0

edit /b/installer/whitebox/usr/sbin/anaconda:
make exceptions non-fatal, comment out line 1078:
   #sys.excepthook = lambda type, value, tb, dispatch=dispatch, intf=intf: handleException(dispatch, intf, (type, value, tb))
prevent anaconda from forcing text mode:
(well i was trying to get a vnc graphic install working, but sigh, never did)
at line 805 comment out:
   #if (display_mode == 'g' and method and
   #    (method.startswith('ftp://') or
   #     method.startswith('http://') or
   #     method.startswith('hd://') or
   #     method.startswith('oldhd://'))):
   #    dup_log(_("Graphical installation not available for %s installs.  "
   #             "Starting text mode.") % (string.split(method, ':')[0],))
   #    display_mode = 't'
   #    time.sleep(2)

we're done with the RPMs, no need to xfer them:
mv /b/installer/whitebox/var/cache/yum\
   /b/installer/whitebox.var.cache.yum

i had my customer do this on the new machines:
boot knoppix3.4 CD.
launch terminal window.
   Xvnc :1&
   DISPLAY=:1 xterm&

so i could do the rest myself:
(find new machine's DHCP interaction in server log)
(ssh to firewall with port forwards for new machines)
(attach vncviewer)
parted
   (telling disk druid to format partitions will hang, do it here now)
   mkpartfs primary ext2 0 9000 (/)
   mkpartfs primary ext2 9000 10025 (installer, then swap)
   mkpartfs primary ext2 10025 <max> (/v)
mkdir -p        /b/installer/whitebox
mkdir -p        /v
mount /dev/hda2 /b/installer/whitebox
mount /dev/hda3 /v
mkdir -p        /v/iso/whitebox 
rsync -vSPaxessh <prepbox>:/b/iso/whitebox/\
                           /v/iso/whitebox
rsync -vSPazessh <prepbox>:/b/installer/whitebox/\
                           /b/installer/whitebox
cp -b /etc/resolv.conf /b/installer/whitebox/etc/resolv.conf
umount /v
chroot /b/installer/whitebox
mount -n -t proc /proc /proc 
LD_ASSUME_KERNEL=2.2.5 /usr/lib/python2.2/pdb.py /usr/sbin/anaconda --headless --text --method=hd:///dev/hda3:ext2/iso/whitebox

work with installed system before booting:
mkdir /a1
mount /dev/hda1 /a1
chroot /a1

edit /etc/fstab for the following changes:
revert the installer to my swap partition:
parted
   rm 2
   mkpartfs primary linux-swap
i really wanted ext3, but knoppix parted wouldn't do it:
tune2fs -j /dev/hda1
tune2fs -j /dev/hda3

why not run yum update before booting:
rpm --import /usr/share/rhn/RPM-GPG-KEY
rpm --import /usr/share/rhn/RPM-GPG-KEY-whitebox
yum update

implant other config stuff, then boot!

bon appetit,
greg


_______________________________________________
TCLUG Mailing List - Minneapolis/St. Paul, Minnesota
Help beta test TCLUG's potential new home: http://plone.mn-linux.org
Got pictures for TCLUG? Beta test http://plone.mn-linux.org/gallery
tclug-list at mn-linux.org
https://mailman.real-time.com/mailman/listinfo/tclug-list