diff --git a/scripts/README.md b/scripts/README.md index 4f8af1c..60583df 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -5,6 +5,7 @@ * [Download Debian](#download_debiansh) * [Download Ubuntu](#download_ubuntush) * [Make Debian Initrd with Firmware](#make_debian_initrd_with_firmwaresh) + * [Download diag tools](#download_diag_toolssh) * [Debian late_command](#debian-late_command) ## Description @@ -36,6 +37,10 @@ The script will provide Debian's netboot installers with **additionnals firmware * **qlogic** : For QLogic Infiniband, SCSI, Fibre Channel/FCoE adapters. * Extract initrd and firmwares packages to build a new initrd. +### download_diag_tools.sh +The script will download some diagnostic tools : + * memtest86 from [memtest86's official website][memtest official website]. + ### Debian late_command #### Description @@ -72,3 +77,4 @@ in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \ in-target /bin/sh /tmp/latecommand/post.sh ``` +[memtest official website]: http://www.memtest.org/#downiso "Memtest86+ download" diff --git a/scripts/download_diag_tools.sh b/scripts/download_diag_tools.sh new file mode 100755 index 0000000..893cace --- /dev/null +++ b/scripts/download_diag_tools.sh @@ -0,0 +1,37 @@ +#!/bin/bash + +# This script do the following: +# Download Memtest + +TFTP_ROOT="/var/lib/tftpboot" + +# Config file +CONFIG_PXE="${TFTP_ROOT}/installer/menu.cfg.diag.example" +rm -f ${CONFIG_PXE} && touch ${CONFIG_PXE} + +### Memtest {{{ +MEMTEST_VERSION="5.01" +MEMTEST_URL="http://www.memtest.org/download/${MEMTEST_VERSION}/memtest86+-${MEMTEST_VERSION}.bin.gz" +MEMTEST_INSTALLER_DIR="${TFTP_ROOT}/installer/memtest/" + +# (re)Create the installer directory +rm -rf ${MEMTEST_INSTALLER_DIR} +mkdir -p ${MEMTEST_INSTALLER_DIR} +pushd ${MEMTEST_INSTALLER_DIR} + +# Download the last version and set simpler name (without the **.bin** extension !) +wget ${MEMTEST_URL} -O - | gzip -d > memtest86+-${MEMTEST_VERSION}.bin +ln -s memtest86+-${MEMTEST_VERSION}.bin memtest86+ + +popd + +# Config file +/bin/cat >> "${CONFIG_PXE}" << EOF +label memtest + menu label ^Memory diagnostic tool (Memtest) + kernel installer/memtest/memtest86+ +EOF + +### }}} + +exit 0