Saturday, 25 July 2015

Network Boot Server Installation/Configurations(PXE Server)


Requirements:

  • System for Server Role.
  • Linux/Unix ISO(We used BSD)
  • Windows PE ISO or Desired OS, syslinux package from there side.
  • Brain

Note: We already installed BSD OS. 

Configurations:

Setting up pxe-server(Network boot server)

1- Setting up DHCP SERVER

#Install isc-dhcp package form ports
#enable dhcpd in /etc/rc.conf
dhcpd_enable="YES"

#EDIT /usr/local/etc/dhcpd.conf like this

allow booting;
allow bootp;
authoritative;
option domain-name "pxe.meatspace.com";
option subnet-mask 255.255.255.0;
default-lease-time 600;
max-lease-time 7200;
#ddns-update-style ad-hoc;
log-facility local7;
subnet 192.168.45.0 netmask 255.255.255.0 {
range 192.168.45.1 192.168.45.254;
next-server 192.168.45.141;
filename "pxebsd.0";
option root-path "/root/pxe/boot/";
}


2- Setting up TFTP SERVER

#TFTP is installed by default
# enable tftp in /etc/rc.conf
 inetd_enable="YES"

#EDIT /etc/inetd.conf and insert the following line

tftp dgram udp wait nobody /usr/libexec/tftpd  tftpd /root/pxe/boot/

3-Create directories

In this case I created directory with the name "pxe"
and then created another folder with the name "boot" in it.
#set directory permissions to 755 with chmod command

Download syslinux package from there side
extract the folder with tar command

# I used syslinux-4.0.4.tgz
From syslinux package copy the follwing files to /root/pxe/boot
syslinux-4.0.4/gpxe/gpxelinux.0
syslinux-4.0.4/vesamenu.c32
syslinux-4.0.4/menu.c32
syslinux-4.0.4/memdisk/memdisk
syslinux-4.0.4/com32/modules/reboot.c32
syslinux-4.0.4/com32/modules/chain.c32

4- Create pxelinux.cfg directory in /root/pxe/boot/

create file with the name "default"
and insert the following in it.


DEFAULT menu
PROMPT 0
MENU TITLE Installation
TIMEOUT 200
TOTALTIMEOUT 6000
LABEL Windows 7
menu label Install Windows 7
com32 linux.c32
append wimboot initrdfile=bootmgr.exe,boot/BCD,boot/boot.sdi,boot/winpe.wim

# This file contains the menu options for targeted OS's that need
to be installed via LAN


######first dhcp allocates ip from pool that is configured in configuration.
the the target system searchs for tftp service and the file that is configured

in dhcpd.conf for booting via tftp services.

You may required wimboot code mentioned in default menu script for windows bootups. This can be downloaded here : http://ipxe.org/wimboot

1 comment:

  1. I am really impressed with your blog article, such great & useful knowledge you mentioned here.Your post is very informative. I have read all your posts and all are very informative. Thanks for sharing and keep it up like this.
    Hospitality Software Provide

    ReplyDelete