> > I came into this thread late, but this touched on somthing I've been > strugling with. I'm trying to make a new ISO image that includes all of > the latest updates. Integrating the new RPMs is easy, but 6.1 the > installer in 6.1 is basically useless without the updates. I tried to make > a disk with the new boot image, and the files from the update disk image > copied over the corresponding files on the CD. That was a disaster, I > ended up with a disk that just segfaulted as the installer was starting. > > All I really want to see is some clear directions on how to incorporate > installer updates into a new ISO image. I used the attached script. Usual warrantee applies - NONE;-0)
#!/bin/bash # time -p /u02/summer/bin/makerh tmp/redhat-6.1 tmp/RHL6.1 tmp/RHL6.1.iso # rsh emu tar c -C /mnt/cdrom/RedHat/instimage/usr/lib/python1.5/ site-packages/ | tar xv -C tmp/redhat-6.1/i386/RedHat/instimage/usr/lib/python1.5/ # rsh emu tar -cz -C /mnt/cdrom/ . | tar -zx -C i386/ # # # This script takes about three minutes on my system: PII-233, 7200 RPM HDD if # source, updates and target are all on the same drive. Possibly, the 'cp" # commands will need to have -l removed from the options if you have the # source and updates on different drives from the target. It will also take # longer;-) # # Customisations # 1 VERSION RedHat Linux version # 2 BOOT boot image to use on bootable CD # 3 UPDATES One or more trees of RHL updates. Processed in the order specified here # # # Parameters: # 1 source directory, defaults to /u03/redhat/${VERSION}} # 2 Target directory, defaults to /tmp/RHL${VERSION} # 3 ISO Name of CD image to make. If omitted, prepares an install image for network install # VERSION=6.0 VERSION=6.1 SOURCE=${1:-/u03/redhat/${VERSION}} # Updates tree: # UPDATES="/u03/incoming/updates.redhat.com/6.0 ${HOME}/redhat/RPMS6 " # UPDATES="/u03/incoming/updates.redhat.com/6.0 " UPDATES=${SOURCE}/updates BOOT=images/boot.img # default boot image, use for new release BOOT=images/i386/boot-RHEA-1999:044.img # the boot image to use; vendor realised the default's broke SOURCE=${SOURCE}/i386 TARGET=${2:-/tmp/RHL${VERSION}} ISO=$3 echo $0 $SOURCE $TARGET function RemoveOldVersions() { UPDATE=$1 Type=${UPDATE: -7} eval `rpm -qip ${UPDATE} | awk --source '/Version/ {print "uVersion="$3}' \ --source '/Name/ {print "uName="$3}'\ --source '/Release/ {print "uRelease="$3}'` Dest=${2} find ${Dest} -name ${uName}\*${Type} | sort | \ while read l do eval `rpm -qip ${l} | awk --source '/Version/ {print "oVersion="$3}' \ --source '/Name/ {print "oName="$3}'\ --source '/Release/ {print "oRelease="$3}'` [ "${uName}" = "${oName}" ] && eval [ -f "${Dest}/${oName}-${oVersion}*${Type}" ] \ && eval rm -f ${Dest}/${oName}-${oVersion}*${Type} done } function MakeImage() { echo MakeImage [ -d ${TARGET} ] && (chmod -R 700 ${TARGET}; rm -rf ${TARGET} ) mkdir -p ${TARGET} S=`find ${SOURCE}/ -maxdepth 1| grep -v ^${SOURCE}/\$` cp -lax ${S} ${TARGET}/ } function cleanup() { echo cleanup chmod 755 `find ${TARGET} -type d` \ `find ${TARGET}/RedHat/instimage/usr/bin ${TARGET}/RedHat/instimage/lib -type f ` Names=`find ${TARGET} \ -name .listing \ -o -name ls-lR\* \ -o -name TRANS.TBL \ -o -name boot.cat \ -o -name .buildlog \ ` [ -n "${Names}" ] && (chmod +w ${Names};rm -f ${Names}) } # apply updates to the tree function update() { echo update echo Updating from $UPDATES for D in ${UPDATES} do IMG=`find ${D} -name images` [ -n "${IMG}" ] && cp -lax ${IMG}/i386/ $TARGET/images done JUNK=`find $TARGET/images -type d -name old` [ -n "${JUNK}" ] && rm -rf ${JUNK} # First, we look at the updated rpms to hand and identify matching rpms in the tarket tree. find $UPDATES -name \*.rpm -a ! -name \*.src.rpm | egrep -v 'i[4-6]86' | sort | \ while read l do echo ${l} rpm -K --nogpg $l >/dev/null 2>&1 &&\ { RemoveOldVersions ${l} $TARGET/RedHat/RPMS cp -lax ${l} $TARGET/RedHat/RPMS || return $? } done } function genlist() { echo genlist GHD=`find ${TARGET} -name genhdlist` [ -n "${GHD}" ] || \ { echo cannot find genhdlist exit } echo ${GHD} INSTIMG=`find ${TARGET} -name instimage` LD_LIBRARY_PATH=${INSTIMG}/usr/lib/ ${GHD} ${TARGET} } function makeISO9660() { OPUT=${1} rm -f ${OPUT} /usr/bin/mkisofs -b ${BOOT} -c images/boot.cat -r -J -o ${OPUT}\ -A "Red Hat Linux ${VERSION} created `date`"\ -m 'CVS'\ -V "RedHatLinux6.1"\ ${TARGET} \ 2> >(( egrep -v 'estimate finish|^Using')) chmod 0644 ${OPUT} ls -o ${OPUT} } # Red Hat Linux 6.1 install is Badly Broken. A fix has been released, and some # corrections need to be copied into the anaconda stuff. # As this needs to be done as root, we'll just mention what commands should be # issued. These can be cut and pasted by the user. DreadfulRHL6.1Hack() { F=`find $UPDATES -name updates\* -type f` [ -z "${F}" ] && return 0 # not needed/not available. eval `stat tmp/RHL6.1/RedHat/instimage/usr/lib/python1.5/site-packages/_balkanmodule.so |\ awk --source '/Size/ {print "Sz=" $2}'` [ $Sz -eq 12486 ] || return 0 D=`find ${SOURCE} -name site-packages` cat <<ZZ You need to run these commands as root in order to apply some install-procedure updates ###################################################################################### /sbin/losetup /dev/loop0 $F mkdir /tmp/pAtch mount /dev/loop0 /tmp/pAtch find /tmp/pAtch -type f -ls find ${SOURCE} -name site-packages -ls tar -c -C /tmp/pAtch . | tar x -C ${D} umount /tmp/pAtch /sbin/losetup -d /dev/loop0 rmdir /tmp/pAtch ###################################################################################### ZZ } MakeImage || exit 4 cleanup || exit 4 update || exit 4 DreadfulRHL6.1Hack cleanup || exit 4 genlist || exit 4 [ -n "${ISO}" ] && makeISO9660 ${ISO} du -hs ${TARGET}/ #echo rsh emu tar c -C /mnt/cdrom/RedHat/instimage/usr/lib/python1.5/ site-packages/ \ # \| tar xv -C tmp/redhat-6.1/i386/RedHat/instimage/usr/lib/python1.5/
Cheers John Summerfield http://os2.ami.com.au/os2/ for OS/2 support. Configuration, networking, combined IBM ftpsites index.