Friday, June 25, 2010

pxeboot and kickstart

(vmmanager) 10.0.2.235 is our nfs, dhcpd,tftpd server and check if there is firewall blocking those servers' ports.



[root@vmmanager ~]# cat /etc/dhcpd.conf
#
# DHCP Server Configuration file.
# see /usr/share/doc/dhcp*/dhcpd.conf.sample
#
ddns-update-style none;



subnet 10.0.2.0 netmask 255.255.255.0 {

range 10.0.2.60 10.0.2.161;
}
allow booting;
allow bootp;
class "pxeclients" { match if substring(option vendor-class-identifier, 0, 9) = "PXEClient";
filename "/bil/";
next-server 10.0.2.235;
filename "linux-install/pxelinux.0";
}
[root@vmmanager ~]#




[root@vmmanager ~]# /etc/init.d/portmap start
[root@vmmanager ~]# /etc/init.d/nfs start


[root@vmmanager ~]# cat /etc/exports
/sil *(ro)
/bil *(ro)


[root@vmmanager ~]# mount -o loop /root/Enterprise-R5-U5-Server-x86_64-dvd.iso /sil


[root@vmmanager ~]# pxeos -a -i "hpyeni" -p NFS -D 0 -s 10.0.2.235 -L /sil hpyeni


[root@vmmanager ~]# vi /tftpboot/linux-install/pxelinux.cfg/default

label 10
kernel hpyeni/vmlinuz
append initrd=hpyeni/initrd.img ramdisk_size=9690 ks=nfs:10.0.2.235:/bil/hpyeni-ks.cfg method=nfs:10.0.2.235:/sil ip=dhcp


[root@vmmanager ~]# vi /bil/hpyeni-ks.cfg


# Kickstart file automatically generated by anaconda.

install
nfs --server=10.0.2.235 --dir=/sil
lang en_US.UTF-8
keyboard trq
xconfig --startxonboot
network --device eth0 --bootproto static --ip 10.0.2.124 --netmask 255.255.255.0 --gateway 10.0.2.1 --nameserver 4.2.2.4 --hostname degistir.bek.org.tr
network --device eth1 --onboot no --bootproto dhcp --hostname degistir.bek.org.tr
network --device eth2 --onboot no --bootproto dhcp --hostname degistir.bek.org.tr
network --device eth3 --onboot no --bootproto dhcp --hostname degistir.bek.org.tr
rootpw --iscrypted $1$Y.h89l9F$r0M/ZSIEGfA6vV3Z7C7nM1
firewall --disabled
authconfig --enableshadow --enablemd5
selinux --disabled
timezone --utc Europe/Istanbul
bootloader --location=mbr --driveorder=cciss/c0d0,cciss/c0d1,cciss/c0d2 --append="rhgb quiet"
# The following is the partition information you requested
# Note that any partitions you deleted are not expressed
# here so unless you clear all partitions first, this is
# not guaranteed to work
clearpart --linux
part / --fstype ext3 --size=25000 --ondisk=cciss/c0d0 --asprimary
part swap --size=7000 --ondisk=cciss/c0d0 --asprimary
part /data2 --fstype ext3 --size=100 --grow --ondisk=cciss/c0d2 --asprimary
part /data1 --fstype ext3 --size=100 --grow --asprimary
part /data --fstype ext3 --size=100 --grow --ondisk=cciss/c0d0 --asprimary

%packages
@admin-tools
@base
@core
@dialup
@editors
@gnome-desktop
@graphical-internet
@java
@legacy-network-server
@legacy-software-support
@mail-server
@printing
@system-tools
@text-internet
@base-x
system-config-kickstart
kexec-tools
fipscheck
squashfs-tools
device-mapper-multipath
sgpio
emacs
telnet-server
rsh-server
tftp-server
compat-db
postfix
oracleasm-support
e4fsprogs
createrepo
oracle-validated
audit
oracleasm-2.6.18-194.el5
sysstat
xorg-x11-utils
xorg-x11-server-Xnest
java
strace
ncurses-devel
-rwho
-rusers
-dovecot
-sendmail-cf
-spamassassin

No comments: