Specifications
Remote Booting Linux on Intel Processors (CERN Variant)
Concurrent Technologies Page 21 of 30
echo -n Making Root File System template for $1.
mkdir -p /tftpboot/$1
# Just make these ones
for d in home mnt proc tmp usr root boot lib etc dev rootfs bin sbin
do
mkdir /tftpboot/$1/$d
echo -n .
done
# And a var
for d in `find /var -type d`
do
d=`echo $d | cut -c2-`
mkdir /tftpboot/$1/$d
done
echo -n .
chmod 1777 /tftpboot/$1/tmp
# Stop kernel reporting fsck mount errors
touch /tftpboot/$1/fastboot
chattr +i /tftpboot/$1/fastboot
# Copy some important /bin files
for f in bash cp echo hostname mount sh cat
do
cp -a /bin/$f /tftpboot/$1/bin
done
for f in wc tail
do
cp -a /usr/bin/$f /tftpboot/$1/bin
done
echo -n .
# Copy some important /sbin files
for f in ifconfig init portmap route
do
cp -a /sbin/$f /tftpboot/$1/sbin
done
echo -n .
# Copy some important libraries
cp -a /lib/ld* /tftpboot/$1/lib
cp -a /lib/libc-2* /tftpboot/$1/lib
cp -a /lib/libc.so* /tftpboot/$1/lib
cp -a /lib/libdl* /tftpboot/$1/lib
cp -a /lib/libterm* /tftpboot/$1/lib
cp -a /lib/libnsl* /tftpboot/$1/lib
cp -a /lib/libm* /tftpboot/$1/lib
cp -a /usr/lib/libwrap* /tftpboot/$1/lib
cp -a /lib/libpthread* /tftpboot/$1/lib
cp -a /lib/librt* /tftpboot/$1/lib
cp -a /lib/libresolv* /tftpboot/$1/lib
cp -a /lib/libnss*dns* /tftpboot/$1/lib
cp -a /lib/libacl* /tftpboot/$1/lib