52 lines
1.4 KiB
Bash
Executable File
52 lines
1.4 KiB
Bash
Executable File
#!/bin/bash
|
|
|
|
# This script do the following:
|
|
# Download Debian Stable
|
|
# Download Debian Testing
|
|
# Download Debian Unstable
|
|
# Make an PXE's config file (aka menu.cfg)
|
|
|
|
TFTP_ROOT="/var/lib/tftpboot"
|
|
|
|
# Config file
|
|
CONFIG_PXE="${TFTP_ROOT}/installer/debian/menu.cfg.example"
|
|
rm -f ${CONFIG_PXE} && touch ${CONFIG_PXE}
|
|
|
|
for DISTRO in wheezy jessie sid; do # For ALL Debian's version
|
|
for ARCH in amd64 i386; do # For all classic architecture
|
|
# Config file
|
|
echo "label install" >> "${CONFIG_PXE}"
|
|
|
|
# Create and go into directory
|
|
mkdir -p ${TFTP_ROOT}/installer/debian/${DISTRO}/${ARCH}
|
|
pushd ${TFTP_ROOT}/installer/debian/${DISTRO}/${ARCH}
|
|
|
|
# Download files
|
|
wget http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/debian-installer/${ARCH}/linux -O linux
|
|
wget http://ftp.fr.debian.org/debian/dists/${DISTRO}/main/installer-${ARCH}/current/images/netboot/debian-installer/${ARCH}/initrd.gz -O initrd.gz
|
|
popd
|
|
|
|
# Config file
|
|
/bin/cat >> "${CONFIG_PXE}" << EOF
|
|
menu label Debian GNU/Linux ${DISTRO} ^${ARCH} bits
|
|
kernel installer/debian/${DISTRO}/${ARCH}/linux
|
|
append vga=normal initrd=installer/debian/${DISTRO}/${ARCH}/initrd.gz -- quiet
|
|
EOF
|
|
done
|
|
|
|
# Config file
|
|
/bin/cat >> "${CONFIG_PXE}" << EOF
|
|
label separator
|
|
menu label ---
|
|
EOF
|
|
done
|
|
|
|
# Config file
|
|
/bin/cat >> "${CONFIG_PXE}" << EOF
|
|
label mainmenu
|
|
menu label ^Back..
|
|
menu exit
|
|
EOF
|
|
|
|
|