Add memtest, local boot

This commit is contained in:
Dean Troyer 2011-09-27 22:19:32 -05:00
parent 3f7170025d
commit 1f80bfb31f

View file

@ -8,9 +8,19 @@
UBUNTU_MIRROR=http://archive.ubuntu.com/ubuntu/dists/natty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64 UBUNTU_MIRROR=http://archive.ubuntu.com/ubuntu/dists/natty/main/installer-amd64/current/images/netboot/ubuntu-installer/amd64
DEST_DIR=${1:-/tmp/tftpboot} MEMTEST_VER=4.10
MEMTEST_BIN=memtest86+-${MEMTEST_VER}.bin
MEMTEST_URL=http://www.memtest.org/download/${MEMTEST_VER}/
DEST_DIR=${1:-/tmp}/tftpboot
OPWD=`pwd` OPWD=`pwd`
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 DEFAULT=$DEST_DIR/pxelinux.cfg/default
cat >$DEFAULT <<EOF cat >$DEFAULT <<EOF
default menu.c32 default menu.c32
@ -28,11 +38,6 @@ PXE Boot Menu
EOF EOF
mkdir -p $DEST_DIR/pxelinux.cfg
cd $DEST_DIR
cp -p /usr/lib/syslinux/memdisk $DEST_DIR
cp -p /usr/lib/syslinux/pxelinux.0 $DEST_DIR
# Get Ubuntu netboot # Get Ubuntu netboot
mkdir -p $DEST_DIR/ubuntu mkdir -p $DEST_DIR/ubuntu
cd $DEST_DIR/ubuntu cd $DEST_DIR/ubuntu
@ -49,6 +54,22 @@ cat >>$MENU <<EOF
ubuntu - Ubuntu Natty ubuntu - Ubuntu Natty
EOF EOF
# Get Memtest
cd $DEST_DIR
if [ ! -r $MEMTEST_BIN ]; then
wget -N --quiet ${MEMTEST_URL}/${MEMTEST_BIN}.gz
gunzip $MEMTEST_BIN
fi
cat >>$DEFAULT <<EOF
LABEL memtest
MENU LABEL Memtest86+
KERNEL $MEMTEST_BIN
EOF
cat >>$MENU <<EOF
memtest - Memtest86+
EOF
# Get FreeDOS # Get FreeDOS
mkdir -p $DEST_DIR/freedos mkdir -p $DEST_DIR/freedos
cd $DEST_DIR/freedos cd $DEST_DIR/freedos
@ -64,3 +85,16 @@ EOF
cat >>$MENU <<EOF cat >>$MENU <<EOF
freedos - FreeDOS freedos - FreeDOS
EOF EOF
# Local disk boot
cat >>$DEFAULT <<EOF
LABEL local
MENU LABEL Local disk
MENU DEFAULT
LOCALBOOT 0
EOF
cat >>$MENU <<EOF
local - Local disk boot
EOF