Created
June 17, 2012 21:02
-
-
Save corpix/2945734 to your computer and use it in GitHub Desktop.
PXE netinstall
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/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