Add a script to download some diagnostic tools

This commit is contained in:
Jeremy Gardais 2016-07-26 15:34:30 +02:00
parent 79af4493ff
commit 86354b10d7
2 changed files with 43 additions and 0 deletions

View File

@ -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"

37
scripts/download_diag_tools.sh Executable file
View File

@ -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