back to notes

kickstart install Note

____________________________________

-Configure HTTP & Copy ISO Image:
___________________________________

(1) Disable iptables:

service iptables stop
chkconfig iptables off

(2) Install HTTP:

yum install httpd
service httpd restart

(3) Test http:

http://IPADDRESS

(4) Mount the iso, copy the file off

mkdir -p /var/www/html/images/centos/6.5
mkdir /mnt/iso
mount -o loop,ro <file.iso> /mnt/iso
cp -a /mnt/iso/* /var/www/html/images/centos/6.5/
umount /mnt/iso

(5) Test http:

http://IPADDRESS/images

____________________________________________________________

-Configure TFTP Server and the files necessary for PXE Boot:
____________________________________________________________

o Install TFTP

yum install tftp-server

o Edit /etc/xinetd.d/tftp and change disable to 'no'

disable = no
service xinetd restart (or /etc/xinetd.d/tftp restart)

o install syslinux:

yum install syslinux

o Create the directory /var/lib/tftpboot, and copy the bootloader file pxelinux.0 to it:

cd /usr/share/syslinux (or cd /usr/lib/syslinux)

cp pxelinux.0 menu.c32 memdisk mboot.c32 chain.c32 /var/lib/tftpboot

o Create the directory /var/lib/tftpboot/boot and copy boot images for CentOS 6.5:

mkdir -p /var/lib/tftpboot/boot/centos/6.5

cp /var/www/html/images/centos/6.5/images/pxeboot/vmlinuz /var/lib/tftpboot/boot/centos/6.5

cp /var/www/html/images/centos/6.5/images/pxeboot/initrd.img /var/lib/tftpboot/boot/centos/6.5

o Create the directory /var/lib/tftpboot/pxelinux.cfg, and create a default file:

mkdir /var/lib/ftfpboot/pxelinux.cfg
vi /var/lib/tftpboot/pxelinux.cfg/default

o default should look like:

# Default boot option to use
DEFAULT menu.c32
# Prompt user for selection
PROMPT 0
# Time out period
TIMEOUT 120

MENU TITLE PXE Menu

LABEL hd
MENU LABEL Boot local hard drive
localboot 0

LABEL CentOS6.5
MENU LABEL CentOS 6.5 x86_64 NO KS eth0
KERNEL boot/centos/6.5/vmlinuz
APPEND initrd=boot/centos/6.5/initrd.img method=http://xxx.xxx.xxx.xxx/images/centos/6.5 lang=en_US.UTF-8 keymap=us ip=dhcpramdisk_size=10000

o set up correct permission:

find /var/lib/tftpboot -type f -exec chmod 644 {} \;
find /var/lib/tftpboot -type f -exec chmod 755 {} \;

________________________

-Configure DHCP Server:
________________________

(1) Disable selinux:

setenforce permissive
vi /etc/selinux/config

o Change SELINUX=Enforce to

SELINUX=permissive

(2) Install dhcp:

yum install dhcp

(3) Set up dhcp:

o Backup dhcpd.conf

cp /etc/dhcp/dhcpd.conf /etc/dhcp/dhcpd.conf.orig
touch /var/lib/dhcpd/dhcpd.leases

o edit /etc/dhcp/dhcpd.conf (a simple dhcpd.conf syntax is below)

lease-file-name "/var/lib/dhcpd/dhcpd.leases";
# option domain-name "domain name";
option domain-name-servers 8.8.8.8;
allow booting;
allowbootp;
default-lease-time 600;
max-lease-time 7200;
subnet 192.168.81.0 netmask 255.255.255.0 {
range 192.168.81.101 192.168.81.150;
option subnet-mask 255.255.255.0;
option router 192.168.81.1;
option broadcast-address 192.168.81.255;
filename "pxelinux.0";
next-server 192.168.81.6;
}

o Set fixed address (sample only)

hostnewserver {
hardwareethernet MAC-ADDRESS;
fixed-address 192.168.1.5;
}

o Restart dhcpd

service dhcpd restart
tail -f /var/log/messages

o Test DHCP server from a client

dhclient -d eth0 (or eth1 depends)

__________________

-Kickstart Setup:
__________________

o Create a directory for kickstart files

mkdir -p /var/www/html/kckstart

o A sample kickstart file

___________________

-Multi-level Menu:
___________________

o cd /var/lib/tftpboot
o copy /usr/share/syslinux/vesamenu.c32/ /var/lib/ftfpboot
o find pxechn.c32 and put in /var/lib/tftpboot
o cd /var/lib/ftfpboot/pxelinux.cfg
o mkdir menu
+ copy 5 files here

___________

WDS Setup:
___________

(Windows Deployment Service:)

(1) Prerequisites:
o DNS (8.8.8.8 is OK)
o DHCP. If DHCP is installed on a server that is located in a different subnet, configue your router to forward broadcast packets. All DHCP broadcast by client computers on UDP port 67 should be forwarded directly to both the DHCP server and the WDS server. Also, all traffic on UDP port 4011 from the client computers to the WDS server should be routed appropriately (these direct traffic, not broadcasts, to the server).

(2) Steps for installing WDS:
o Server Manager > Add roles and features > Next > Role-based or feature-based.
o Select a server from the server pool > WDS > Next. Scroll down and check "Windows Deployment Services" > click Add Features > Next > Next > Next
o Check "Deployment Server" and "Transport Server" > Next > Install > Close (when installation completed)

(3) Steps for configuring WDS:
o Start > Administrative Tools > Windows Deployment Services. If there is not a server listed under the Server node, right-click the Server node and click Add Server to add the local computer.
o Right-click the server, and then click Configure Server > Next > Standalone server (hence we don't have AD DS) > Next.
o Click to accept default path for "RemoteInstall" Folder (or create a new folder) > Next
o Check "Do not respond to any client computers" > Next
o Uncheck "Add images to the erver now" > Finish
o Right-click the server > Properties
+ Under "Boot" tab, check both boxes "Always continue the PXE boot"
+ Under "Client" tab, check "Enable unattended installation"
+ Under "TFTP" tab, enter 16384 for "Maximum Block Size"

(4) Steps for adding images:

o Mount .iso onto DVD drive (Browse the .iso and then double click)

o Add boot image:
+ Start > Administrative Tools > Windows Deployment Services. Click on "Servers"
+ Expand Servers
+ Expand WDS Server
+ Right click on "Boot Images > select "Add Boot Image". Browse to DVD (or .iso) > Sources > select boot.wim > Open > Next. Enter a name for this boot image (e.g. Windows 7) > Next.

o Add install image:
+ Expand WDS Server
+ Right click on "install Images" > select "Add image Group". Enter a name for this image group (e.g. Windows 7)
+ Right click on "Install Images" > select "Add Install Image"
++ Select an image from "Select an existing image group" > Next
++ Browse to DVD (or .iso) > Source > select install.wim > Open > Next > Next > Next. When done, click Finish.
o Eject DVD and remove the .iso

(5) Installing DHCP client:
o Hit F12 upon client start up
o At 'boot:' prompt, type 'menu'
o Select Windows > Boot to WDS
o Select your desired windows version, windows installation will start shortly.
o When prompted for user name to connect to WDS
+ UserName: workgroup\administrator
+ Password: VI8admin
o Now simply follow the rest of installation steps

__________________

Troubleshooting:
__________________

(1) DHCP address not received:

o Make sure the Firewall on the Network Install Server allows UDP packets from port 68 to port 67.

o Make sure the DHCP server is running

o Make sure there is no other DHCP server on the network.

(2) TFTP Files not downloaded:

o Make sure the Firewall on the Network Install Server allows UDP and TCP packets to port 69

o Make sure the TFTP server is running

o Install a tftp client and try to retrieve pxelinux.cfg/default

(3) Install asks where the distribution is:

o Make sure the Firewall on the Network Install Server allows TCP port 80

o Make sure you can download the distribution files from the network install server

o Make sure the "url" statement in the kickstart file is correct

o Make sure the Network Install Server is registered in DNS

(4) Install asks other questions:

o This is a problem in the kickstart file - find the appropriate section in the kickstart file.

##

















last updated may 2017