Wednesday, August 3, 2011

How to Customize Centos DVD using Kickstart file

How to Customize Centos DVD using Kickstart file
================================================

Here i am using CentOS 64 Bit OS to customize that.

1. Create a kickstart file with postscript and packages list
# yum install system-config-kickstart
# system-config-kickstart
# save as ks.cfg

2. Mount that DVD into /mnt
# mount -o loop /dev/cdrom /mnt ( If it is in DVD )
# mount -o loop /opt/ISO/centos_5.5_64bit_final.iso /mnt ( It is an ISO File )

3. Create a Dir for ISO Editing
# mkdir /opt/newbuild

4. Copy all the contents from /mnt to /opt/newbuild
# cp -R /mnt/* /opt/newbuild

5. Edit the isolinux.cfg in newbuild Dir
# vim /opt/newbuild/isolinux/isolinux.cfg

default linux
prompt 0
timeout 600
display boot.msg
F1 boot.msg
F2 options.msg
F3 general.msg
F4 param.msg
F5 rescue.msg
label linux
kernel vmlinuz
append initrd=initrd.img ks=cdrom:/ks.cfg ( Add this entry in this line )
label text
kernel vmlinuz
append initrd=initrd.img text
label ks
kernel vmlinuz
append ks initrd=initrd.img
label local
localboot 1
label memtest86
kernel memtest
append -

6. Modify the permission of ks.cfg file
# chmod 755 ks.cfg

7. Copy the ks.cfg file to newbuild Dir
# cp ks.cfg /opt/newbuild

8. Install mkisofs to make ISO
# yum install mkisofs

9. Make Customized ISO
# mkisofs -o CentOS-5.5_64_Kickstart.iso -b isolinux/isolinux.bin -c isolinux/boot.cat -no-emul-boot -boot-load-size 4 -boot-info-table -R -J -v -T .

10. Now ISO is ready
Write the CentOS-5.5_64_Kickstart.iso file in DVD

How to configure NTP Server in Linux

How to configure NTP Server In Linux
=====================================

Configured NTP Server in 192.168.100.223 ( support.symbioticinfo.com )

#Server Side
============
NTP Server Pool Address
1.server 1.asia.pool.ntp.org
2.server 0.asia.pool.ntp.org

#Permitting local network to use this
restrict 192.168.100.0 mask 255.255.255.0 nomodify notrap
restrict 192.168.10.0 mask 255.255.255.0 nomodify notrap
restrict 192.168.20.0 mask 255.255.255.0 nomodify notrap
restrict 192.168.30.0 mask 255.255.255.0 nomodify notrap
restrict 192.168.40.0 mask 255.255.255.0 nomodify notrap

#full access to the local net
restrict 127.0.0.1

#Client Side
===========

#yum install ntp

edit the ntp.conf file
#vim /etc/ntp.conf

#comment the following lines
#server 0.centos.pool.ntp.org
#server 1.centos.pool.ntp.org
#server 2.centos.pool.ntp.org

#add the following lines
restrict default ignore
server 192.168.100.223
restrict 192.168.100.1 mask 255.255.255.255 nomodify notrap noquery

#save and quit the file.

#Before starting the ntp daemon, run the following command

#ntpdate -b 192.168.100.223

#service ntpd start

#check the ntp

[root@gw ~]# ntpq -pn
remote refid st t when poll reach delay offset jitter
==============================================================================
192.168.100.223 140.109.1.4 11 u 3 64 1 0.257 0.368 0.001
127.127.1.0 .LOCL. 10 l 2 64 1 0.000 0.000 0.001
[root@gw ~]#

#you will get output like this..

++++++++++++++++++++++++++++++++++++THATS ALL++++++++++++++++++++++++++++++++++