18
Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License . Based on a work at web.itu.edu.tr . Sistem Departmanı Stajı 4. Hafta Raporu www.cscrs.itu.edu.tr Ağustos 28, 2010 Zemre Arslan [email protected]

Sistem Departmanı Stajı · Böylelikle network üzerinden boot edilen bilgisayarların DRBL üzerindeki DHCP sunucusundan IP almalarını sağlıyoruz. İstemcimiz, DRBL sunucusu

  • Upload
    others

  • View
    13

  • Download
    0

Embed Size (px)

Citation preview

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    Sistem Departmanı Stajı

    4. Hafta Raporu www.cscrs.itu.edu.tr

    Ağustos 28, 2010

    Zemre Arslan

    [email protected]

    file:///C:/Users/Zemre/Desktop/UHUZAM%20Staj/www.cscrs.itu.edu.trfile:///C:/Users/Zemre/Desktop/UHUZAM%20Staj/[email protected]

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu

    İçerik

    1. Clonezilla Server Nedir?

    2. Clonezilla Server Nasıl Çalışır? 2.1 İstemciyi network üzerinden boot etme

    3. Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu

    4. Kaynakça

    1. Clonezilla Server Nedir? Clonezilla Norton Ghost ya da Acronis gibi popüler imaj alma programlarının aksine OpenSource ücretsiz bir disk imajı alma (clone) yazılımıdır. Clonezilla live ve Clonezilla SE (Server edition) olmak üzere iki çeşit Clonezilla yazılımı mevcuttur. Clonezilla live ile tek bir makine için backup alma ve restore(onarım) işlemleri gerçekleştirilebilir. Ancak biz alacağımız imajı birden fazla homojen makineye ağ üzerinden atacağımız için server edition’ı tercih edeceğiz. Clonezilla SE, www.conezilla.org sitesinden ücretsiz olarak indirilebilir. İndirilen iso image’ını bir compact disk’e yazdıktan sonra, bilgisayarımızı cd’den boot edip Clonezilla Server kurulumuna geçebiliriz.

    2. Clonezilla Server Nasıl Çalışır?

    Clonezilla Server, Diskless Remote Boot in Linux (DRBL) kullanmaktadır. DRBL, bir bilgisayarın

    üzerinde bir sistem olmamasına rağmen network üzerinden boot edilebilmesini sağlar. DRBL,

    Clonezilla kurulumu sırasında defaultta geliyor; yani özel olarak DRBL için kurulum

    yapmamıza gerek yoktur. Clonezilla Server kurulumu tamamlandıktan sonra imajı alınacak ya

    da restore işlemleri gerçekleştirilecek olan LAN’daki bilgisayarları network üzerinden boot

    etmek gerekmekte. Böylelikle network üzerinden boot edilen bilgisayarların DRBL üzerindeki

    DHCP sunucusundan IP almalarını sağlıyoruz. İstemcimiz, DRBL sunucusu ile iletişime geçmiş

    oluyor ve gerekli imaj/restore işlemleri, bu şekilde gereçekleştirilebiliyor.

    http://www.conezilla.org/

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    2.1 İstemciyi network üzerinden boot etme

    DRBL sunucusu ile istemcinin irtibatı için bilgisayarın network üzerinden boot edilmesi gerektiğinden bahsetmiştik. Ancak bazı sistemler network üzerinden boot’u desteklemeyebilirler. Bizim elimizdeki sistemlerde de network boot yapılamadığından Etherboot projesinin yeni versiyonu olan gPXE’den yararlandık. Etherboot projesi takımı yıllardır sistemlerin network üzerinden boot edilebilmesini sağlayan OpenSource kodlar geliştirmekle meşguller; bu kodlar boot edilebilen tüm taşınabilir medyalara yüklenebilmekte. Biz ellerinde hazır olan gPXE iso image’larından birini cd’ye yazdık ve bilgisayarı CD üzerinden başlattık; böylelikle bilgisayar network üzerinden başlatılmış oldu. Sürekli bir çözüm için gPXE, NIC’lerin (ethernet kartı) ROM’una da yazılabilmekte; ancak biz imaj alma işlemini de server üzerinden eşzamanlı yaparak zaman kazanmak istediğimizden bunu tercih etmeyeceğiz. Ayrıntılı bilgi için şu link incelenebilir: http://etherboot.org/wiki/romburning

    3. Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu Öncelikle Server kurulu olan sistemimizde ethernet yapılandırması yapmamız gerekmektedir. DRBL sunucusu üzerinde DHCP servisinin çalıştığından bahsetmiştik. Bunun için kendi networkümüzden ayrı bir networkte çalışmak daha sağlıklı bir sonuç elde edilmesini

    sağlayacaktır. Bu sebeple ethernet kartımızı eth0’a ikincil bir ip (alias) tanımlamamız gerekmektedir. Bunun için /etc/network/interfaces dosyasının içeriğini düzenlemeliyiz. Aşağıda tanımladığımız alias ip satırlarını belirtilen dosyanın altına ekleyelim: auto eth0:1 iface eth0:1 inet static address 192.168.1.0 netmask 255.255.255.0 Kendi networkümüz 10.0.0.0 networkü olduğundan DRBL için farklı bir network tanımladık.(Clonezillayı multicast olarak kullanacağımız için) Ayrıca sistemimiz üzerindeki ethernet kartlarını görmek için /etc/udev/rules.d/70-persistent-net.rules dosyası incelenebilir. Bu dosyayı editleyerek onboard ve external ethernet kartı problemlerinizi çözebilirsiniz. Network yapılandırmamızı tamamladık. Şimdi DRBL için dizin oluşturalım. #mkdir usr/src/DRBL komutu ile klasörümüzü oluşturduk. Şimdi #cd usr/src/DRBL ile dizinin içine girelim zira tüm yapılandırmalarımızı bu dizin

    içerisinde yapacağız. Şimdi DRBL’nin GPG anahtarını indirip import etmemiz gerekmekte. Bunun için;

    #wget http://drbl.nchc.org.tw/GPG-KEY-DRBL ile anahtarımızı aldık. Şimdi anahtarı #apt-key add GPG-KEY-DRBL ile import edelim.

    DRBL paketini

    http://etherboot.org/wiki/romburning

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    # wget http://puzzle.dl.sourceforge.net/sourceforge/drbl/drbl-1.9.2-

    19.i386.rpm ile download edelim.

    Paket drbl—1.9.2-19.i386.rpm formatında gelmektedir. Rpm paketleri RedHat ile uyumludur. Biz bunu debianda import edeceğimiz için; *.deb formatına çevirmemiz gerekmekte. Bunu alien adı verilen bir tool ile yapabilmekteyiz. #apt-get install alien komutu ile önce alien toolu yüklüyoruz.

    Daha sonra #alien drbl—1.9.2-19.i386.rpm komutu ile rpm paketimizi deb uzantılı pakete çevirmiş bulunmaktayız. Fakat burada dikkatli incelenirse yeni .deb uzantılı pakette alien, versiyon numarasını bir arttırmıştır. (yeni hali drbl_1.9.2_20.i386.deb olmuştur) Bu bir problem teşkil etmemektedir ancak istenilirse –k parametresi ile alienın sadece dosya uzantısını değiştirmesi sağlanabilir.

    Şimdi elimizdeki debian paketini yüklemek için #dpkg -i drbl_1.9.2_20.i386.deb komutu yürütülmelidir. /etc/apt/sources.list dosyası altına aşağıdaki satırlar eklenmelidir: deb http://free.nchc.org.tw/ubuntu lucid main restricted universe multiverse deb http://free.nchc.org.tw/drbl-core drbl stable

    Herhangi bir hata ile karşılaşılmadıysa DRBL paketi başarıyla yüklenmiş demektir. Şimdi son aşamada # /opt/drbl/sbin/drblsrv –i komutunu yürütüyoruz. Sorulan sorulara cevap vereceğiz ve bu doğrultuda drbl paketi bizden otomatik olarak hangi paketleri yüklemesi gerektiği bilgisini alacak.Verilmesi gereken cevapları kırmızı olarak renklendirdim; inceleyiniz.

    Hint! When a yes/no option is available, the default value is uppercase,

    Ex. (y/N), the default is "N", when you press "Enter", it will use "N". If

    you are not sure which one to choose, you can just press "Enter" key.

    *****************************************************.

    *****************************************************.

    Installing DRBL for Debian Linux...

    *****************************************************.

    Do you want to install those network installation boot images so that you

    can let client to install some GNU/Linux distributions (Debian, Ubuntu,

    RedHat Linux, Fedora Core, Mandriva, CentOS and OpenSuSE...) via network ?

    ///NOTE/// This action will download a lot of files (> 100 MB totally) from

    Internet, so it might take a few minutes. If your client machine has

    harddisk and it is possible you will install GNU/Linux into that, say Y

    here. If you say "no" here, feel free to run drbl-netinstall to install

    them later.

    [y/N] n *****************************************************.

    This GNU/Linux distribution uses one kernel to support SMP and non-SMP

    arch.

    *****************************************************.

    Do you want to use the serial console output for clients ?

    If you do NOT know anything about this, say "N" here, otherwise clients

    might show NOTHING on the screen !

    [y/N] n *****************************************************.

    It's Ubuntu as server, so generic kernel is available.

    *****************************************************.

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    Which CPU architecture kernel do you want to assign for DRBL clients ?

    0 -> i386 level CPU

    1 -> i586 level CPU

    2 -> Use the same CPU level with that of this DRBL server

    Note! Note Note! Note! Note! Note! Note!

    NOTE!!! If your client machine(s) is not the same level with server, please

    answer "0" or "1", otherwise your client machine(s) will NOT be able to

    boot.

    If you use wrong CPU level kernel, the glibc and openssl package might use

    i686 or i386, the kernel might use i686, i586 or i386, which might be not

    suitable to all your machines.

    If you are not sure, "1" is recommended, this will still have good

    performance and compatibility.

    [2] 0

    //Bu kısım biraz uzun sürecektir. Bir işlem yapılmasına

    ihtiyaç yoktur. Bekleyelim.. Selecting previously deselected package drbl-ntfsprogs.

    Unpacking drbl-ntfsprogs (from .../drbl-ntfsprogs_2.0.0-4_i386.deb) ...

    Selecting previously deselected package drbl-partimage.

    Unpacking drbl-partimage (from .../drbl-partimage_0.6.8-1drbl_i386.deb) ...

    Selecting previously deselected package mkswap-uuid.

    Unpacking mkswap-uuid (from .../mkswap-uuid_0.1.1-1_i386.deb) ...

    Selecting previously deselected package partclone.

    Unpacking partclone (from .../partclone_0.2.11-1drbl_i386.deb) ...

    Selecting previously deselected package pigz.

    Unpacking pigz (from .../pigz_2.1.5-1drbl_i386.deb) ...

    Selecting previously deselected package tftpd-hpa.

    Unpacking tftpd-hpa (from .../tftpd-hpa_5.0-11ubuntu2_i386.deb) ...

    Processing triggers for man-db ...

    Processing triggers for ureadahead ...

    Processing triggers for install-info ...

    Setting up gawk (1:3.1.6.dfsg-4build1) ...

    Setting up libslp1 (1.2.1-7.6) ...

    Setting up portmap (6.0.0-1ubuntu2) ...

    portmap start/running, process 17741

    Setting up nis (3.17-31) ...

    * Stopping NIS services [

    OK ]

    * Setting NIS domainname to: localdomain

    * Starting NIS services [

    OK ]

    Setting up aoetools (30-3ubuntu1) ...

    * Starting AoE devices discovery and mounting AoE filesystems

    * not started.

    Setting up bc (1.06.95-2) ...

    Setting up clonezilla (2.3.6-42) ...

    Setting up libcurl3 (7.19.7-1ubuntu1) ...

    Setting up curl (7.19.7-1ubuntu1) ...

    Setting up dhcp3-server (3.1.3-2ubuntu3) ...

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    Generating /etc/default/dhcp3-server...

    * Starting DHCP server dhcpd3

    * check syslog for diagnostics.

    [fail]

    invoke-rc.d: initscript dhcp3-server, action "start" failed.

    Setting up dialog (1.1-20080819-1) ...

    Setting up discover-data (2.2009.12.19) ...

    Setting up libdiscover2 (2.1.2-3) ...

    Setting up discover (2.1.2-3) ...

    Setting up disktype (9-1) ...

    Setting up etherwake (1.09-3) ...

    Setting up ethtool (6+20091202-1) ...

    Setting up freedos (1.0-15drbl) ...

    Setting up genisoimage (9:1.1.10-1ubuntu1) ...

    Setting up gpxe (1.0.0-1drbl) ...

    Setting up grub (0.97-29ubuntu60) ...

    Setting up lftp (4.0.2-1) ...

    Setting up libdevmapper-event1.02.1 (2:1.02.39-1ubuntu4) ...

    Setting up libdigest-sha1-perl (2.12-1build1) ...

    Setting up libevent-1.4-2 (1.4.13-stable-1) ...

    Setting up libgssglue1 (0.1-4) ...

    Setting up libnfsidmap2 (0.23-2) ...

    Setting up librpcsecgss3 (0.19-2) ...

    Setting up watershed (5) ...

    update-initramfs: deferring update (trigger activated)

    Setting up lvm2 (2.02.54-1ubuntu4) ...

    update-initramfs: deferring update (trigger activated)

    Setting up mknbi (1.4.4-2ubuntu1) ...

    Setting up mkpxeinitrd-net (1.5-7) ...

    Setting up mtools (4.0.10-1ubuntu1) ...

    Ignoring install-info called from maintainer script

    The package mtools should be rebuilt with new debhelper to get trigger

    support

    Setting up netcat-traditional (1.10-38) ...

    Setting up netcat (1.10-38) ...

    Setting up nfs-common (1:1.2.0-4ubuntu4) ...

    Creating config file /etc/idmapd.conf with new version

    Creating config file /etc/default/nfs-common with new version

    Adding system user `statd' (UID 105) ...

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    Adding new user `statd' (UID 105) with group `nogroup' ...

    Not creating home directory `/var/lib/nfs'.

    statd start/running, process 18208

    gssd stop/pre-start, process 18233

    idmapd stop/pre-start, process 18261

    Setting up nfs-kernel-server (1:1.2.0-4ubuntu4) ...

    Creating config file /etc/exports with new version

    Creating config file /etc/default/nfs-kernel-server with new version

    * Exporting directories for NFS kernel daemon... [

    OK ]

    * Starting NFS kernel daemon [

    OK ]

    Setting up reiserfsprogs (1:3.6.21-1build1) ...

    Setting up sdparm (1.02-1) ...

    Setting up ssh (1:5.3p1-3ubuntu4) ...

    Setting up syslinux (2:3.63+dfsg-2ubuntu3) ...

    Setting up traceroute (2.0.13-2) ...

    update-alternatives: using /usr/bin/traceroute.db to provide

    /usr/bin/traceroute (traceroute) in auto mode.

    update-alternatives: using /usr/bin/traceroute6.db to provide

    /usr/bin/traceroute6 (traceroute6) in auto mode.

    update-alternatives: using /usr/bin/lft.db to provide /usr/bin/lft (lft) in

    auto mode.

    update-alternatives: using /usr/bin/traceproto.db to provide

    /usr/bin/traceproto (traceproto) in auto mode.

    update-alternatives: using /usr/bin/traceroute-nanog.db to provide

    /usr/bin/traceroute-nanog (traceroute-nanog) in auto mode.

    update-alternatives: using /usr/sbin/tcptraceroute.db to provide

    /usr/sbin/tcptraceroute (tcptraceroute) in auto mode.

    Setting up udpcast (20100130-1drbl) ...

    Setting up unzip (6.0-1build1) ...

    Setting up vblade (20-1ubuntu1) ...

    * Starting vblade deaemons vblade

    Setting up wakeonlan (0.41-10) ...

    Setting up zip (3.0-2) ...

    Setting up drbl-chntpw (0.0.20040818-7) ...

    Setting up drbl-etherboot (5.4.3-2) ...

    Setting up drbl-lzop (1.02-0.8drbl) ...

    Setting up drbl-ntfsprogs (2.0.0-4) ...

    Setting up drbl-partimage (0.6.8-1drbl) ...

    Setting up mkswap-uuid (0.1.1-1) ...

    Setting up partclone (0.2.11-1drbl) ...

    Setting up pigz (2.1.5-1drbl) ...

    Setting up tftpd-hpa (5.0-11ubuntu2) ...

    tftpd-hpa start/running, process 18585

    Processing triggers for libc-bin ...

    ldconfig deferred processing now taking place

    Processing triggers for initramfs-tools ...

    update-initramfs: Generating /boot/initrd.img-2.6.32-24-generic

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    *****************************************************.

    *****************************************************.

    Trying to upgrade some necessary packages if available...

    *****************************************************.

    In ayo repository, searching the latest kernel ...

    The latest kernel in the ayo repository is linux-image-2.6.32-24-386

    Use the kernel linux-image-2.6.32-24-386 from apt repository!

    Reading package lists... Done

    Building dependency tree

    Reading state information... Done

    Suggested packages:

    fdutils linux-doc-2.6.32 linux-source-2.6.32 linux-tools

    The following NEW packages will be installed:

    linux-image-2.6.32-24-386

    0 upgraded, 1 newly installed, 0 to remove and 2 not upgraded.

    Need to get 31.3MB of archives.

    After this operation, 98.9MB of additional disk space will be used.

    Get:1 http://tr.archive.ubuntu.com/ubuntu/ lucid-updates/main linux-image-

    2.6.32-24-386 2.6.32-24.41 [31.3MB]

    Fetched 31.3MB in 5min 31s (94.5kB/s)

    Download complete and in download only mode

    *****************************************************.

    Install kernel for clients... ...

    In ayo repository, searching the latest kernel ...

    *****************************************************.

    Now run: drblsrv-offline -c -d -a -l en_US.UTF-8 -k

    /var/cache/apt/archives/linux-image-2.6.32-24-386_2.6.32-24.41_i386.deb ""

    ""

    Kernel package /var/cache/apt/archives/linux-image-2.6.32-24-386_2.6.32-

    24.41_i386.deb is used for client...

    *****************************************************.

    The version number for your OS: Ubuntu 10.04

    *****************************************************.

    *****************************************************.

    Install kernel for clients... ...

    The kernel for client is from specific package

    /var/cache/apt/archives/linux-image-2.6.32-24-386_2.6.32-24.41_i386.deb.

    tar: Record size = 8 blocks

    Installing /var/cache/apt/archives/linux-image-2.6.32-24-386_2.6.32-

    24.41_i386.deb for clients...

    It might take several minutes to install this kernel, please be patient...

    done!

    Generating modules.dep and map files for clients... done!

    *****************************************************.

    Creating config file for PXE clients...

    Copying pxelinux.0, gpxelinux.0, menu.c32, vesamenu.c32, chain.c32,

    mboot.c32, sanboot.c32 and memdisk to /tftpboot/nbi_img...

    Copying memtest86+ to /tftpboot/nbi_img...

    Copying FreeDOS files to /tftpboot/nbi_img/...

    Generating default pxelinux config

    (/tftpboot/nbi_img/pxelinux.cfg/default)...

    Use com32 module: vesamenu.c32

    Adding menus for DRBL, local boot, memtest86+, FreeDOS...

    done!

    *****************************************************.

    tar: Record size = 8 blocks

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    *****************************************************.

    Creating the image files for PXE and Etherboot client, this will take a few

    minutes ...

    The latest kernel for DRBL clients is 2.6.32-24-386

    Running mknic-nbi --kernel 2.6.32-24-386 --all --no-modules

    Will client check DHCP server name is "drbl" or not: yes

    The maximum times to try to get IP address for a client: 3

    The pause time after network card is up: 0

    Setting port for udhcpc request to default...

    Using the kernel modules from /tftpboot/node_root//lib/modules...

    The selected kernel for DRBL clients is: 2.6.32-24-386

    Kernel 2.6 was found, so default to use initramfs.

    Creating the network boot initrd for PXE clients by: mkpxeinitrd-net -k

    2.6.32-24-386 -t initramfs

    Use kernel modules from /tftpboot/node_root//lib/modules/2.6.32-24-386.

    Calling hook udev...

    Creating the initRAMFS image...

    Initramfs, remove ramdisk_size/ramdisk_block in

    /tftpboot/nbi_img/pxelinux.cfg/default if exists...

    Finished!

    Done!

    *****************************************************.

    Done!

    Done yazısı görüldüğünde kurulumun son aşamasına geçilebilir. Kurulumun son aşamasına geçelim: # /opt/drbl/sbin/drblpush –i komutu ile yapılandırmayı başlatacağız:

    ******************************************************

    Hint! When a yes/no option is available, the default value is uppercase,

    Ex. (y/N), the default is "N", when you press "Enter", it will use "N".

    If you are not sure which one to choose, you can just press "Enter" key.

    ******************************************************

    Searching the installed packages for DRBL server...This might take several

    minutes.

    Finished searching the installed packages for DRBL server.

    ******************************************************

    ------------------------------------------------------

    The interactive mode let you supply the information of your DRBL

    environment.

    ------------------------------------------------------

    ------------------------------------------------------

    Please enter DNS domain (such as drbl.sf.net):

    [drbl.name] test.local

    Set DOMAIN as test.net //burada yazılanın çok bir önemi yok;

    istenilen domain verilebilir. ------------------------------------------------------

    Please enter NIS/YP domain name://Enter ile geçelim [penguinzilla]

    Set DOMAIN as penguinzilla

    ------------------------------------------------------

    Please enter the client hostname prefix:

    This prefix is used to automatically create hostname for clients.

    If you want to overwrite some or all automatically created hostnames,

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    press Ctrl-C to quit this program now, edit /opt/drbl/conf/client-ip-

    hostname,

    then run this program again.

    [Clonezilla]

    Set the client hostname prefix as Clonezilla

    ------------------------------------------------------

    eth0: IP address 192.168.0.250, netmask 255.255.255.0

    eth0:1: IP address 192.168.12.254, netmask 255.255.255.0

    Configured ethernet card(s) found in your system: eth0 eth0:1

    ------------------------------------------------------

    The public IP address of this server is NOT found.

    Which ethernet port in this server is for public Internet accsess,

    not for DRBL connection ?

    Available ethernet ports in this server:

    eth0 (10.0.0.254), eth0:1 (10.0.100.254),

    [eth0] //Enter diyelim. The ethernet port you choose for the WAN connection: eth0

    The ethernet port(s) for DRBL environment: eth0:1

    ******************************************************

    ******************************************************

    Now we can collect the MAC address of clients!

    If you want to let the DHCP service in DRBL server offer same IP address

    to client every time when client boot, and you never did this procedure,

    you should do it now! If you already have those MAC addresses of clients,

    you can put them into different group files (These files number is the same

    number of networks cards for DRBL service). In this case, you can skip this

    step.

    This step helps you to record the MAC addresses of clients, then divide

    them into

    different groups. It will save your time and reduce the typos.

    The MAC addresses will be recorded turn by turn according to the boot of

    clients,

    and they will be put into different files according to the network card in

    server,

    file name will be like macadr-eth1.txt, macadr-eth2.txt... You can find

    them in

    directory /etc/drbl.

    Please boot the clients by order, make sure they boot from etherboot or

    PXE!

    Do you want to collect them ?

    [y/N] y ******************************************************

    OK! Let's do it!

    request_eth_port:eth0:1

    *****************************************************.

    Start detecting MAC address....

    Enter 1 or press Enter to view the collecting status.

    Enter 2 or q to finish collecting and quit.

    //Burada 1 seçeneği seçildikten sonra eğer bir istemciyi

    networkten başlatmış olsaydık onun mac adresini toplayacaktı

    ve gösterecekti. Fakat herhangi bir makinayı boot etmediğim

    için makina dhcp’ye istek göndermedi ve görüldüğü üzere hiçbir

    mac adresini bulamadı. =======================================

    Total: 0

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    =======================================

    Enter 1 or press Enter to view the collecting status.

    Enter 2 or q to finish collecting and quit.

    *****************************************************.

    The collected MAC addresses from [eth0:1] are saved in file(s) separately:

    macadr-eth0:1.txt.

    These files are saved in directory /etc/drbl.

    ******************************************************

    OK! Let's continue...

    ******************************************************

    Do you want to let the DHCP service in DRBL server offer same IP address to

    the

    client every time when client boots (If you want this function, you have to

    collect the MAC addresses of clients, and save them in file(s) (as in the

    previous procedure)). This is for the clients connected to DRBL server's

    ethernet network interface eth0:1 ?

    [y/N] y ******************************************************

    OK! Please tell me the file name which contains the MAC address of clients

    line by line for eth0:1.

    [macadr-eth0:1.txt]

    Hostmin: 192.168.12.1

    ******************************************************

    What is the initial number do you want to use in the last set of digits in

    the

    IP (i.e. the initial value of d in the IP address a.b.c.d) for DRBL clients

    connected to this ethernet port eth0:1.

    [1] 10//İstenilen sayı verilebilir. ******************************************************

    The file name you set is "macadr-eth0:1.txt".

    The clients number in this file is 1.

    We will set the IP address for the clients connected to DRBL server's

    ethernet

    network interface eth0:1 By the MAC address file you set, the IP addresses

    for

    the clients connected to DRBL server's ethernet network interface

    eth0:1 as: 192.168.100.10 - 192.168.100.10

    Accept ? [Y/n]

    ******************************************************

    OK! Let's continue...

    ******************************************************

    The Layout for your DRBL environment:

    ******************************************************

    NIC NIC IP Clients

    +-----------------------------+

    | DRBL SERVER |

    | |

    | +-- [eth0] 192.168.0.254 +- to WAN

    | |

    | +-- [eth0:1] 192.168.100.254 +- to clients group 0:1 [ 1 clients,

    their IP

    | | from 192.168.100.10 -

    192.168.100.10]

    +-----------------------------+

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    ******************************************************

    Total clients: 1

    ******************************************************

    Press Enter to continue...

    ******************************************************

    ------------------------------------------------------

    In the system, there are 3 modes for diskless linux services:

    [0] Full DRBL mode, every client has its own NFS based /etc and /var.

    [1] DRBL SSI (Single system image) mode, every client uses tmpfs based /etc

    and

    /var. In this mode, the loading and necessary disk space of server will be

    lighter.

    NOTE!

    (a) The client machine memory is recommended at least 256 MB.

    (b) The setting and config files of client will not be saved to the DRBL

    server!

    They are just used once and will vanish after the machine shutdowns!

    Besides, if you modify any file in the template client (located in

    /tftpboot/nodes)

    you have to run /opt/drbl/sbin/drbl-gen-ssi-files to create the template

    tarball

    in /tftpboot/node_root/drbl_ssi/.

    (c) If you want to provide some file to overwrite the setting in the

    template

    tarball when client boots, check

    /tftpboot/node_root/drbl_ssi/clients/00_README

    for more details.

    [2] I do NOT want to provide diskless Linux service to client.

    Which mode do you prefer ?

    [0] 2 No diskless Linux for client is the system.

    ******************************************************

    ******************************************************

    ------------------------------------------------------

    In the system, there are 3 modes available for clonezilla:

    [0] Full Clonezilla mode, every client has its own NFS based /etc and /var.

    [1] Clonezilla box mode, every client uses tmpfs based /etc and /var.

    In this mode, the loading and necessary disk space of server will be

    lighter than

    that in Full Clonezilla mode.

    Note! In Clonezilla box mode, the setting and config files of client will

    not be saved to the DRBL server! They just use once and will vanish

    after the machine shutdowns!

    [2] I do NOT want clonezilla.

    Which mode do you prefer ?

    [0] 1 Clonezilla box mode is set, an elegant mode for clonezilla is on the way!

    ******************************************************

    ******************************************************

    ------------------------------------------------------

    When using clonezilla, which directory in this server you want to store the

    saved image (Please use absolute path, and do NOT assign it under /mnt/,

    /media/ or /tmp/) ?

    [/home/partimag] /storage/images (Burada arzu edilen başka bir

    path de verilebilir.)

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    Directory for clonezilla saved images: /storage/disk-images

    ------------------------------------------------------

    If there is a local harddrive with swap partition or writable file system

    in your

    client machine, do you want to use that swap partition or create a swap

    file in

    the writable filesystem so that client has more memory to use ?

    (This step will NOT destroy any data in that harddisk)

    [Y/n]//Defaultta Yes olduğundan Enter diyip geçelim ******************************************************

    OK! We will try to create a swap space for your client if it has a

    local hard drive!

    ------------------------------------------------------

    What's the maximun size (Megabytes) for the swap space ?

    We will try to allocate the swap space for you, if it's not enough, 60% of

    the

    free space will be used.

    [128]//Enter diyip geçelim maxswapsize=128

    ******************************************************

    ------------------------------------------------------

    Which mode do you want the clients to use after they boot ?

    "1": Graphic mode (X window system) (default),

    "2": Text mode.

    [1] 2 The clients will use text mode when they boot.

    ******************************************************

    ------------------------------------------------------

    Do you want to set the root's password for clients instead of using same

    root's password copied from server ? (For better security)

    [y/N]N OK! Let's continue...

    ------------------------------------------------------

    Do you want to set the pxelinux password for clients so that when client

    boots,

    a password must be entered to startup (For better security)

    [y/N]N OK! Let's continue...

    ------------------------------------------------------

    Do you want to set the boot prompt for clients ?

    [Y/n]Y How many 1/10 sec is the boot prompt timeout for clients ?

    [70] //Entera basalım, default değer olan 70 saniyeyi verelim. OK! Let's continue...

    ------------------------------------------------------

    ------------------------------------------------------

    Do you want to use graphic background for PXE menu when client boots ?

    Note! If you use graphical PXELinux menu, however client fails to boot,

    you can switch to text mode by running "/opt/drbl/sbin/switch-pxe-bg-mode -

    m text".

    [y/N]N Use graphic PXE Linux menu for client.

    ------------------------------------------------------

    ------------------------------------------------------

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    By using alias interface, every client can have 2 IPs,

    one of them is private IP for clients connected to DRBL server, and the

    other is

    public IP for clients directly connected to WAN from switch!

    Do you want to setup public IP for clients ?

    ------------------------------------------------------

    Do you want to let DRBL clients have an option to run terminal mode ?

    i.e. you want to let that client run remote display (which will mostly use

    resources of server), say "Y" here.

    N

    Note!

    0. If you say yes to this option, this will be a very limited environment

    for

    client, i.e. NO local access for USB, CD, audio, printer, etc. in client.

    1. If your server is not powerful, say "no" here.

    2. By saying "yes" here, we will turn on xdmcp,

    It is never a safe thing to turn on that. Setting up /etc/hosts.allow and

    /etc/hosts.deny to only allow local access is another alternative

    but not the safest.

    Firewalling port 177 is the safest if you wish to have xdmcp on.

    Read the manual for more notes on the security of XDMCP.

    Please set it by yourself!

    3. If you say "yes" here, you might have to restart your

    desktop environment manager (gdm/kdm) later, remember to save your data

    before

    you close applications!

    Do you want to let client has an option to run terminal mode ?

    [y/N]

    OK! Let's continue...

    ------------------------------------------------------

    ------------------------------------------------------

    Do you want to let DRBL server as a NAT server ? If not,

    your DRBL client will NOT be able to access Internat.

    //İstemci tarafında herhangi bir değişiklik yapılmayacağından

    bu soruya hayır diyeceğiz:

    [Y/n] N This DRBL server does NOT provide NAT service, so your DRBL client will NOT

    be

    able to access Internat.

    ******************************************************

    The running kernel in the server supports NFS over TCP!

    Note! If you change the running kernel in the server, and not sure whether

    the

    kernel supports NFS over udp or tcp, you'd better to re-run "drblpush -i"

    again

    to avoid the client boots in failure!

    Press Enter to continue...

    ------------------------------------------------------

    Searching installed Etherboot files for dhcpd.conf... done!

    ******************************************************

    The calculated NETWORK for eth0:1 is 192.168.12.0.

    ******************************************************

    ******************************************************

    We are now ready to deploy the files to system!

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    Do you want to continue ?

    Warning! If you go on, your firewall rules will be overwritten during the

    setup!

    The original rules will be backuped as iptables.drblsave in system config

    directory

    (/etc/sysconfig or /etc/default).

    [Y/n]Y ******************************************************

    OK! Let's do it!

    ------------------------------------------------------

    Checking the necessary disk space... done!

    Copying the config file to /etc/drbl... done!

    Backup the original /etc/hosts as /etc/hosts.drblsave... done!

    Generate the /etc/hosts for clients connected to eth0:1... done!

    Cleaning the stale files of the diskless nodes if they exist... done!

    Backuping the old MAC address files... done!

    *****************************************************.

    *****************************************************.

    The version number for your GNU/Linux: CO5.2

    Keeping the old common root files if they exist...

    Keeping old nodes if they exist...

    Creating common root files... This might take several minutes...........

    done!

    Update the kernel for client if necessary...

    The DRBL client uses i686 kernel with version 2.6.18-92.el5...

    Trying to update the /tftpboot/node_root/lib/modules/2.6.18-92.el5 from

    server's

    /lib/modules/... This might take several minutes...

    Found kernel modules in /lib/modules/2.6.18-92.el5 and its arch "i686"

    matches

    client's "i686"...

    Syncing /lib/modules/2.6.18-92.el5 to client's common root...

    Syncing /boot/*-2.6.18-92.el5* to client's common root...

    Generating the /tftpboot/node_root/lib/modules/2.6.18-92.el5/modules.dep

    Copying the directory /etc/ to clients common root /tftpboot/node_root...

    Cleaning the ssh key file ssh_host_dsa_key copied from server... done!

    Cleaning the ssh key file ssh_host_dsa_key.pub copied from server... done!

    Cleaning the ssh key file ssh_host_key copied from server... done!

    Cleaning the ssh key file ssh_host_key.pub copied from server... done!

    Cleaning the ssh key file ssh_host_rsa_key copied from server... done!

    Cleaning the ssh key file ssh_host_rsa_key.pub copied from server... done!

    Commenting the TCPwrapper related file /tftpboot/node_root/etc/hosts.deny

    copied from server... done!

    Commenting the TCPwrapper related file /tftpboot/node_root/etc/hosts.allow

    copied from server... done!

    The startup services for DRBL client are:

    firstboot netfs portmap crond nfslock sshd crond xfs ypbind kudzu haldaemon

    messagebus acpid gpm cups drblthincli mkswapfile arm-wol

    Using udev for clients... Warning! Unable to find the fine-tune file

    /opt/drbl/setup/files/RH/CO5.2/rc.sysinit.CO5.2.drbl, use

    /opt/drbl/setup/files/RH/rc.sysinit.default-RH.drbl as /etc/rc.d/rc.sysinit

    for DRBL clients!

    This may cause some problems to DRBL clients!

    Warning! Unable to find the fine-tune file

    /opt/drbl/setup/files/RH/CO5.2/halt.CO5.2.drbl,

    use /opt/drbl/setup/files/RH/halt.default-RH.drbl as

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    /etc/init.d/halt for DRBL clients!

    This may cause some problems to DRBL clients!

    Deleting the accounts (except root) in the clients common root template...

    done!

    Enabling the NIS client in the common root template... done!

    Creating some necessary files in the clients common root template.......

    done!

    Creating DRBL client: Clonezilla0-110 192.168.12.10...

    Creating DRBL client: Clonezilla0-111 192.168.12.11...

    Template client for DRBL SSI is 192.168.12.10

    Disable the password in pxelinux simple menu for all clients...

    Disabling PXE password in config file

    /tftpboot/nbi_img/pxelinux.cfg/default...

    done!

    Now add necessary services to this DRBL server: DHCP, TFTP, NFS, NIS...

    Generating the NFS exports for DRBL clients...

    Backup the original /etc/exports as /etc/exports.drblsave

    Exporting to clients by IP address line-by-line...

    Full DRBL or Full Clonezilla mode, exporting client's directories etc, var,

    root...

    The /etc/exports setting is ok now!

    This DRBL server does NOT provide NAT service, so your DRBL client will NOT

    be

    able to access Internet.

    Now stop the NAT service...

    Flushing firewall rules: [ OK ]

    Setting chains to policy ACCEPT: filter [ OK ]

    Unloading iptables modules: [ OK ]

    Now set the YP securenets...

    Backup the original /var/yp/securenets as /var/yp/securenets.drblsave

    The /var/yp/securenets setting is done!

    Update YP...

    Now add the service: dhcpd xinetd portmap iptables ypserv ypbind yppasswdd

    ypxfrd nfs nfslock

    Force to add dhcpd service in this RH-like DRBL server...

    Force to add xinetd service in this RH-like DRBL server...

    Force to add portmap service in this RH-like DRBL server...

    Force to add iptables service in this RH-like DRBL server...

    Force to add ypserv service in this RH-like DRBL server...

    Force to add ypbind service in this RH-like DRBL server...

    Force to add yppasswdd service in this RH-like DRBL server...

    Force to add ypxfrd service in this RH-like DRBL server...

    Force to add nfs service in this RH-like DRBL server...

    Force to add nfslock service in this RH-like DRBL server...

    Now start the service: dhcpd xinetd portmap iptables ypserv ypbind

    yppasswdd

    ypxfrd nfs nfslock

    Starting dhcpd: [ OK ]

    Starting xinetd: [ OK ]

    Stopping portmap: [ OK ]

    Starting portmap: [ OK ]

    Applying iptables firewall rules: [ OK ]

    Loading additional iptables modules: ip_conntrack_netbios_n[ OK ]

    Starting YP server services: [ OK ]

    Binding to the NIS domain: [ OK ]

    Listening for an NIS domain server..

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    Starting YP passwd service: [ OK ]

    Starting YP map server: [ OK ]

    Starting NFS services: exportfs: can't open /var/lib/nfs/rmtab for reading

    [ OK ]

    Starting NFS quotas: [ OK ]

    Starting NFS daemon: [ OK ]

    Starting NFS mountd: [ OK ]

    Stopping NFS locking: [ OK ]

    Stopping NFS statd: [ OK ]

    Starting NFS statd: [ OK ]

    Turn on ip_forward now.

    The GDM or KDM config file is NOT found! Skip setting the DM!

    Maybe you will not be able to make this DRBL server as thin client server!

    Clean all the previous saved config file if they exist...done!

    Turn on the boot prompt for PXE client...done!

    Turn off the thin client option in PXE boot menu...done!

    Modifying /tftpboot/nbi_img/pxelinux.cfg/default to let DRBL client use

    text

    PXE boot menu... done!

    Full DRBL mode. Remove clientdir opt for label drbl in pxelinux config...

    Setting drbl_mode="full_drbl_mode" in /etc/drbl/drbl_deploy.conf and

    /etc/drbl/drblpush.conf... done!

    Full clonezilla mode. Remove clientdir opt for label clonezilla in pxelinux

    configSetting clonezilla_mode="full_clonezilla_mode" in

    /etc/drbl/drbl_deploy.conf and /etc/drbl/drblpush.conf... done!

    You have to use "/opt/drbl/sbin/dcs" -> clonezilla-start to start

    clonezilla

    serivce, so that there will be a clonezilla menu when client boots

    *****************************************************.

    Enjoy DRBL!!!

    http://drbl.nchc.org.tw; http://drbl.name

    NCHC Free Software Labs, Taiwan. http://free.nchc.org.tw

    *****************************************************.

    If you like, you can reboot the DRBL server now to make sure everything

    is ready...

    (This is not necessary, just an option.).

    *****************************************************.

    DRBL server is ready! Now set the client machines to boot from

    PXE or Etherboot (refer to http://drbl.sourceforge.net for more details).

    NOTE! If Etherboot is used in client machine, version 5.4.0 or newer is

    required!

    PS. The config file is saved as /etc/drbl/drblpush.conf.

    Therefore if you want to run drblpush with the same config again,

    you may run it as: /opt/drbl/sbin/drblpush -c /etc/drbl/drblpush.conf

    Böylece Clonezilla Server kurulumumuz tamamlanmış oldu. Artık server ile backup ve restore işlemleri gerçekleştirilebilir.

  • Ubuntu Server 10.04 üzerine Clonezilla Server Kurulumu by Zemre Arslan is licensed under a Creative Commons Attribution-NonCommercial-NoDerivs 3.0 Unported License.

    Based on a work at web.itu.edu.tr.

    4. Kaynakça

    http://www.syslogs.org/clonezilla-server-kurulumu-part-1/ (CentOS üzerinde kurulum)

    http://www.howtoforge.com/cloning-linux-systems-with-clonezilla-server-edition-clonezilla-se

    http://www.clonezilla.org/clonezilla-server-edition/#setup

    http://packratstudios.com/index.php/2008/04/20/how-to-setup-clonezilla-on-linux-ubuntu-quick-start-guide/

    http://etherboot.org/wiki/

    http://www.syslogs.org/clonezilla-server-kurulumu-part-1/http://www.howtoforge.com/cloning-linux-systems-with-clonezilla-server-edition-clonezilla-sehttp://www.howtoforge.com/cloning-linux-systems-with-clonezilla-server-edition-clonezilla-sehttp://www.clonezilla.org/clonezilla-server-edition/#setuphttp://packratstudios.com/index.php/2008/04/20/how-to-setup-clonezilla-on-linux-ubuntu-quick-start-guide/http://packratstudios.com/index.php/2008/04/20/how-to-setup-clonezilla-on-linux-ubuntu-quick-start-guide/http://etherboot.org/wiki/