diff --git a/build_pxe_boot.sh b/build_pxe_boot.sh new file mode 100755 index 0000000..2c4cc0e --- /dev/null +++ b/build_pxe_boot.sh @@ -0,0 +1,115 @@ +#!/bin/bash -e +# build_pxe_boot.sh - Create a PXE boot environment +# +# build_pxe_boot.sh [-k kernel-version] destdir +# +# Assumes syslinux is installed +# Assumes devstack files are in `pwd`/pxe +# Only needs to run as root if the destdir permissions require it + +UBUNTU_MIRROR=http://archive.ubuntu.com/ubuntu/dists/natty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64 + +MEMTEST_VER=4.10 +MEMTEST_BIN=memtest86+-${MEMTEST_VER}.bin +MEMTEST_URL=http://www.memtest.org/download/${MEMTEST_VER}/ + +KVER=`uname -r` +if [ "$1" = "-k" ]; then + KVER=$2 + shift;shift +fi + +DEST_DIR=${1:-/tmp}/tftpboot +OPWD=`pwd` +PROGDIR=`dirname $0` + +mkdir -p $DEST_DIR/pxelinux.cfg +cd $DEST_DIR +for i in memdisk menu.c32 pxelinux.0; do + cp -p /usr/lib/syslinux/$i $DEST_DIR +done + +DEFAULT=$DEST_DIR/pxelinux.cfg/default +cat >$DEFAULT <>$DEFAULT <>$DEFAULT <>$DEFAULT <>$DEFAULT <>$DEFAULT <