set -e
-BOOTCD_VERSION="3.0-beta0.1"
+BOOTCD_VERSION="3.0-beta0.4"
FULL_VERSION_STRING="PlanetLab BootCD $BOOTCD_VERSION"
# which boot server to contact
INITRD_MOUNT=`pwd`/rd
# size of the ram disk in MB
-RAMDISK_SIZE=48
+RAMDISK_SIZE=64
# the bytes per inode ratio (the -i value in mkfs.ext2) for the ramdisk
INITRD_BYTES_PER_INODE=1024
echo "install boot cd base rpms"
yum -c yum.conf --installroot=$CD_ROOT -y groupinstall $BOOTCD_YUM_GROUP
+ echo "checking to make sure rpms were installed"
+ packages=`cat yumgroups.xml | grep packagereq | sed 's#<[^<]*>##g'`
+ set +e
+ for package in $packages; do
+ echo "checking for package $package"
+ chroot $CD_ROOT /bin/rpm -qi $package > /dev/null
+ if [[ "$?" -ne 0 ]]; then
+ echo "package $package was not installed in the cd root."
+ echo "make sure it exists in the yum repository."
+ exit 1
+ fi
+ done
+ set -e
+
echo "removing unneccessary build files"
(cd $CD_ROOT/lib/modules && \
find ./ -type d -name build -maxdepth 2 -exec rm -rf {} \;)
echo "copying old boot cd directory bootme (TEMPORARY)"
cp -r bootme_old $CD_ROOT/usr/bootme
+ echo "$FULL_VERSION_STRING" > $CD_ROOT/usr/bootme/ID
echo "forcing lvm to make lvm1 partitions (TEMPORARY)"
cp -f $CONF_FILES_DIR/lvm.conf $CD_ROOT/etc/lvm/
mount -o loop,rw $INITRD $INITRD_MOUNT
echo "copy all files except usr to ramdisk"
- (cd $CD_ROOT && find . -path ./usr -prune -o -print | \
- cpio -p -d -u $INITRD_MOUNT)
+ pushd .
+ cd $CD_ROOT
+ find . -path ./usr -prune -o -print | cpio -p -d -u $INITRD_MOUNT
+ popd
umount $INITRD_MOUNT
rmdir $INITRD_MOUNT