EnderUNIX Team.


EnderUNIX İpucu

Arkadaşıma gönder , Ana Sayfa

[ Linux ]

"Kickstart + PXE = Bare bone kickstart" - Ömer Faruk Şen - (2005-09-26 16:00:11)   [6285]

0) 192.168.6.246 makinasi kurulum sunumcusunun kendisidir. Bu sunumcu uzerinde nfs, tftp, xinetd, dhcpd calismaktadir. dhcpd.conf dosyasinda clu2 adi ile verilen makina (ayni zamanda MAC adresi de daha onceden alinmali) kurulmak istenen makinadir.


1) Kurulacak linux versiyonu kurulum sunucusuna (installation server)'a
kopyalanir. Mesela Redhat 'in 4 cd'si var. Hepsi teker teker mount edilerek
istenilen yere kopyalanir
- mount /media/cdrom
- mkdir /var/cdrom
- cd /var/cdrom
- cp -Rp /media/cdrom/* .

Bu islem her cd icin tekrarlanir.

2) nfs servisi aktive edilir.
- echo "/var/cdrom 192.168.6.0/255.255.255.0(ro)" > /etc/exports
- service nfs start
- chkconfig nfs on

3) dhcp servisi aktive edilir
- dhcpd.conf'a su satirlar eklenir

---------/etc/dhcpd.conf icerigi -----
ddns-update-style interim;
deny unknown-clients;
not authoritative;
log-facility local7;

subnet 192.168.6.0 netmask 255.255.255.0 {

option routers 192.168.6.1;
option subnet-mask 255.255.255.0;

option nis-domain "uekae.tubitak.gov.tr";
option domain-name "uekae.tubitak.gov.tr";
option domain-name-servers 192.168.6.10;
allow bootp;
allow booting;
option ip-forwarding false;
option mask-supplier false;


range dynamic-bootp 192.168.6.250 192.168.6.253;
default-lease-time 21600;
max-lease-time 43200;

host clu2 {
hardware ethernet 00:50:fc:f6:20:e8;
#hardware ethernet 00:90:47:03:F7:EB;
fixed-address 192.168.6.254;
next-server 192.168.6.246;
filename "pxelinux.0";
}
}
--------/etc/dhcpd.conf icerigi sonu ----------

- dhcp servisi calistirilir
service dhcpd start
chkconfig dhcpd on

3) kickstart.cfg dosyasi olusturulur


--------ks.cfg dosyasi------------------
# Kickstart file automatically generated by anaconda.

install
nfs --server 192.168.6.246 --dir=/var/cdrom
lang en_US.UTF-8
langsupport --default=en_US.UTF-8 en_US.UTF-8
keyboard us
xconfig --card "NVIDIA GeForce 2 MX (generic)" --videoram 32768 --hsync 30-71 --vsync 50-160 --resolution 800x600 --depth 16 --startxonboot --defaultdesktop gnome
network --device eth0 --bootproto dhcp --hostname clu2.uekae.tubitak.gov.tr
network --device eth1 --bootproto dhcp --hostname clu2.uekae.tubitak.gov.tr
rootpw --iscrypted $1$iFZT0XD5$hxz2JXX.sAIg4KEQeLYMV/
firewall --disabled
selinux --permissive
authconfig --enableshadow --enablemd5
timezone Europe/Istanbul
bootloader --location=mbr --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 --all
part /boot --fstype "ext3" --size=100
part pv.100000 --size=20000
volgroup VG0 --pesize=32768 pv.100000
logvol swap --fstype swap --name=LV2 --vgname=VG0 --size=960
logvol / --fstype ext3 --name=LV1 --vgname=VG0 --size=19008

%packages
@ web-server
@ server-cfg
@ dialup
@ admin-tools
@ smb-server
@ base-x
@ printing
@ gnome-desktop
@ development-tools
@ text-internet
kernel
grub
e2fsprogs
kernel-devel
lvm2

%post

----------- ks.cfg sonu --------------------------




4) tftp servisi acilir
- mkdir /tftpboot
- mkdir /tftpboot/pxelinux.cfg
- /tftpboot/pxelinux.cfg/default dosyasi olusturulur.

- /tftpboot/pxelinux.cfg/default dosyasi -----
default linux
label linux
kernel vmlinuz
append ksdevice=eth0 console=tty0 load_ramdisk=1 initrd=initrd.img network ks=nfs:192.168.6.246:/var/cdrom/ks.cfg

--- /tftpboot/pxelinux.cfg/default dosyasi sonu --

COK ONEMLI: append ile baslayan kisim sadece bir satir olmalidir. Cekirdek \ ya da \n karakterinden anlamaz...


- syslinux sayfasindan pxelinux.0 dosyasi /tftpboot dizinine kopyalanir.
x) wget http://www.kernel.org/pub/linux/utils/boot/syslinux/syslinux-3.11.tar.gz
x) tar zxvf syslinux-3.11.tar.gz
x) cp syslinux-3.11/pxelinux.0 /tftpboot/

- vmlinuz ve initrd.img dosyasi /tftpboot dizinine kopyalanir
x) cp /var/cdrom/images/pxeboot/initrd.img /tftpboot/
x) cp /var/cdrom/images/pxeboot/vmlinuz /tftpboot/



- /etc/xinetd.d/tftp dosyasi olusturulur.



------ /etc/xinetd.d/tftp -------------------
# default: off
# description: The tftp server serves files using the trivial file transfer \
# protocol. The tftp protocol is often used to boot diskless \
# workstations, download configuration files to network-aware printers, \
# and to start the installation process for some operating systems.
service tftp
{
socket_type = dgram
protocol = udp
wait = yes
user = root
server = /usr/sbin/in.tftpd
server_args = -s /tftpboot
disable = no
per_source = 11
cps = 100 2
flags = IPv4
}
------- /etc/xinet.d/tftp sonu -----

- service xinetd restart
- chkconfig xinetd on

5) Kurulmasi istenen makina acilir ve sistemin kurulmasi bitirilir



NOT: Ayrica http://www.stanford.edu/~alfw/PXE-Kickstart/PXE-Kickstart.html
dokumani da isinize yarayabilir

NOT2: IP adresini hex'e cevirmek icin syslinux rpm paketi ile gelen /usr/bin/gethostip komutu kullanilabilir

Arkadaşıma gönder , Ana Sayfa