steven@precise32:~$ LC_ALL=C sudo 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): [drbl.org] Set DOMAIN as drbl.org ------------------------------------------------------ Please enter NIS/YP domain name: [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, press Ctrl-C to quit this program now, edit /etc/drbl/client-ip-hostname, then run this program again. [precise32] Set the client hostname prefix as precise32 ------------------------------------------------------ eth0: IP address 192.168.120.172, netmask 255.255.255.0 eth1: IP address 192.168.155.254, 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.155.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.155.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 eth1. [1] ****************************************************** How many DRBL clients (PC for students) connected to DRBL server's ethernet network interface eth1 ? Please enter the number: [12] 5 ****************************************************** The final number in the last set of digits in the client's IP address is "5". We will set the IP address for the clients connected to DRBL server's ethernet network interface eth1 as: 192.168.155.1 - 192.168.155.5 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.155.254 +- to clients group 1 [ 5 clients, their IP | | from 192.168.155.1 - 192.168.155.5] +-----------------------------+ ****************************************************** Total clients: 5 ****************************************************** 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 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 4 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. [3] Use Clonezilla live as the OS (Operating System) of clients (Testing). Which mode do you prefer? [0] Full clonezilla mode is set! ****************************************************** ****************************************************** The CPU arch for clients when running Clonezilla job: i386 ------------------------------------------------------ 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 "switch-pxe-bg-mode -m text". [Y/n] Use graphic PXE Linux menu for the 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... ------------------------------------------------------ ****************************************************** 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... ------------------------------------------------------ ****************************************************** The calculated NETWORK for eth1 is 192.168.155.0. ****************************************************** ****************************************************** 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! ------------------------------------------------------ Some files are found in /usr/share/drbl//prerun/drbl/. Run them first... 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 i686 kernel with version 3.2.0-53-generic-pae... Trying to update the /tftpboot/node_root/lib/modules/3.2.0-53-generic-pae from server's /lib/modules/... This might take several minutes... Found kernel modules in /lib/modules/3.2.0-53-generic-pae and its arch "i686" matches client's "i686"... Syncing /lib/modules/3.2.0-53-generic-pae to client's common root... Syncing /boot/*-3.2.0-53-generic-pae* to client's common root... Generating the /tftpboot/node_root/lib/modules/3.2.0-53-generic-pae/modules.dep Syncing /lib/firmware/ to client's common root... 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! Found udevd rule causes block devices with LVM signatures to be automatically added to their volume group. Temporarily disable it otherwise the partition tool won't be able to inform the kernel the changes of partition table... `/tftpboot/node_root/lib/udev/rules.d/85-lvm2.rules' -> `/tftpboot/node_root/lib/udev/rules.d/85-lvm2.rules.drblsave' The startup services for DRBL client are: firstboot portmap ypbind ssh dbus acpid acpi-support 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.....rsync: readlink_stat("/var/lib/lightdm/.gvfs") failed: Permission denied (13) rsync error: some files/attrs were not transferred (see previous errors) (code 23) at main.c(1070) [sender=3.0.9] . done! Creating DRBL client: precise32101 192.168.155.1... Generating SSH host keys for client 192.168.155.1 if they do not exist... done! Display manager:"lightdm"... Setting node 192.168.155.1 as normal_login... done! Creating DRBL client: precise32102 192.168.155.2... Generating SSH host keys for client 192.168.155.2 if they do not exist... done! Display manager:"lightdm"... Setting node 192.168.155.2 as normal_login... done! Creating DRBL client: precise32103 192.168.155.3... Generating SSH host keys for client 192.168.155.3 if they do not exist... done! Display manager:"lightdm"... Setting node 192.168.155.3 as normal_login... done! Creating DRBL client: precise32104 192.168.155.4... Generating SSH host keys for client 192.168.155.4 if they do not exist... done! Display manager:"lightdm"... Setting node 192.168.155.4 as normal_login... done! Creating DRBL client: precise32105 192.168.155.5... Generating SSH host keys for client 192.168.155.5 if they do not exist... done! Display manager:"lightdm"... Setting node 192.168.155.5 as normal_login... done! Modifying option diskless_client_os in drbl-ocs.conf... 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... Now stop the NAT service... 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 ypserv ypbind yppasswdd ypxfrd isc-dhcp-server nfs-kernel-server tftpd-hpa drbl-clients-nat Force to add portmap service in this Debian DRBL server... Force to add ypserv service in this Debian DRBL server... Force to add ypbind service in this Debian DRBL server... Force to add yppasswdd service in this Debian DRBL server... Force to add ypxfrd service in this Debian DRBL server... Force to add isc-dhcp-server 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 ypserv ypbind yppasswdd ypxfrd isc-dhcp-server nfs-kernel-server tftpd-hpa drbl-clients-nat initctl: Unknown instance: portmap start/running, process 9284 ypserv stop/waiting ypserv start/running, process 9336 ypbind stop/waiting ypbind start/running, process 9366 yppasswdd stop/waiting yppasswdd start/running, process 9384 ypxfrd stop/waiting ypxfrd start/running, process 9395 initctl: Unknown instance: isc-dhcp-server start/running, process 9405 * Stopping NFS kernel daemon ...done. * Unexporting directories for NFS kernel daemon... ...done. * Exporting directories for NFS kernel daemon... ...done. * Starting NFS kernel daemon ...done. tftpd-hpa stop/waiting tftpd-hpa start/running, process 9466 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 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 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 "dcs" -> clonezilla-start to start Clonezilla service, so that there will be a Clonezilla menu when client boots *****************************************************. Adding normal users to group "dialout 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:plugdev) will be updated: tune-debian-dev-group-perm -g "dialout audio cdrom plugdev floppy video" -e Some files are found in /usr/share/drbl//postrun/drbl/. Run them now... *****************************************************. Enjoy DRBL!!! http://drbl.org; http://drbl.nchc.org.tw 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) *****************************************************. The DRBL server is ready! Now set the client machines to boot from PXE. (refer to http://drbl.sourceforge.net for more details) P.S. 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: drblpush -c /etc/drbl/drblpush.conf