Skip to content

Instantly share code, notes, and snippets.

@brycied00d
Created October 31, 2012 22:06
Show Gist options
  • Save brycied00d/3990255 to your computer and use it in GitHub Desktop.
Save brycied00d/3990255 to your computer and use it in GitHub Desktop.
Script to download the latest netboot/net-install files for Debian
#!/bin/bash
MIRROR=mirrors.us.kernel.org
ROOTDIR=/home/image/boot/
# http://$MIRROR/debian/dists/squeeze/main/installer-i386/current/images/netboot/debian-installer/i386/initrd.gz
# http://$MIRROR/debian/dists/squeeze/main/installer-i386/current/images/netboot/debian-installer/i386/linux
# $ROOTDIR/Debian/squeeze/i386/
for REL in jessie wheezy #squeeze lenny etch sarge
do
for ARCH in i386 amd64
do
echo "Sync'ing Debian $REL / $ARCH..."
mkdir -p $ROOTDIR/Debian/$REL/$ARCH/
cd $ROOTDIR/Debian/$REL/$ARCH/ && wget -N http://$MIRROR/debian/dists/$REL/main/installer-$ARCH/current/images/netboot/debian-installer/$ARCH/initrd.gz http://$MIRROR/debian/dists/$REL/main/installer-$ARCH/current/images/netboot/debian-installer/$ARCH/linux
done
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment