En lille guide i at lave en PXE installations server.
apt-get install tftpd-hpa dhcp3-server openbsd-inetd
dhcp3-server behøves ev. ikke hvis man har anden dhcp server kørende.
Ændre default/tftpd-hpd til at køre som daemon
vi /etc/default/tftpd-hpa
Ret
RUN_DAEMON="no"
til
RUN_DAEMON="yes"
Start Tftpd-pha daemonen,
/etc/init.d/tftpd-hpa restart
Sikre at daemonen køre
netstat -ul
Output bør være noget a'la
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
udp 0 0 *:45067 *:*
udp 0 0 *:790 *:*
udp 0 0 *:bootpc *:*
udp 0 0 *:tftp *:*
udp 0 0 *:sunrpc *:*
hent sidste version af syslinux, herfra skal vi bruge et par filer lidt senere
cd /usr/src
wget ftp://ftp.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.86.tar.gz
tar -zxvf syslinux-3.86.tar.gz
cp /usr/src/syslinux-3.86/com32/menu/menu.c32 /var/lib/tftpboot/
cp /usr/src/syslinux-3.86/com32/menu/menu.c32 /var/lib/tftpboot/
cp /usr/src/syslinux-3.86/core/pxelinux.0 /var/lib/tftpboot/
Opret drev struktur for PXE filer.
mkdir -p //var/lib/tftpboot/pxelinux.cfg
mkdir -p /var/lib/tftpboot/debian/5.0.4/i386
mkdir -p /var/lib/tftpboot/debian/5.0.4/amd64
mkdir -p /var/lib/tftpboot/ubuntu/10.4/amd64
mkdir -p /var/lib/tftpboot/ubuntu/10.4/amd64
mkdir -p /tmp/debian
cd /tmp/debian
wget http://ftp.debian.org/debian/dists/Debian5.0.4/main/installer-i386/current/images/netboot/netboot.tar.gz
tar -zxvf netboot.tar.gz
rm netboot.tar.gz
xxxxxxxxxxxxxx cp -R ./* /var/lib/tftpboot/ xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
cp -R ./* /var/lib/tftpboot/debian/5.0.4/i386/
rm -rf /tmp/debian/*
amd64 installationer.
wget http://ftp.debian.org/debian/dists/Debian5.0.4/main/installer-amd64/current/images/netboot/netboot.tar.gz
tar -zxvf netboot.tar.gz
rm netboot.tar.gz
cp -R ./* /var/lib/tftpboot/debian/5.0.4/amd64/
rm -rf /tmp/debian/*
Opbyg en ordenlig menu struktur
rm /var/lib/tftpboot/pxelinux.cfg/default
vi /var/lib/tftpboot/pxelinux.cfg/default
indsæt
MENU TITLE Net-Help Install Menu
DEFAULT menu.c32
;DEFAULT vesamenu.c32
#PROMPT 0
TIMEOUT 500
ONTIMEOUT local
ALLOWOPTIONS 0
;MENU ROWS 4
MENU WIDTH 80
MENU MARGIN 15
MENU PASSWORDMARGIN 20
MENU TIMEOUTROW 20
LABEL local
MENU LABEL LocalDisk
localboot 0
LABEL Debian
MENU LABEL Debian
KERNEL menu.c32
APPEND pxelinux.cfg/Debian
LABEL Ubuntu
MENU LABEL Ubuntu
KERNEL menu.c32
APPEND pxelinux.cfg/Ubuntu
vi /var/lib/tftpboot/pxelinux.cfg/debian
MENU TITLE Net-Help Debian install menu
LABEL Main
MENU LABEL Main Manu
KERNEL menu.c32
append pxelinux.cfg/default
label install
menu label Debian Lenny I386 install
menu default
kernel debian/5.0.4/i386/debian-installer/i386/linux
append vga=normal initrd=debian/5.0.4/i386/debian-installer/i386/initrd.gz -- quiet
label install
menu label Debian Lenny amd64 install
menu default
kernel debian/5.0.4/amd64/debian-installer/amd64/linux
append vga=normal initrd=debian/5.0.4/amd64/debian-installer/amd64/initrd.gz -- quiet
vi /var/lib/tftpboot/pxelinux.cfg/ubuntu
MENU TITLE Net-Help Ubuntu install menu
LABEL Main
MENU LABEL Main Manu
KERNEL menu.c32
append pxelinux.cfg/default
label install
menu label ubuntu Lucid I386 install
menu default
kernel ubuntu/10.4/i386/debian-installer/i386/linux
append vga=normal initrd=ubuntu/10.4/i386/debian-installer/i386/initrd.gz -- quiet
label install
menu label Ubuntu Lucid amd64 install
menu default
kernel ubuntu/10.4/amd64/debian-installer/amd64/linux
append vga=normal initrd=ubuntu/10.4/amd64/debian-installer/amd64/initrd.gz -- quiet
Text not compleded..............................