Skip to content

Instantly share code, notes, and snippets.

@corpix
Created June 17, 2012 21:02
Show Gist options
  • Select an option

  • Save corpix/2945734 to your computer and use it in GitHub Desktop.

Select an option

Save corpix/2945734 to your computer and use it in GitHub Desktop.
PXE netinstall
#!/bin/bash
ARCH=i386
RELEASE=17
TFTP=/var/lib/tftpboot
A_TARGET=$TFTP/fedora/$RELEASE/$ARCH
TARGET=fedora/$RELEASE/$ARCH
MIRROR=http://mirror.yandex.ru/fedora/linux/releases/$RELEASE/Fedora/$ARCH/os
mkdir -p $A_TARGET
wget $MIRROR/images/pxeboot/initrd.img -O $A_TARGET/initrd.img
wget $MIRROR/images/pxeboot/vmlinuz -O $A_TARGET/vmlinuz
cat <<EOF> $TFTP/pxelinux.cfg/fedora-$RELEASE-$ARCH.cfg
LABEL linux
MENU LABEL Fedora $RELEASE-$ARCH PXE Install
KERNEL $TARGET/vmlinuz
APPEND initrd=$TARGET/initrd.img method=$MIRROR
EOF
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment