How to have sles run your own program on installation
by
on October 1st, 2008 at 05:13 PM (2801 Views)
1. Take the root image from a pristine SLES 10.2 repository, and copy
the contents of the root image to a working location.
mkdir -p $WORKING_DIR/mnt $WORKING_DIR/rootimg
mount -o loop $REPO_LOCATION/boot/i386/root $WORKING_DIR/mnt
cp -avr $WORKING_DIR/mnt/* $WORKING_DIR/rootimg
umount $WORKING_DIR/mnt
2. Replace the original ‘yast’ script with my own script.
mv $WORKING_DIR/rootimg/sbin/yast $WORKING_DIR/rootimg/sbin/yast.real
cp $WORKSPACE/yast.mine $WORKING_DIR/rootimg/sbin/yast
3. When desired changes are made(add dependencies in step a), pack up the modified directory tree
into a cramfs image:
mkfs.cramfs $WORKING_DIR/rootimg $REPO_LOCATION/boot/i386/root
A. For Kusu dependencies, we need the following packages:
Available on SLES installation disks:
python-2.4.2-18.13.i586.rpm
slang-2.0.5-14.2.i586.rpm
Available from other sources:
http://mondorescue.linjection.org/ft...2-1.2.i586.rpm
To install an rpm in a rootimg, python, for example,
pushd $WORKING_DIR/rootimg
rpm2cpio $RPMDIR/python-2.4.2-18.13.i586.rpm | cpio -idv
popd



Email Blog Entry
