Specifications

Remote Booting Linux on Intel Processors (CERN Variant)
Concurrent Technologies Page 9 of 30
# Remove any modules in /tftpboot/$1/lib/modules
# We don't need them in our example
rm -rf /tftpboot/$1/lib/modules/*
echo -n .
# Next two steps are necessary to make the rfs fit into
# the 64MB RamDisk, as used in the NFS+RamDisk rfs example
# later.
# Empty out all the files in var
for d in `find /tftpboot/$1/var/`
do
if [ -f $d ]
then
rm -f $d
fi
done
# Strip down the libraries
for f in `find /tftpboot/$1/lib/ -type f`; do
strip $f -o $f
chmod 755 $f
done
echo -n .
# Make a basic /tftpboot/$1/usr/lib directory
mkdir /tftpboot/$1/usr/lib
cp -a /usr/lib/libglib* /tftpboot/$1/usr/lib
cp -a /usr/lib/libtermcap.so /tftpboot/$1/usr/lib
cp -a /usr/lib/libuuid.so /tftpboot/$1/usr/lib
cp -a /usr/lib/libext2fs.so /tftpboot/$1/usr/lib
cp -a /usr/lib/libpopt* /tftpboot/$1/usr/lib
cp -a /usr/lib/libnewt* /tftpboot/$1/usr/lib
cp -a /usr/lib/libslang* /tftpboot/$1/usr/lib
cp -a /usr/lib/libz* /tftpboot/$1/usr/lib
cp -a /lib/libacl* /tftpboot/$1/lib
cp -a /lib/libattr* /tftpboot/$1/lib
echo -n .
# Make a basic /tftpboot/$1/usr/bin directory
mkdir /tftpboot/$1/usr/bin
cp -a /usr/bin/id /tftpboot/$1/usr/bin
cp -a /usr/bin/dircolors /tftpboot/$1/usr/bin
# Copy the kernel.h file
cp /boot/kernel.h /tftpboot/$1/boot
echo -n .
# Remove these services from rc3.d
for d in 80 60 54 28
do
if [ -e /tftpboot/$1/etc/rc.d/rc3.d/S$d* ]
then
rm /tftpboot/$1/etc/rc.d/rc3.d/S$d*
fi
echo -n .