diff --git a/scripts/README.md b/scripts/README.md index 6c90b2d..5cc8004 100644 --- a/scripts/README.md +++ b/scripts/README.md @@ -29,7 +29,7 @@ The script will provide netboot installers for the latest LTS and latest advance ### make_debian_initrd_with_firmware.sh The script will provide Debian's netboot installers with **additionnals firmwares** for all Debian (>=Stable) for **amd64** only : * Store the files to **/var/lib/tftpboot** (default). - * Store temp files to **/tmp/tmp.XXXXXXXXXX** (with mktemp). + * Store temp files to **/tmp/tmp.XXXXXXXXXX** (with `mktemp`). * Download Debian's initrd files for all Debian distributions (Stable : **Jessie**; Testing : **Stretch**; Unstable : **Sid**) for **amd64** architecture only. * Download additionnals firmwares : * **bnx2** : For Broadcom NetXtremeII network adapters. @@ -73,9 +73,12 @@ in-target /usr/bin/tftp ${IP.SRV.TFTP} -c get ${PATH/TO/TFTPD/ROOT}/scripts/late in-target tar xzf /tmp/latecommand.tar.gz -C /tmp/ ; \ in-target /bin/sh /tmp/latecommand/post.sh ``` + ### download_diag_tools.sh -The script will download some diagnostic tools : +- The script will download some diagnostic tools : * memtest86 from [memtest86's official website][memtest official website]. + * GParted Live from the [sourceforge's repository][gparted sourceforge] for both amd64 and i686. See the [official documentation][gparted pxe] for more informations. +- Provide an example of configuration file. ### download_clonezilla.sh * Download PXE files for Clonezilla live from [OSDN][OSDN url]. A Sourceforge repository is also available but…; see the [Clonezilla download page][clonezilla download] for more informations. @@ -85,5 +88,7 @@ The script will download some diagnostic tools : [memtest official website]: http://www.memtest.org/#downiso "Memtest86+ download" [OSDN url]: https://osdn.jp/projects/clonezilla/ -[clonezilla dowload]: http://clonezilla.org/downloads/download.php?branch=stable +[gparted sourceforge]: https://sourceforge.net/projects/gparted/files/gparted-live-stable/ "Gparted on sourceforge" +[gparted pxe]: http://gparted.org/livepxe.php "GParted Live on PXE Server" +[clonezilla download]: http://clonezilla.org/downloads/download.php?branch=stable [clonezilla via pxe server]: http://clonezilla.org/livepxe.php "Clonezilla Live on PXE server" diff --git a/scripts/download_diag_tools.sh b/scripts/download_diag_tools.sh index 893cace..925c2a4 100755 --- a/scripts/download_diag_tools.sh +++ b/scripts/download_diag_tools.sh @@ -34,4 +34,48 @@ EOF ### }}} +### Gparted {{{ +GPARTED_VERSION="0.26.1-3" +GPARTED_INSTALLER_DIR="${TFTP_ROOT}/installer/gparted" + +# (re)Create the installer directory +rm -rf ${GPARTED_INSTALLER_DIR} +mkdir -p ${GPARTED_INSTALLER_DIR} + +for ARCH in amd64 i686; do # For available classic architecture + GPARTED_URL="http://downloads.sourceforge.net/project/gparted/gparted-live-stable/${GPARTED_VERSION}/gparted-live-${GPARTED_VERSION}-${ARCH}.zip" + GPARTED_TEMP_FILE="gparted-live-${GPARTED_VERSION}-${ARCH}.zip" + + # Create and go into directory + mkdir -p ${GPARTED_INSTALLER_DIR}/${ARCH} + pushd ${GPARTED_INSTALLER_DIR}/${ARCH} + + # Download and extract only PXE files + wget "${GPARTED_URL}" -O "${GPARTED_TEMP_FILE}" + unzip -j "${GPARTED_TEMP_FILE}" live/filesystem.squashfs live/initrd.img live/vmlinuz -d . + rm -f "${GPARTED_TEMP_FILE}" + + popd + + /bin/cat >> "${CONFIG_PXE}" << EOF +label gpartedlive${ARCH} + menu label Partiton Manager ${ARCH} (^Gparted) + kernel installer/gparted/${ARCH}/vmlinuz + append initrd=installer/gparted/${ARCH}/initrd.img boot=live config components union=overlay username=user noswap noeject ip= vga=788 fetch=tftp://129.20.27.239/installer/gparted/${ARCH}/filesystem.squashfs +EOF + +done + + +### }}} + +# Config file +/bin/cat >> "${CONFIG_PXE}" << EOF +label separator + menu label ----- +label mainmenu + menu label ^Back.. + menu exit +EOF + exit 0