Skip to content

Instantly share code, notes, and snippets.

@furlongm
Created December 13, 2019 20:14
Show Gist options
  • Save furlongm/c21e1845f037becdf318e8cea1e564f5 to your computer and use it in GitHub Desktop.
Save furlongm/c21e1845f037becdf318e8cea1e564f5 to your computer and use it in GitHub Desktop.
#!/bin/bash
dist=quantal
for arch in amd64 i386 ; do
wget -c http://mirror.aarnet.edu.au/ubuntu/dists/${dist}/main/installer-${arch}/current/images/netboot/netboot.tar.gz
tar xf netboot.tar.gz ./version.info
version=`cat ./version.info | grep "Ubuntu version" | sed -e "s/Ubuntu version: *\(.*\) *$/\1/"`
rm ./version.info
echo "Installing tftp files for ubuntu ${version} - ${arch}"
if [ -d ${version}/${arch} ] ; then
rm -fr ${version}/${arch}
fi
mkdir -p ${version}/${arch}
cd ${version}/${arch}
tar xf ../../netboot.tar.gz
rm ../../netboot.tar.gz
cd ../..
echo "Remember to add a boot section to /etc/tftp/pxelinux.cfg/default"
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment