Created
October 10, 2011 22:20
-
-
Save gdamjan/1276752 to your computer and use it in GitHub Desktop.
Revisions
-
gdamjan revised this gist
Dec 3, 2012 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -28,13 +28,13 @@ LABEL arch MENU LABEL Arch Linux i686 LINUX /arch/boot/i686/vmlinuz INITRD /arch/boot/i686/archiso.img APPEND ip=dhcp checksum=y archiso_http_srv=http://${pxeserver}/ archisobasedir=pxe/arch/ # get files from http://mirror.centos.plus.hr/centos/6.3/os/x86_64/images/pxeboot/ # put them in /home/tftproot/centos/6.3/x86_64 the same for i386 LABEL centos6.3 MENU LABEL Centos 6.3 (32-bit) kernel /centos/6.3/x86_64/vmlinuz initrd /centos/6.3/x86_64/initrd.im EOF -
gdamjan revised this gist
Dec 3, 2012 . 1 changed file with 1 addition and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -31,6 +31,7 @@ LABEL arch APPEND ip=dhcp checksum=y archiso_http_srv=http://192.168.234.1/ archisobasedir=pxe/arch/ # get files from http://mirror.centos.plus.hr/centos/6.3/os/i386/images/pxeboot/ # put them in /home/tftproot/centos/6.3/i386 LABEL centos6.3 MENU LABEL Centos 6.3 (32-bit) kernel centos/6.3/i386/vmlinuz -
gdamjan revised this gist
Dec 3, 2012 . 2 changed files with 19 additions and 16 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -1,14 +1,15 @@ #!/bin/sh mkdir /home/tftproot # install syslinux from package and symlink it or just download and extract it ln -s /usr/lib/syslinux /home/tftproot/syslinux mkdir /home/tftproot/pxelinux.cfg/ cat > /home/tftproot/pxelinux.cfg/default <<EOF # file names relative to /home/tftproot UI /syslinux/menu.c32 TIMEOUT 600 TOTALTIMEOUT 9000 ONTIMEOUT localboot 0 @@ -18,19 +19,21 @@ MENU TITLE PXE netboot server LABEL memtest MENU LABEL Boot Memtest86+ V4.20 KERNEL /misc/memtest86 APPEND - # get the official Arch ISO file. Mount it in /mnt/arch then make a symlink # /mnt/arch/arch/ <- /home/tftproot/arch/ LABEL arch MENU LABEL Arch Linux i686 LINUX /arch/boot/i686/vmlinuz INITRD /arch/boot/i686/archiso.img APPEND ip=dhcp checksum=y archiso_http_srv=http://192.168.234.1/ archisobasedir=pxe/arch/ # get files from http://mirror.centos.plus.hr/centos/6.3/os/i386/images/pxeboot/ LABEL centos6.3 MENU LABEL Centos 6.3 (32-bit) kernel centos/6.3/i386/vmlinuz initrd centos/6.3/i386/initrd.im EOF 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 charactersOriginal file line number Diff line number Diff line change @@ -11,7 +11,7 @@ ip link set up dev $LAN # start dns, dhcp, tftp, pxe server dnsmasq --dhcp-range=${NET}.100,${NET}.200,2h -i $LAN -z -d \ --enable-tftp --tftp-root=/home/tftproot/ --dhcp-boot=/syslinux/gpxelinux.0 # setup NAT and enable routing -
gdamjan revised this gist
Dec 3, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -10,7 +10,7 @@ ip addr add ${NET}.1/24 dev $LAN ip link set up dev $LAN # start dns, dhcp, tftp, pxe server dnsmasq --dhcp-range=${NET}.100,${NET}.200,2h -i $LAN -z -d \ --enable-tftp --tftp-root=/home/tftproot/ --dhcp-boot=/pxelinux.0 -
gdamjan revised this gist
Dec 3, 2012 . 1 changed file with 4 additions and 3 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -2,16 +2,17 @@ WAN=wlan0 LAN=eth0 NET=192.168.234 # setup LAN network ip addr add ${NET}.1/24 dev $LAN ip link set up dev $LAN # start dns, dhcp, tftp, pxe server dnsmasq --dhcp-range=${NET}.100,${NET}.200,2h -d \ --enable-tftp --tftp-root=/home/tftproot/ --dhcp-boot=/pxelinux.0 # setup NAT and enable routing iptables -t nat -A POSTROUTING -o $WAN -j MASQUERADE -
gdamjan revised this gist
May 17, 2012 . 1 changed file with 1 addition and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -23,7 +23,7 @@ LABEL memtest # get files from http://mirror.yellowfiber.net/archlinux/iso/archboot/latest/boot/ LABEL archboot MENU LABEL ArchBoot KERNEL archboot/vmlinuz INITRD archboot/initrd.img -
gdamjan revised this gist
May 17, 2012 . 1 changed file with 5 additions and 5 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -27,10 +27,10 @@ LABEL archboot KERNEL archboot/vmlinuz INITRD archboot/initrd.img # get files from http://mirror.centos.plus.hr/centos/6.2/os/i386/images/pxeboot/ LABEL centos6.2 MENU LABEL Centos 6.2 (32-bit) kernel centos/6.2/i386/vmlinuz initrd centos/6.2/i386/initrd.im EOF -
gdamjan revised this gist
Oct 10, 2011 . 1 changed file with 6 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -7,6 +7,7 @@ ln -s /usr/lib/syslinux/gpxelinux.0 /home/tftproot/pxelinux.0 mkdir /home/tftproot/pxelinux.cfg cat > /home/tftproot/pxelinux.cfg/default <<EOF # file names relative to /home/tftproot UI syslinux/menu.c32 TIMEOUT 600 TOTALTIMEOUT 9000 @@ -26,5 +27,10 @@ LABEL archboot KERNEL archboot/vmlinuz INITRD archboot/initrd.img # get files from http://mirror.centos.plus.hr/centos/6.0/os/i386/images/pxeboot/ LABEL centos6.0 MENU LABEL Centos 6.0 (32-bit) kernel centos/6.0/i386/vmlinuz initrd centos/6.0/i386/initrd.im EOF -
gdamjan revised this gist
Oct 10, 2011 . 1 changed file with 5 additions and 1 deletion.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -4,11 +4,15 @@ WAN=wlan0 LAN=eth0 NET=192.168.200 # setup LAN network ip addr add ${NET}.1/24 dev $LAN ip link set up dev $LAN # start dns, dhcp, tftp, pxe server dnsmasq -d --enable-tftp --tftp-root=/home/tftproot/ --dhcp-boot=/pxelinux.0 \ --dhcp-range=${NET}.100,${NET}.200,2h # setup NAT and enable routing iptables -t nat -A POSTROUTING -o $WAN -j MASQUERADE sysctl -w net.ipv4.ip_forward=1 -
gdamjan revised this gist
Oct 10, 2011 . 1 changed file with 7 additions and 0 deletions.There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -20,4 +20,11 @@ LABEL memtest KERNEL misc/memtest86 APPEND - # get files from http://mirror.yellowfiber.net/archlinux/iso/archboot/latest/boot/ LABEL archboot MENU LABEL ArchBoot 2k11-R6 KERNEL archboot/vmlinuz INITRD archboot/initrd.img EOF -
gdamjan created this gist
Oct 10, 2011 .There are no files selected for viewing
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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,23 @@ #!/bin/sh mkdir /home/tftproot ln -s /usr/lib/syslinux /home/tftproot/syslinux ln -s /usr/lib/syslinux/gpxelinux.0 /home/tftproot/pxelinux.0 mkdir /home/tftproot/pxelinux.cfg cat > /home/tftproot/pxelinux.cfg/default <<EOF UI syslinux/menu.c32 TIMEOUT 600 TOTALTIMEOUT 9000 ONTIMEOUT localboot 0 PROMPT 0 MENU TITLE PXE netboot server LABEL memtest MENU LABEL Boot Memtest86+ V4.20 KERNEL misc/memtest86 APPEND - EOF 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 charactersOriginal file line number Diff line number Diff line change @@ -0,0 +1,14 @@ #!/bin/sh WAN=wlan0 LAN=eth0 NET=192.168.200 ip addr add ${NET}.1/24 dev $LAN ip link set up dev $LAN iptables -t nat -A POSTROUTING -o $WAN -j MASQUERADE dnsmasq -d --enable-tftp --tftp-root=/home/tftproot/ --dhcp-boot=/pxelinux.0 \ --dhcp-range=${NET}.100,${NET}.200,2h sysctl -w net.ipv4.ip_forward=1