koloncu@ubuntu:~$ LANG=C sudo /opt/drbl/sbin/drblpush -i
******************************************************
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):
[deneme.net]
Set DOMAIN as deneme.net
------------------------------------------------------
Please enter NIS/YP domain name:
[koloncu]
Set DOMAIN as koloncu
------------------------------------------------------
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, press Ctrl-C to quit this program now, edit /opt/drbl/conf/client-ip-hostname, then run this program again.
[ubuntu]
Set the client hostname prefix as ubuntu
------------------------------------------------------
eth0: IP address 192.168.201.254, netmask 255.255.255.0
eth1: IP address 192.168.2.100, netmask 255.255.255.0
Configured ethernet card(s) found in your system: eth0 eth1
------------------------------------------------------
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 (192.168.120.172), eth1 (192.168.201.254),
[eth0]
The ethernet port you choose for the WAN connection: eth0
The ethernet port(s) for DRBL environment: eth1
******************************************************
******************************************************
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]
******************************************************
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 eth1 ?
[y/N]
******************************************************
OK! Let's continue, we will set the IP address of clients by "first boot gets IP first" instead of fixed one!
Hostmin: 192.168.2.101
******************************************************
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 eth1.
[1]
******************************************************
How many DRBL clients (PC for students) connected to DRBL server's ethernet network interface eth1 ?
Please enter the number:
1
******************************************************
The final number in the last set of digits in the client's IP address is "1".
We will set the IP address for the clients connected to DRBL server's ethernet network interface eth1 as: 192.168.2.101 - 192.168.2.101
Accept ? [Y/n]
******************************************************
OK! Let's continue...
******************************************************
The Layout for your DRBL environment:
******************************************************
NIC NIC IP Clients
+-----------------------------+
| DRBL SERVER |
| |
| +-- [eth0] 192.168.120.172 +- to WAN
| |
| +-- [eth1] 192.168.2.101 +- to clients group 1 [ 1 clients, their IP
| | from 192.168.2.101 - 192.168.2.101]
+-----------------------------+
******************************************************
Total clients: 1
******************************************************
Press Enter to continue...
******************************************************
------------------------------------------------------
In the system, there are 1 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]
Full DRBL mode is chosen!
******************************************************
******************************************************
------------------------------------------------------
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]
Full clonezilla mode is set!
******************************************************
******************************************************
------------------------------------------------------
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]
Directory for clonezilla saved images: /home/partimag
------------------------------------------------------
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]
******************************************************
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]
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]
The clients will enter graphic mode after booting.
******************************************************
------------------------------------------------------
Which mode do you want when client boots in graphic mode ?
0: normal login, 1: auto login, 2: timed login
[0]
The clients will wait for user to login 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]
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]
OK! Let's continue...
------------------------------------------------------
Do you want to set the boot prompt for clients ?
[Y/n]
How many 1/10 sec is the boot prompt timeout for clients ?
[70]
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]
Use text PXE Linux menu for client.
------------------------------------------------------
------------------------------------------------------
Do you want to let audio, cdrom, floppy, video and plugdev (like USB device) open to all users in the DRBL client ? If yes, we will add all the users to those device groups in the server and client.
[Y/n]
OK! Let's continue...
------------------------------------------------------
------------------------------------------------------
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 ?
[y/N]
------------------------------------------------------
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.
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.
[Y/n]
OK! Let's continue...
------------------------------------------------------
------------------------------------------------------
Do you want to keep the old setting of existing DRBL clients if they exist ?
[Y/n]
We will try to keep the setting of the DRBL clients if they already exist.
******************************************************
******************************************************
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 eth1 is 192.168.2.201.
******************************************************
******************************************************
We are now ready to deploy the files to system!
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]
******************************************************
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 eth1... done!
Cleaning the stale files of the diskless nodes if they exist... done!
*****************************************************.
*****************************************************.
The version number for your GNU/Linux: DBN-TU
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 i586 kernel with version 2.6.27-11-generic...
Trying to update the /tftpboot/node_root/lib/modules/2.6.27-11-generic from server's /lib/modules/... This might take several minutes...
Found kernel modules in /lib/modules/2.6.27-11-generic and its arch "i586" matches client's "i586"...
Syncing /lib/modules/2.6.27-11-generic to client's common root...
Syncing /boot/*-2.6.27-11-generic* to client's common root...
Generating the /tftpboot/node_root/lib/modules/2.6.27-11-generic/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_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 portmap nis nfs-common ssh hal dbus acpid acpi-support usplash cups drblthincli mkswapfile arm-wol sendsigs umountfs
Using udev for clients... Set graphic mode for Debian DRBL client...
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: ubuntu101 192.168.2.101... Generating SSH host keys for client192.168.2.101 if they do not exist... done!
Template client for DRBL SSI is 192.168.201.1
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!
Now generate the firewall rules for NAT service...
Stop the NAT service first...
Flushing firewall rules: success
ip_forward is already on.
Now set the YP securenets...
Backup the original /etc/ypserv.securenets as /etc/ypserv.securenets.drblsave
The /etc/ypserv.securenets setting is done!
Update YP...
Now add the service: portmap dhcp3-server nis nfs-common nfs-kernel-server tftpd-hpa drbl-clients-nat
Force to add portmap service in this Debian DRBL server...
Force to add dhcp3-server service in this Debian DRBL server...
Force to add nis service in this Debian DRBL server...
Force to add nfs-common service in this Debian DRBL server...
Force to add nfs-kernel-server service in this Debian DRBL server...
Force to add tftpd-hpa service in this Debian DRBL server...
Force to add drbl-clients-nat service in this Debian DRBL server...
Now start the service: portmap dhcp3-server nis nfs-common nfs-kernel-server tftpd-hpa drbl-clients-nat
* Stopping portmap daemon...
...done.
* Starting portmap daemon...
...done.
* Stopping DHCP server dhcpd3
...done.
* Starting DHCP server dhcpd3
...done.
* Starting NIS services
...done.
* Stopping NFS common utilities
...done.
* Starting NFS common utilities
...done.
* Stopping NFS kernel daemon
...done.
* Unexporting directories for NFS kernel daemon...
...done.
* Exporting directories for NFS kernel daemon...
...done.
* Starting NFS kernel daemon
...done.
Restarting HPA's tftpd: in.tftpd.
Stopping the NAT services for DRBL clients... Now stop the NAT service...
Flushing firewall rules: success
done!
Starting the NAT services for DRBL clients... done!
ip_forward is already on.
The display manager in this DRBL server is "gdm"
The GDM remote access in the DRBL server is already off!
Disable the terminal mode for DRBL clients ...
done !
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 graphical 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 config...
Setting 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 serivice, so that there will be a clonezilla menu when client boots
*****************************************************.
Adding normal users to group "audio cdrom plugdev floppy video"........ done!
*****************************************************.
Updating the YP/NIS for group...
Note! If you add new or remove accounts in the DRBL server in the future, remember to run the following command again, so that some group (EX

lugdev) will be updated:
tune-debian-dev-group-perm -g "audio cdrom plugdev floppy video" -e
*****************************************************.
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.org 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
evet artık sunucumuz hazır ve çalışır durumda olması lazım,
klonlanacak makineyi acınca clonezilla menüsünü görmemiz lazım , oradakendisi otomatik olarak disk imajını servera kaydetmesi gerekiyor.
kayıttan sonra sonra
sudo /opt/drbl/sbin/dcs komutu ile diğer makinelere klonlama işlemini başlatıyoruz
ilk ekranda All. seçiniz
sonra clonezilla-start
sonra “select-in-client” böylece yedek(clone) mi yoksa geri yükleme(restore) mi seçebiliyoruz( makinelerdeki açılış menüsünde)
eğer tüm aşamaları doğru yapabildiysek, 15-20 dk içinde tüm makinelere imaj geri yüklenmiş olmalı.
umarım faydalı olur, baya karmaşık ama bir kez öğrendiğinizde işiniz o kadar kolaylaşıyorki, deneyip görmeniz lazım.