Drlb.conf # Author: Steven Shiau # License: GPL # Setting for DRBL environment. # WARNING! DO NOT MODIFY THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # WARNING! DO NOT MODIFY THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # WARNING! DO NOT MODIFY THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # Keep drblroot="/tftpboot/nodes" and drbl_common_root="/tftpboot/node_root". These settings are already fixed in some programs. # //NOTE// The variable "DRBL_SCRIPT_PATH" is from system environment variable, and if not defined, it will be "/usr//drbl" by default. drbl_setup_path="$DRBL_SCRIPT_PATH/setup" # Do NOT put / in the end of $drblroot, it's important # when using in drbl-setup # DO NOT modify t$drblroot and $drbl_common_root, it's already fixed for the # whole system, drblsrv and drblpush use /tftpboot/nodes and /tftpboot/node_root # Why we put here is only for sometimes we can use them. drblroot="/tftpboot/nodes" drbl_common_root="/tftpboot/node_root" # Assign the NFS protocol, either "nfs3" or "nfs4" (not ready yet). If not assigned, default is nfs3. drbl_nfs_prot="" # if [ -e /etc/debian_version ]; then # SYSCONF_PATH="/etc/default/" # From Debian Squeeze, isc-dhcp-server is used, no dhcp3-server (as that in etch, lenny...) if [ -x "/usr/sbin/dhcpd3" ]; then DHCPDCONF_DIR="/etc/dhcp3" DHCP_SRV_NAME="dhcp3-server" else DHCPDCONF_DIR="/etc/dhcp" DHCP_SRV_NAME="isc-dhcp-server" fi # DHCPDLEASE_DIR is got from get_dhcpdlease_dir() in drbl-functions NFS_SRV_NAME="nfs-kernel-server" YP_SRV_NAME="nis" # Now GDM_CFG, FAC_GDM_CFG and KDM_CFG are got in drbl-functions. #GDM_CFG="/etc/X11/gdm/gdm.conf" #FAC_GDM_CFG="/etc/X11/gdm/factory-gdm.conf" #KDM_CFG="/etc/kde3/kdm/kdmrc" RCX_ROOTDIR="/etc" # The releative path between init.d and rcx.d, for Debian, it's same, so # in when working dir is in rc.d, service is in ../init.d/ RCX_REL_INITD="../init.d" # Force to set the color output when it is Debian. For RH-like distribution, # it is already defined in /etc/init.d/functions. BOOTUP=color query_allpkgs_cmd="dpkg --get-selections" query_pkglist_cmd="dpkg -L" # instead of using dpkg -s, we use dpkg -L, since dpkg -s will give the wrong # return code if a package is installed but removed later. query_pkglist_exist_cmd="dpkg -L" elif [ -e /etc/SuSE-release ]; then # SuSE SYSCONF_PATH="/etc/sysconfig/" DHCPDCONF_DIR="/etc" # DHCPDLEASE_DIR is got from get_dhcpdlease_dir() in drbl-functions DHCP_SRV_NAME="dhcpd" NFS_SRV_NAME="nfs" YP_SRV_NAME="ypserv" # Now GDM_CFG, FAC_GDM_CFG and KDM_CFG are got in drbl-functions. #GDM_CFG="/etc/opt/gnome/gdm/gdm.conf" #FAC_GDM_CFG="/etc/opt/gnome/gdm/factory-gdm.conf" #KDM_CFG="/etc/opt/kde3/share/config/kdm/kdmrc" RCX_ROOTDIR="/etc/init.d" # The releative path between init.d and rcx.d, for SuSE, it's not same, # rcx.d is under init.d. So in when working dir is in rc.d, service is in ../ RCX_REL_INITD="../" # Force to set the color output when it is SuSE. For RH-like distribution, # it is already defined in /etc/init.d/functions. BOOTUP=color query_allpkgs_cmd="rpm -qa" query_pkglist_cmd="rpm -ql" query_pkglist_exist_cmd="rpm -q" else # RH-like SYSCONF_PATH="/etc/sysconfig/" # From Fedora 11, the dhcpd config dir is in /etc/dhcp if [ -d "/etc/dhcp" ]; then DHCPDCONF_DIR="/etc/dhcp" else DHCPDCONF_DIR="/etc" fi # DHCPDLEASE_DIR is got from get_dhcpdlease_dir() in drbl-functions DHCP_SRV_NAME="dhcpd" # From Mandriva 2008.0, the nfs server name is changed to nfs-server. nfs_srv_name_chklist="nfs nfs-server" NFS_SRV_NAME="" for i in $nfs_srv_name_chklist; do if [ -e /etc/init.d/$i -o -e "/lib//system/$i.service" ]; then NFS_SRV_NAME="$i" break fi done YP_SRV_NAME="ypserv" # Now GDM_CFG, FAC_GDM_CFG and KDM_CFG are got in drbl-functions. #GDM_CFG="/etc/X11/gdm/gdm.conf" #FAC_GDM_CFG="/etc/X11/gdm/factory-gdm.conf" #KDM_CFG="/etc/kde/kdm/kdmrc" RCX_ROOTDIR="/etc" # The releative path between init.d and rcx.d, for RH-like, it's same, so # in when working dir is in rc.d, service is in ../init.d/ RCX_REL_INITD="../init.d" query_allpkgs_cmd="rpm -qa" query_pkglist_cmd="rpm -ql" query_pkglist_exist_cmd="rpm -q" fi drbl_syscfg="/etc/drbl" cache_dir="/var/cache/apt/archives" drbl_pkgdir="/usr/share/drbl/share" pxecfg_pd="/tftpboot/nbi_img"

# syslinux_binsrc_url is for downloading and pxelinux if necessary. You can change to any mirror site. E.g. "http://www.kernel.org/pub/linux/utils/boot/syslinux/" syslinux_binsrc_url="http://free.nchc.org.tw/syslinux" SYS_PXELINUX_VER_DEF="6.02" pxelinux_binsrc_dir="$DRBL_SCRIPT_PATH/pkg/syslinux/" pxelinux_file="$pxelinux_binsrc_dir//pxelinux.0" gpxelinux_file="$pxelinux_binsrc_dir/bios/gpxelinux.0" lpxelinux_file="$pxelinux_binsrc_dir/bios/lpxelinux.0" pxelinux_memdisk_file="$pxelinux_binsrc_dir/bios/memdisk" pxelinux_simple_menu="$pxelinux_binsrc_dir/bios/menu.c32" pxelinux_simple_vesamenu="$pxelinux_binsrc_dir/bios/vesamenu.c32" pxelinux_chain_file="$pxelinux_binsrc_dir/bios/chain.c32" pxelinux_mboot_file="$pxelinux_binsrc_dir/bios/mboot.c32" pxelinux_sanboot_file="$pxelinux_binsrc_dir/bios/sanboot.c32" # For Syslinux 5, new .c32 are required: ldlinux.c32, libcom32.c32, libutil.c32 # Do not list ldlinux.e32 and ldlinux.e64 here. This is only about bios, not EFI. sys_pxelinux_v5p_required_c32="ldlinux.c32 libcom32.c32 libutil.c32" # EFI boot loader option, could be either "syslinux" or "grub" # //NOTE// For syslinux 6.02, EFI boot loader for iso file is not ready yet. This option is only for testing now. live_efi_boot_loader="grub" # Note, we can not use - or other charactor, since isolinux won't accept that (drbl-pxe.png is not accepted by syslinux, however, it's ok for pxelinux). To fit both, we use drblwp.png. pxelinux_bg_img="$DRBL_SCRIPT_PATH/image/drblwp.png" PXELINUX_DIR="/tftpboot/nbi_img/pxelinux.cfg" PXE_CONF_DEF="$PXELINUX_DIR/default" isolinux_file="$pxelinux_binsrc_dir/bios/isolinux.bin" # Note, we can not use - or other charactor, since isolinux won't accept that (ocs-logo.png is not accepted by syslinux, however, it's ok for pxelinux). To fit both, we use ocswp.png. ocs_logo_img_png="$DRBL_SCRIPT_PATH/image/ocswp.png" ocs_logo_img_xpm="$DRBL_SCRIPT_PATH/image/ocswp.xpm.gz" ocs_logo_grub2_img_png="$DRBL_SCRIPT_PATH/image/ocswp-grub2.png" MEMTEST86_URL="http://www.memtest.org/download/" MEMTEST86_VER_DEF="4.20" memtest86_file="$DRBL_SCRIPT_PATH/pkg/memtest86+/memtest86" fdos_img_src="/usr/lib/freedos/fdos1440.img" fdos_img_output="fdos1440_drbl.img" PXE_RAMDISK_SIZE_DEF="19456" PXE_RAMDISK_BLOCKSIZE="1024" NETINSTALL_RAMDISK_SIZE_DEF="65535" # The default-lease- and max-lease-time in dhcpd.conf (secs) DHCPD_DEFAULT_LEASE_TIME="300" DHCPD_MAX_LEASE_TIME="300"

# The default image might show in menu if user want to show them. # note! use lowercase for the image name!!! IMG_SHOW_IN_MENU="drbl local memtest drbl-terminal" # pxelinux menu powerful_client_menu_label=" (DRBL mode, mostly local resources)" thin_client_menu_label="Linux (Terminal mode, mostly remote resources)" clonezilla_client_menu_label_prefix="" # local OS in pxelinux menu # Some might want to change it as: Debian Linux, or M$ windows... local_os_menu_label="Local (if available)"

# url_prefix="http://free.nchc.org.tw"

# graphical boot settings, now only for Fedora Core (i.e. we will put "rhgb" in pxelinux.cfg/default) graphical_boot="no"

# clonezilla image directory, the default dir is /home/partimag (YES, it's partimag instead of partimage) # NOTE! Do NOT put / in the end of the dir (i.e. Ex. use /home/partimag instead of /home/partimag/) ocsroot="/home/partimag" # clonezilla.lock path ocs_lock_dir="/var/lock/clonezilla" # clonezilla log files path ocs_log_dir="/var/log/clonezilla/" # log file for sfdisk when restoring RESTORE_SFDISK_LOG="/var/log/clonezilla-restore-sfdisk.log"

# Administrator account ID in M$ windows # This is for drbl-doit to send command to cloned M$ windows via ssh. Different language M$ windows use different ID. Ex: # English: Administrator # Traditional Chinese: Administrator # France: Administrateur # Dutch: Administrator # Default vlaue: Administrator MSWIN_ADMIN_ID="Administrator"

# default LANGUAGE # [0]: English, [1]: Traditional Chinese (Big5) - Taiwan, [2] Traditional Chinese (UTF-8, Unicode) - Taiwan" DEFAULT_LANGUAGE="0"

# default pxe timeout (unit: 1/10 sec) DEFAULT_PXE_TIMEOUT="70"

# user with UID greater than $uid_begin_default is normal user, # i.e. effective id UID_BEGIN_DEFAULT="500"

# Misc setting TIMED_GDM_TIME_DEFAULT="30" TIMED_LIGHTDM_TIME_DEFAULT="30" PASSWD_LENGTH_DEFAULT="8" AUTO_LOGIN_ID_PASSWD="$drbl_syscfg/auto_login_id_passwd.txt" # The time (how long ago) to kill the old $AUTO_LOGIN_ID_PASSWD file, in secs. TIME_2_KILL="1200"

# The default max swap file (MB) maxswapsize_default="128" # The default ramdisk size for PXE and NBI initrd (MB) default_ramdisk_size="9600"

# parameter for checking space common_root_dir="/bin /etc /lib /sbin" buffer_ratio_for_client_space="1.5"

# HOST_MAC_TABLE="$drbl_syscfg/HOST_MAC_TABLE" IP_HOST_TABLE="$drbl_syscfg/IP_HOST_TABLE"

# drbl-useradd need these: useradd_range_exec_file="drbl-useradd-range" userdel_range_exec_file="drbl-userdel-range" useradd_file_exec_file="drbl-useradd-file" userdel_file_exec_file="drbl-userdel-file" useradd_list_exec_file="drbl-useradd-list" userdel_list_exec_file="drbl-userdel-list" useradd_gen="username_pw.txt"

# XFS font server switch XFS_RATIO="1.2" fs_port="7100"

# List those packages has different arch rpms (i386, i486, i586, i686) in repository except kernel. This is specially for Redhat, Fedora, CentOS. # Ex: glibc-2.6-3.i386.rpm, glibc-2.6-3.i686.rpm # -0.9.8b-12.fc7.i386.rpm, openssl-0.9.8b-12.fc7.i686.rpm # openssl- is specially for CentOS (4.x). i686_pkg_check_list_RH_like="glibc openssl openssl-perl pm-utils libbeagle libbeagle-devel libbeagle-python beagle beagle-evolution beagle-gui"

# DRBL server necessary services checklist, both for RH-like and Debian. # list all the possible services, if it exists, will start it. # RH-like: dhcpd xinetd portmap iptables ypserv ypbind yppasswdd ypxfrd nfs nfslock nis (Note! Since Fedora Core 7, portmap is replaced by rpcbind) # Debian: nfs-common dhcp3-server nis nfs-kernel-server tftpd-hpa drbl-clients-nat inetd (woody). unfs3 is for DRBL Live if it's installed. # From Debian Squeeze, isc-dhcp-server is used, no more dhcp3-server (as that in etch, lenny...) # Note: nfs-common should be before nfs-kernel-server # SuSE: nfsserver instead of nfs (nfs is client server) # Mandriva 2008: nfs-server instead of nfs # Add :'tftp' for Fedora 21, by Ceasar drbl_server_service_chklist="dhcpd dhcp3-server isc-dhcp-server xinetd portmap rpcbind iptables nis ypserv ypbind yppasswdd ypxfrd nfs nfslock rpc-statd statd nfs-common nfs-kernel-server nfs-server unfs3 tftpd-hpa inetd nfsserver SuSEfirewall2_init SuSEfirewall2_setup drbl-clients-nat tftp" # DRBL client necessary services checklist, both for RH-like and Debian. # list the possible services are necessary for cleitns, # we will test all that in RedHat/Fedora/Mandrake/Debian... # Note: "nfs" is server in RH, but it's client in SuSE. So we have to add it # separately for SuSE. # Note: hwscan for suse will be processed later, check the session "# Take care the hardware config files, clean old, make them be detected at boot" # For , we add: acpid, acpi-support, and usplash for clients. # Note! for OpenSuSE 10.1, we add powersaved resmgr # For Fedora 7, we add ConsoleKit, which is necessary for CD/USB stick automount. Sep/12/2008. # For Mandriva 2008, we add consolekit, which is necessary for CD/USB stick automount. Oct/10/2008. # Note! service network or network-up is not necessary since network is already done in initrd of client. client_services_chklist="netfs portmap rpcbind crond nfslock sshd ypbind kudzu harddrake dm alsa sound keytable haldaemon messagebus nis nfs-common makedev ssh dbus-1 hal dbus kbd acpid acpi-support powersaved resmgr usplash gpm ConsoleKit consolekit cups cupsys pcscd cpuspeed abrtd binfmt-support"

# necessary packages for DRBL environment, # we separate them as RH, MDK, SUSE and Debian # //NOTE// Packages lzop ntfsprogs partimage maybe are not included in distribution repository (e.g. CentOS). If so, the plan is to use those in drbl repository. PKG_FROM_RH="dhcp tftp-server nfs-utils ypserv ypbind yp-tools firstboot iptables wget dialog initscripts rsync parted tcpdump bc dos2unix curl lftp - server openssh-clients coreutils gzip bzip2 nc file ethtool net-tools syslinux zip unzip iproute binutils expect lzop ntfsprogs partimage pigz pbzip2 udpcast memtest86+ yum yum-utils -utils" PKG_TO_UNINSTALL_PART1_RH="dhcp tftp-server nfs-utils ypserv ypbind yp-tools dos2unix" PKG_TO_UNINSTALL_PART2_RH=""

PKG_FROM_MDK="dhcp-server tftp-server nfs-utils ypserv ypbind yp-tools iptables wget cdialog initscripts rsync parted drakxtools pciutils autologin tcpdump bc dos2unix curl lftp openssh-server openssh-clients coreutils gzip bzip2 nc file ethtool net-tools syslinux glibc-i18ndata zip unzip binutils expect lzop ntfsprogs partimage pigz pbzip2 udpcast" PKG_TO_UNINSTALL_PART1_MDK="dhcp-server tftp-server nfs-utils ypserv ypbind yp-tools dos2unix" PKG_TO_UNINSTALL_PART2_MDK=""

# The reason we need pbbuttonsd in SuSE is we need "run-parts" PKG_FROM_SUSE="dhcp-server tftp nfs-utils ypserv ypbind yp-tools iptables wget dialog rsync parted tcpdump bc dos2unix curl lftp openssh insserv coreutils gzip bzip2 file ethtool netdiag syslinux glibc-i18ndata zip unzip iproute2 pbbuttonsd binutils expect lzop ntfsprogs partimage pigz pbzip2 udpcast memtest86+ ecryptfs-utils" PKG_TO_UNINSTALL_SUSE="dhcp-server tftp nfs-utils ypserv ypbind yp-tools"

# PKG_FROM_DBN_MINIMAL_NEED are those required packages in Debian Live, DRBL and Clonezilla # PKG_FROM_DBN_WHICH_OCS_LIVE_NEED are what we create drbl live and clonezilla live need. # PKG_FROM_DBN is those required packages when drbl server is setup ($PKG_FROM_DBN_MINIMAL_NEED is included in $PKG_FROM_DBN). # Therefore PKG_FROM_DBN_MINIMAL_NEED is the common one for "Debian Live CD for ocs" and DRBL/Clonezilla PKG_FROM_DBN_MINIMAL_NEED="util-linux gzip bzip2 lzop pigz pbzip2 procps dialog rsync parted pciutils tcpdump bc gawk hdparm sdparm netcat file ethtool etherwake ssh syslinux syslinux-efi isolinux pxelinux reiserfsprogs e2fsprogs psmisc locales wget disktype zip unzip patch iproute traceroute iputils-ping binutils expect partimage udpcast debconf-utils txt2html dosfstools ecryptfs-utils" # Use dhcp*-client$ for dhcp3-client, dhcp-client, and isc-dhcp-client (yes, debian will select 'dhcp-client' for regex 'dhcp*-client', then select 'isc-dhcp-client' for regex 'dhcp*-client'. With "$" in the end means we do not want "isc-dhcp-client-dbg" PKG_FROM_DBN_WHICH_OCS_LIVE_NEED="$PKG_FROM_DBN_MINIMAL_NEED perl-modules less -3g screen bogl-bterm jfbterm whiptail cifs-utils lftp dhcp*-client$ fbset gddrescue lvm2 xfsprogs xfsdump jfsutils console-data console-setup console-common kbd reiser4progs hfsutils hfsprogs pwgen testdisk tofrodos dvd+rw-tools udftools pcmciautils nfs-common man ncpfs pppoe pppoeconf ethtool mc wodim net-tools lshw deborphan efibootmgr cryptsetup lsscsi open-iscsi aoetools mdadm gpm ifupdown usbutils dmidecode mbr wipe hexedit -tools vim-tiny lbzip2 lzma xz-utils pxz pixz lzip plzip lrzip bsdmainutils wireless-tools iw w3m smartmontools vmfs-tools dbus dmsetup dmraid kpartx wpasupplicant cdrdao bind9-host nano grub-pc rsyslog fbcat foremost eject gzrt sudo busybox user-setup genisoimage -tools gdisk ufsutils pcscd -utils cpufrequtils acpi dirvish rsnapshot pv dnsutils vlan mpg123 -utils exfat-fuse tcplay libdata-validate-ip-perl udisks extlinux keyutils -tools lziprecover nwipe -fuse lsof htop -tools chntpw diskscan fstransform rfkill syslinux-utils f2fs-tools ntpdate bindfs zbackup ifenslave ca-certificates s3fs cloudfuse tinc" PKG_FROM_DBN="$PKG_FROM_DBN_MINIMAL_NEED initscripts tftpd-hpa nfs-kernel-server nis curl lftp iptables memtest86+ ntfs-3g" PKG_TO_UNINSTALL_PART1_DBN="$DHCP_SRV_NAME tftpd-hpa nfs-kernel-server nis" PKG_TO_UNINSTALL_PART2_DBN=""

# Some package we are not sure it exists in repository or not, so query before # install it, otherwise such as apt, one package does not exist, all the # installation will be aborted. # This is only for DRBL and DRBL live, nothing to do with Clonezilla live. # PKG_TO_QUERY is for common, and PKG_TO_QUERY_RH is for Redhat-like distributions # Add "tftp-server", "iptables-services" for Fedora 21, by Ceasar, 2015/01/14 PKG_TO_QUERY="mkinitrd lvm2 ntfs-3g genisoimage mkisofs lshw hwinfo aoetools vblade dmidecode lzop lzma xz xz-utils pxz pixz lzip pigz pbzip2 lbzip2 plzip lrzip pv hfsutils hfsprogs dmsetup dmraid kpartx device-mapper tofrodos dos2unix unix2dos dhcp3-server isc-dhcp-server gdisk btrfs-tools ufsutils disktype efibootmgr syslinux-utils tftp-server iptables-services" # PKG_TO_QUERY_RH=""

# package from DRBL # PKG_FROM_DRBL_FOR_CLONEZILLA_LIVE is the packages which clonezilla live need. PKG_FROM_DRBL_FOR_CLONEZILLA_LIVE="clonezilla mkswap-uuid partclone drbl-chntpw" PKG_FROM_DRBL="$PKG_FROM_DRBL_FOR_CLONEZILLA_LIVE mkpxeinitrd-net ipxe freedos"

# i686 package list for SUSE # TODO: make use list_available_rpm to get the lists. i686_pkg_check_list_SUSE="glibc glibc-devel db db-devel db41 db41-devel"

# Packages for , this is for Debian. # vim-common is for /usr/bin/xdd, which is required for NTFS moves and copies. debian_pkgs_for_gparted="gparted hfsutils hfsprogs jfsutils xfsprogs xfsdump reiserfsprogs reiser4progs btrfs-tools parted ntfs-3g dosfstools mtools lvm2 mbr vim-common dmsetup dmraid kpartx"

# Excluding some dir when rsync server's /etc to client's /etc # /etc/selinux/targeted is for selinux, which is already disabled in client. # //NOTE// Always remember to put the / in the end of dir. etc_exclude_dirs="/etc/selinux/targeted/"

# If /var/run is a symbolic file (on Ubuntu 11.10 or FC17, for example), we will copy it, too. Otherwise for /var/ we will only copy directories name (Files in /var/lib/ will be copied, though). Actually in this case, /var/run is linked to /run. For /var/lock, it is linked to /run/lock symbolic_files_in_var_chklist="run lock"

# The directory with its content that will NOT to be copied to common root's /lib # /lib/modules not all copied to /tftpboot/node_root/, since the kernel on the server is not always the same as that on the client. We will let mknic-nbi to take care of this. # 2013/06/09 /lib/live/mount is a mounting point for Debian live 3.x. We have to exclude it otherwise the files on DRBL live will be copied, too. Those files are not required for client. # NOTE!!! Do not append "/" in the end of the dir name lib_NOT_2_be_copied_2_common_root="modules live/mount"

# # The directory with its content that will NOT to be copied to common root's /var/lib # This is for rsyncing /var/lib/ to /tftpboot/node_root/var/lib/ # The reason that varlib_NOT_2_be_copied_2_common_root and varlib_NOT_2_be_copied_2_each_client can not share the same is that for some dir, e.g. /var/lib/{rpm,dpkg}, client will mount from /tftpboot/node_root/, so we do not have to waste the space to copy to each client's /var/lib/. # NOTE!!! Do not append "/" in the end of the dir name varlib_NOT_2_be_copied_2_common_root="tftpboot mysql vmware-server boinc-client/projects hadoop ntp/proc"

# # The directory with its content that will be copied to common root's /var/cache # This is for rsyncing /var/cache/ to /tftpboot/node_root/var/cache/ # NOTE!!! Do not append "/" in the end of the dir name varcache_2_be_copied_2_common_root="debconf sax"

# # The directory with its content that will NOT to be copied to client's /var/lib # This is for rsyncing /tftpboot/node_root to /tftpboot/nodes/$IP # Ugly here.... # lib to be copied due to those necessary files for some packages, # especially rpm database and alternatives # Do NOT copy others if you are not sure, such as /var/lib/nfs will cause # nfslock refuse to start... # NOTE!!! Do not append "/" in the end of the dir name # sax is for SuSE's DRBL firstboot. varlib_NOT_2_be_copied_2_each_client="dhcp nfs rpm dpkg apt synaptic yum urpmi" # For SuSE, we need to copy /var/X11R6 to clients also. How about /var/adm ?

# set the DIA as dialog, whiptail or xdialog if type whiptail >/dev/null 2>&1; then DIA="whiptail" else DIA="dialog" fi

# Prompt messages preference. Could be "tui" or "cmd" (default) # //NOTE// This parameter has been moved to drbl-ocs.conf and renamed as "ocs_prompt_mode" # //NOTE// Not all the messages are supported to be shown in dialog/whiptail #messages_shown_preference="cmd"

# NFS # default ratio for nfsd and total client number, i.e. the nfs daemon number # (RPCNFSDCOUNT) running in server = $NFSD_RATIO * total_client_no. NFSD_RATIO=2.5 # The upper limit for NFS daemons NFSD_MAX=120 # Extra options for NFS client in /etc/fstab nfs_client_extra_opt=""

# Yum repository blacklist, Ex. http://ftp.isu.edu.tw, it uses page by page output, it it NOT compatable with DRBL scripts. yum_repo_blacklists="http://ftp.isu.edu.tw"

# DRBL yum repo list drbl_yum_repo_list="drbl.repo drbl-testing.repo drbl-unstable.repo drbl-extra.repo drbl-legacy.repo"

# RPM MD repository config file (drbl.repo, drbl-testing.repo, drbl-unstable.repo). This is for OpenSuSE 11.1 or later. rpm_md_conf_dir_path="$drbl_setup_path/rpm-md-repos"

# Set DRBL gdm greeting background for DRBL clients ? set_drbl_gdmgreeter="yes"

# PRE_RUN_DIR and POST_RUN_DIR # The script in the direcoty $DRBLPUSH_PRERUN_DIR will be run before drblpush is run, and script in the direcoty $DRBLPUSH_POSTRUN_DIR will be run after it is finished. You need to put your own scripts in those directories if you want to use this. DRBLPUSH_PRERUN_DIR="$DRBL_SCRIPT_PATH/prerun/drbl/" DRBLPUSH_POSTRUN_DIR="$DRBL_SCRIPT_PATH/postrun/drbl/"

## drbl client common root dir## # WARNING! DO NOT MODIFY THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! # diskless_root_dir_1 are those necessary dir for mount point. # WARNING! DO NOT MODIFY THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! diskless_root_dir_1="home mnt proc tmp usr opt root dev var lib initrd sys" # diskless_root_dir_2 are those necessary dir for mount point (from drbl.conf), too. These dirs depend on distribution, so we will test it before create it. # Add misc net srv on 6/14/2005 for FC4 # WARNING! DO NOT MODIFY THIS FILE UNLESS YOU KNOW WHAT YOU ARE DOING! diskless_root_dir_2="media misc net srv selinux"

# If the dir () exists on server's /etc/fstab, append it to client's /etc/fstab: memfs_dir_in_rh_client_fstab="/dev/shm /dev/pts /sys /proc"

# dummy ethernet card port config in client (for RH-like only) # The dummy files are automatically created by DRBL to avoid to be regenerated. # They will be saved to $drblroot/$ip/etc/sysconfig/network-scripts/ifcfg-$ethx # Normally 4 NICs will be enough, if you have more NICs in DRBL client, append them. dummy_eth_nics="eth0 eth1 eth2 eth3"

# Exclude some network devices which we do not want to be used to connect to DRBL clients, e.g. vmnet8, ppp0... exclude_eth_nics=""

# diskless_root_dir_ro_user_add and diskless_root_dir_rw_user_add are user assigned directores so that client can see those directories (NFS mounted). # diskless_root_dir_ro_user_add is ReadOnly dir for client # diskless_root_dir_ro_user_add is ReadWrite dir for client # Ex: "/data /work", then # 1. /tftpboot/node_root/data and /tftpboot/node_root/work will be created (done in drblpush) # 2. /data and /work will be exported (/etc/exports) (done in drbl-nfs-exports) # 3. client will NFS mount /data (from server) as /data and /work (from server) as /work (/etc/fstab) (done in drbl-gen-client-files) # ///Note/// # (1) You must use the absolute path, for example, in the above example, "/" is necessary for /data. # (2) Do not use the dir under /media as mount point to share. /media in client is based on tmpfs, it's created everytime when it boots. diskless_root_dir_ro_user_add="" diskless_root_dir_rw_user_add=""

# Debian/ group to be added for the users created by drbl-useradd desktop_user_group_debian="dialout audio cdrom plugdev floppy video"

##################################### # GNU/Linux netinstall image settings: ##################################### # This is used in drbl-netinstall # Be default, we turn off BSD netinstall. If you want to use BSD netintsall, set this as "yes" setup_bsd_netinst="no"

# Debian netinstall debian_netinstall_ver="jessie" debian_netinstall_arch="i386 amd64" debian_url_site="http://free.nchc.org.tw" # Path to Debian where directory $ver (Ex. etch) exists path_to_debian="debian/dists" debian_netinstall_kernel="linux" debian_netinstall_initrd="initrd.gz"

# Ubuntu netinstall ubuntu_netinstall_ver="trusty vivid" ubuntu_netinstall_arch="i386 amd64" ubuntu_url_site="http://free.nchc.org.tw" # Path to Ubuntu where directory $ver (Ex. dapper) exists path_to_ubuntu="ubuntu/dists" ubuntu_netinstall_kernel="linux" ubuntu_netinstall_initrd="initrd.gz"

# Fedora netinstall fedora_netinstall_ver="21" fedora_netinstall_arch="i386 x86_64" fedora_url_site="http://free.nchc.org.tw" # Path to Fedora where directory core or releases exists path_to_fedora="fedora/linux" fedora_netinstall_kernel="vmlinuz" fedora_netinstall_initrd="initrd.img"

# CentOS netinstall centos_netinstall_ver="6 7" centos_netinstall_arch="i386 x86_64" centos_url_site="http://free.nchc.org.tw" # Path to CentOS where directory $ver (Ex. 4.4) exists path_to_centos="" centos_netinstall_kernel="vmlinuz" centos_netinstall_initrd="initrd.img"

# RedHat netinstall #redhat_netinstall_ver="8.0 9" #redhat_netinstall_arch="i386" #redhat_url_site="http://free.nchc.org.tw" # Path to RedHat where directory $ver (Ex. 9) exists #path_to_redhat="redhat/linux" #redhat_netinstall_kernel="vmlinuz" #redhat_netinstall_initrd="initrd.img"

# Mandriva netinstall mandriva_netinstall_ver="2010.0" mandriva_netinstall_arch="i586" mandriva_url_site="http://free.nchc.org.tw" # Path to Mandriva where directory $ver (Ex. 2007.1) exists path_to_mandriva="mandrake/official" mandriva_netinstall_kernel="vmlinuz" mandriva_netinstall_initrd="all.rdz"

# netinstall mageia_netinstall_ver="cauldron" mageia_netinstall_arch="i586" mageia_url_site="http://free.nchc.org.tw" # Path to Mageia where directory $ver (Ex. cauldron) exists path_to_mageia="mageia/distrib" mageia_netinstall_kernel="vmlinuz" mageia_netinstall_initrd="all.rdz"

# Scientific netinstall scientific_netinstall_ver="7x" scientific_netinstall_arch="i386 x86_64" scientific_url_site="http://free.nchc.org.tw" # Path to Scientific where directory $ver (Ex. 50) exists path_to_scientific="scientific" scientific_netinstall_kernel="vmlinuz" scientific_netinstall_initrd="initrd.img"

# OpenSuSE netinstall # Note! Works only from 10.1 opensuse_netinstall_ver="13.2" opensuse_netinstall_arch="i386 x86_64" opensuse_url_site="http://free.nchc.org.tw" # Path to OpenSUSE where directory $ver (Ex. 10.2) exists path_to_opensuse="opensuse/distribution" opensuse_netinstall_kernel="linux" opensuse_netinstall_initrd="initrd"

# FreeBSD netinstall # Note! Works only for 1 version # Ex: ftp://ftp.twaren.net/BSD/FreeBSD/releases/i386/ISO-IMAGES/8.0/8.0-RELEASE-i386-bootonly.iso freebsd_netinstall_ver="8.0" freebsd_netinstall_arch="i386" freebsd_url_site="ftp://ftp.twaren.net" # Path to FreeBSD where releases exists path_to_freebsd="BSD/FreeBSD/"

# OpenBSD netinstall # Note! Works only for 1 version # Ex: ftp://ftp.twaren.net/BSD/OpenBSD/4.6/i386/ openbsd_netinstall_ver="4.6" openbsd_netinstall_arch="i386" openbsd_url_site="ftp://ftp.twaren.net" # Path to OpenBSD where version (e.g. 4.6) exists path_to_openbsd="BSD/OpenBSD/"

# For DRBL live # try IP from 192.168."100".254 for alias IP address subnet drbl_live_private_IP_alias_eth_def="100"

# For SAN (AoE/iSCSI booting) # Only 1 dir is allowed here, since we will use it as the target dir to dump AoE file by drbl-aoe-img-dump. Later you can use drbl-aoe-srv to assign different image dirs, including multiple dirs sanboot_img_dump_dir="/home/sanboot-img" aoe_shelf_max="15" aoe_slot_max="15" drblpush.conf #Setup for general [general] domain=msf.lan nisdomain=YP.msf.lan localswapfile=yes client_init=text login_gdm_opt= timed_login_time= maxswapsize=2048 ocs_img_repo_dir=/home/partimag total_client_no=16 create_account= account_passwd_length=8 hostname=runner purge_client=yes client_autologin_passwd= client_root_passwd= client_pxelinux_passwd= set_client_system_select=no use_graphic_pxelinux_menu=yes set_DBN_client_audio_plugdev= open_thin_client_option=no client_system_boot_timeout= language=fr_FR.UTF-8 set_client_public_ip_opt=no config_file=drblpush.conf collect_mac=no run_drbl_ocs_live_prep=yes drbl_ocs_live_server= clonezilla_mode=full_clonezilla_mode live_client_branch=alternative live_client_cpu_mode=i386 drbl_mode=full_drbl_mode drbl_server_as_NAT_server=no add_start_drbl_services_after_cfg=yes continue_with_one_port=y

#Setup for team0 [team0] interface=team0 mac=macadr-team0.txt ip_start=10 gateway=10.0.0.254 drbldeploy.conf ################################## # drbl_deploy global setting # File automatically created by drblpush. # It is better not to manually modify this file. ################################## config_file="drblpush.conf" purge_client="yes" client_root_passwd="" client_pxelinux_passwd="" language="fr_FR.UTF-8" set_client_system_select="no" use_graphic_pxelinux_menu="yes" set_DBN_client_audio_plugdev="" open_thin_client_option="no" client_system_boot_timeout="" collect_mac=no total_client_no=16 nfs_protocol="tcp" client_init="text" mkswapfile="mkswapfile" ocs_img_repo_dir="/home/partimag" nfsserver_default="" nameserver="10.0.0.254" nameserver_="10.0.0.254" domain="msf.lan" nisdomain="YP.msf.lan" public_ip_list="public_ip.drbl" login_gdm_opt="" client_autologin_passwd="" timed_login_time="" run_drbl_ocs_live_prep="yes" drbl_ocs_live_server="" clonezilla_mode="full_clonezilla_mode" live_client_branch="alternative" live_client_cpu_mode="i386" drbl_mode="full_drbl_mode" sh_debug="" verbose_opt="" CLIENT_IP_HOSTNAME_LIST="IP_HOST_TABLE" drbl_server_as_NAT_server="no" add_start_drbl_services_after_cfg="yes" continue_with_one_port="y" ################################## # End of global setting ##################################

Drbl_ocs.conf # drbl-ocs (Clonezilla) setting # Do NOT modify if you are not sure what you are doing! OCSMGRD_PORT="6461"

# Create image volumes with a size of X, # Annoying... # in the past, its unit is KB (for partimage 0.6.2). # MB (for partimage 0.6.4) # Since we use partimage 0.6.4 now, it's MB. # NOTE: # If you are using partimage 0.6.5 beta 3, the maximum is 2000 MB, you can not set it larger than 2000. Otherwise it will fails to get the correct set. # For other version of partimage, no such problem. # Ref:http://www.partimage.org/forums/viewtopic.php?t=481 # http://sourceforge.net/forum/message.php?msg_id=3761573 # "0" is also "no split" for clonezilla. Before clonezilla 2.1, if split, the image name will like: hda1.000, hda1.000... which is done by partimage. # Without split, the image is like: hda1 (not hda1.000, i.e. without ".000") # From clonezilla 2.1 or later, we do not let partimage built function to split it, we use program split to do that. # Unit for clonezilla split: MB, by default we set it as 100 GB, no more use unlimite (0) because the reason: # 2009/11/05, on Ubuntu 9.10 with upstart 0.6.3 or later, the "/sbin/init" won't accept the boot parameters as an option, it will always read /proc/cmdline, therefore if we use "0", the option will be shown in /proc/cmdline as "ocs_opt=... -i 0" and in /tftpboot/node_root/sbin/init we can not make it by removing "ocs_opt=... -i 0" anymore. # The limit to split an partition image file. # This is for those file systems could support large file, like a single file size limit is 16 TiB. Here we set it as 1TB # Unit: MB (1000*1000) VOL_LIMIT_DEFAULT="1000000" # Assign VOL_LIMIT_IN_INTERACTIVE as 4096 MB, since some cases when # using ocs-sr -x, it's in FAT16B/FAT32, the limitation is # 4,294,967,295 bytes (4 GiB - 1) # Unit: MB (1000*1000) # Ref: http://en.wikipedia.org/wiki/File_Allocation_Table # http://en.wikipedia.org/wiki/Megabyte VOL_LIMIT_IN_INTERACTIVE="4096"

# Specify the suffix length for spliting the image file of a partition or LV. By default it's 2, i.e. aa, ab, ac... # Integer must >= 2. split_suf_len="2"

# multicast setting # From udpcast menu: # --mcast-all-addr address # Uses a non-standard multicast address for the control # connection (which is used by the sender and receivers to # "" each other). This is not the address that is used to # transfer the data. # By default mcast-all-addr is the Ethernet broadcast address # if ttl is 1, and 224.0.0.1 otherwise. This setting should not # be used except in very special situations, such as when # 224.0.0.1 cannot be used for policy reasons. # Note! It's better to keep 224.0.0.1, For example, if $eth_for_multicast is eth1. In Debian sarge, for different clients in eth2 or eth3, will not be able to connect eth1 to get the multicast packets MULTICAST_ALL_ADDR="224.0.0.1" MULTICAST_PORT="2232" TIME_TO_LIVE_OPT="--ttl 1"

# You can assign extra option for udp-sender, e.g. # (1) "--max-bitrate 150m" (150 megabits/sec). See "man udp-sender" for more info. # Thanks to Mike Taylor for this idea. Ref: https://sourceforge.net/forum/message.php?msg_id=5281039 # (2) "--fec 8x16/64" # Thanks to Pretzel for this idea. Ref: https://sourceforge.net/p/clonezilla/discussion/Clonezilla_server_edition//6e1e87d4/ # (3) "--retries-until-drop 50", for example, if you want to reduce the waiting time if some clients fail to continue then udp-sender drops them. By default it will take about 3 to 4 mins, with "--retries-until-drop 50", the time is reduced to about 40 secs. Thanks to Yitzon Belandria for sharing this result. Ref: https://sourceforge.net/p/drbl/discussion/250176/thread/70d6fd5e/?limit=25#4496 udp_sender_extra_opt_default=""

# You can assign extra option for udp-receiver here (very seldom) udp_receiver_extra_opt_default=""

# The time to wait when multicast restoring more then 2 partitions. # For the first partition, we will ask user. This PART_PREPARE_TIME is for the wait time before next partition (2nd, 3rd... to start) # Not! It can not be too short!!! 30 secs is a good number. PART_PREPARE_TIME="30" # Time to prepare the next partition, like hda1 -> hda2 SLEEP_TIME_AFTER_PART_CLONED="15"

# time to wait default: sec TIME_TO_WAIT_DEFAULT="120" MAX_TIME_TO_WAIT_DEFAULT="300" # # ignore the MBR by using -M, we will ignore the error caused by devfs style # in /proc/partitions # now use -z0 and --volume=0 in DEFAULT_PARTIMAGE_SAVE_OPT, we will use partimage stdout and pipe it to use gzip/bzip2/lzop to compress it, not the compression function in partimge. --volume=0 is a must for stdout. DEFAULT_PARTIMAGE_SAVE_OPT="-M -f3 -o -d -b - -z0 --volume=0" DEFAULT_PARTIMAGE_RESTORE_OPT="-M -f3 -b"

# Extra gzip/lzma/xz option. This is used when using gzip/lzma/xz/lzip/lrzip (non-parallel) to save an image. # Adding "--rsyncable" to be friendly to rsync (https://sourceforge.net/p/clonezilla/discussion/Open_discussion/thread/8d5f80a6) # //NOTE// Option "--rsyncable" is not an official option for gzip, it's patched by some distributions. (https://sourceforge.net/p/clonezilla/discussion/Open_discussion/thread/8d5f80a6/?limit=25#89e2) rsyncable_opt_gzip="" if [ -n "$(LC_ALL=C gzip -- 2>&1 | grep -Ew -- "--rsyncable")" ]; then rsyncable_opt_gzip="--rsyncable" fi extra_gzip_opt="--fast $rsyncable_opt_gzip" # -1 (fatest), -2, ... -9 (best compression) extra_bzip2_opt="-3" extra_lzop_opt="-3" extra_lzma_opt="-3" extra_xz_opt="-3" extra_lzip_opt="-3" extra_lrzip_opt="-L 3"

# Use parallel gzip/pbzip2 when restoring use_parallel_decompression="yes"

# Available programs for parallel bzip2: pbzip2, lbzip2 # Default to use lbzip2 since pbzip2 1.0.5 has an issue about memory usage # https://sourceforge.net/projects/clonezilla/forums/forum/663168/topic/3517181 parallel_bzip2_prog="lbzip2"

# Extra pigz option. This is used when using pigz to save an image. For pigz, normally "-b 1024" (1024=1024K) is enough, although you can assign more like "-p 16" (16 threads). # Adding "-R" (--rsyncable) to be friendly to rsync (https://sourceforge.net/p/clonezilla/discussion/Open_discussion/thread/8d5f80a6) # //NOTE// Option "--rsyncable" is only for newer pigz, it's patched by some distributions. (https://sourceforge.net/p/clonezilla/discussion/Open_discussion/thread/8d5f80a6/?limit=25#89e2) rsyncable_opt_pigz="" if [ -n "$(LC_ALL=C pigz --help 2>&1 | grep -Ew -- "--rsyncable")" ]; then rsyncable_opt_pigz="--rsyncable" fi extra_pigz_opt="--fast -b 1024 -p 16 $rsyncable_opt_pigz" # Extra pbzip2 option. This is used when using pbzip2 to save an image. For pbzip2, normally "-b9" (9=900K, the default value. It's different from pigz) is enough, although you can assign more like "-p16" (16 processors). Ref: https://sourceforge.net/tracker/?func=detail&atid=671650&aid=3324096&group_id=115473 extra_pbzip2_opt="-3" extra_lbzip2_opt="-3" # extra_pixz_opt="-3" extra_plzip_opt="-3"

# ntfsclone options, for saving and restoring, respectively. These variables will be appended when running ntfsclone. ntfsclone_save_extra_opt_def="" ntfsclone_restore_extra_opt_def=""

# supported filesystem in partimage # ///NOTE/// FAT12 is not supported by partimage. partimage_support_fs=" xfs fat16 fat32 vfat hpfs ufs hfs ntfs"

# Supported filesystems in partclone # Although now partclone has the following programs: # clone.extfs clone. clone.xfs clone.hfsp clone.reiserfs # This name is the same as we get from "parted -s /dev/[hsv]dx? " # 2009/07/15 Since there is an issue when restoring vfat, remove fat*/vfat in the following list # partclone_support_fs="hfs+ hfsplus reiser4 xfs reiserfs ext2 ext3 ext4 ext4dev ntfs" # partclone 0.1.1-16 has fixed the issue about FAT. Turn it on: #partclone_support_fs="hfs+ hfsplus reiser4 xfs reiserfs ext2 ext3 ext4 ext4dev fat12 fat16 fat32 vfat ntfs" # 2009/09/12 partclone.xfs v0.1.1 (Rev:304M) is buggy. remove xfs in the following list. # 2009/09/18 partclone.xfs v0.1.9 was fixed. No more xfs problem. Add xfs in the following. # 2012/01/18 partclone.fstype from version 0.2.45 will tell vmfs3 and vmfs5. Therefore no more VMFS_volume_member and vmfs, we use vmfs3 and vmfs5. Since vmfs5 support in partclone 0.2.45 is still buggy due to libvmfs not supported well yet, we won't enable it until it's fully supported. # 2012/04/05 Enable vmfs5 since partclone 0.2.46 now works for vmfs5. # 2013/03/01 Enable minix since partclone 0.2.59 now works for minix. # 2014/12/01 Temporarily disabled vmfs3 and vmfs5 due to this issue: # https://github.com/glandium/vmfs-tools/issues/12 partclone_support_fs="hfs+ hfsplus reiser4 reiserfs xfs jfs ext2 ext3 ext4 ext4dev fat12 fat16 fat32 vfat ntfs ufs btrfs exfat minix" # Options to be appended in the partclone command, for save and restore. # For example, for restoring, if you want to ignore device size checking, "-C" can be put, like: # PARTCLONE_RESTORE_OPT_INIT="-C" # From Partclone 0.2.61, we switch to use "-z" instead of "-m": PARTCLONE_SAVE_OPT_INIT="-z 10485760" PARTCLONE_RESTORE_OPT_INIT="-z 10485760" PARTCLONE_RESTORE_ONTHEFLY_OPT_INIT="-z 10485760"

# The debug_level for partimage # it's better we turn off the mode by default, this will reduce the server's loading. # It seems in partiamge 0.6.5-beta2, when using --debug=0 to save NTFS partition # partimage will crash. However, 0.6.5-beta1 works without this problem. # To avoid this, we set debug_level=1 as default value. debug_level="1" # MAX_DIALOG_HEIGHT="10" # dialog width for showing images RESTORE_DIA_WIDTH="70" # POSTRUN_DEF="reboot" # The poweroff/reboot options, which are used when clone finishes. # If you are impatient, you can set it as "-f -n" so it will force halt or reboot, don't call shutdown sequence, and do not . i.e. poweroff/reboot immediately. Note! This might fail your wake-on-LAN since it's not a normal soft-shutdown. # In some case (clonezilla live), we might overwrite this option to let it do normal poweroff/reboot. HALT_REBOOT_OPT="" # To avoid all the clients notify at almost same time, we use random before send info. This is the maximun time limit (in secs). NOTIFY_OCS_SERVER_TIME_LIMIT="20"

# OCS_PRERUN_DIR & OCS_POSTRUN_DIR # Run the script in the direcoty $OCS_POSTRUN_DIR before clone starts and finishes. The command will be run before that assigned in -p or --postaction." OCS_PRERUN_DIR="$DRBL_SCRIPT_PATH/prerun/ocs/" OCS_POSTRUN_DIR="$DRBL_SCRIPT_PATH/postrun/ocs/"

# PREFIX for M$ windows hostname WIN_HOSTNAME_PREFIX="PC"

# The way to trigger clonezilla client to start ocs-sr, 3 options: # (1) ocs-run.param: the ocs_opt is put in client's /etc/ocs/ocs-run.param # (2) proc-cmdline: the ocs_opt is put in client's /proc/cmdline, which is actually from server's pxelinux config /tftpboot/nbi_img/pxelinux.cfg/default or others. # (3) both: ocs_opt will be put both in /etc/ocs/ocs-run.param and server's pxelinux config /tftpboot/nbi_img/pxelinux.cfg/default or others. However, when ocs-run is run in client, it will use the ocs_opt from /tftpboot/nbi_img/pxelinux.cfg/default (i.e. /proc/cmdline) # We choose to use ocs_opt from proc-cmdline if it's both so that we can always put "ocs_client_trig_type=both" in this file. If we want to interactively debug clonezilla in client, just use "/etc/init.d/ocs-run -p start". # Note: SET IT AS "both" ONLY, other modes are only for backward compatibility testing. ocs_client_trig_type="both"

# modify client's /etc/inittab when start clonezilla service. # If yes, both client's inittab and pxelinux config will be modified. # If no, just put "1" in pxelinux config so it will show in client's /proc/cmdline. # Available value: yes/no # Note: Do NOT set it as "yes", it's only for backward compatibility testing. modify_client_etc_inittab="no"

# When use use drbl-ocs stop to stop clonezilla, do we want to clean the ocs related services (ssh, arm-wol...). # Available value: yes/no # Note: Do NOT set it as "yes", it's only for backward compatibility testing. clean_client_all_ocs_related_srv="no"

# clean dhcpd lease in the server when it's clonezilla box mode. # Note: Do NOT set it as "yes", it's only for backward compatibility testing. clean_dhcpd_lease_in_clone_box_mode="no"

# flag to regenerate the DRBL SSI template tarball # Note: Do NOT set it as "yes", it's only for backward compatibility testing. regen_drbl_ssi_template_tarball="no"

# flag to re-put ocs related files in client's rc1.d (ocs-functions) # Note: Do NOT set it as "yes", it's only for backward compatibility testing. re_put_ocs_related_srv_in_client_rc1d="no"

# flag to re-put S19ocs-run and all other services from template node's # client's rc1.d to /tftpboot/node_root/etc/drbl_ssi/rc1.d/ (drbl-ocs) # Note: Do NOT set it as "yes", it's only for backward compatibility testing. copy_rc1d_for_drbl_ssi_clone_box="no"

# Flag to use or partclone in ocs (not ocs-onthefly) # Sector to sector copy program in ocs (not ocs-onthefly). Available progs are: dd, partclone S2S_IMAGE_PROG_IN_OCS="partclone"

# Since dd does not report status with any option, we have to send SIGUSR1 to tell dd to report every some secs when using dd to save or restore an image. This will only take effect when S2S_IMAGE_PROG_IN_OCS = dd # dd report interval (secs) dd_report_interval="20"

# Flag to use ntfsclone, dd, or partclone in ocs-onthefly # ///NOTE/// 2008/May/11 by Steven Shiau: local part to remote part still has a problem with partclone: e.g. local hda1 to remote hda3, due to the filesystem of source partition can not be informed to target machine in the current mechanism, it will fail if the filesystem is not the same with the list on $src_pt_info. # Something like: partclone.reiserfs can't restore from the image which filesystem is XFS not REISERFS USE_NTFSCLONE_IN_OCS_ONTHEFLY="no" USE_PARTCLONE_IN_OCS_ONTHEFLY="yes" # Sector to sector copy program. Available progs are: dd, partclone S2S_CLONE_PROG_IN_OCS_ONTHEFLY="partclone"

# Hidden data space size limit. This is the max hidden data space size limit, if it's larger than # this, we won't create the file (e.g. sda-hidden-data-after-mbr). # Unit: MB hidden_data_after_mbr_limit="1024"

# some presettings about clonezilla when running dcs # The prompt for user to input the disk when saving savedisk_preset="sda" # The prompt for user to input the partitions when saving saveparts_preset="sda1 sda2"

# Options for of image dir. We use ecryptfs to mount that. Therefore the options are from ecryptfs. # Run "man ecryptfs" for more details. ocs_ecryptfs_cipher="aes" ocs_ecryptfs_key_bytes="16"

# For davfs2 config. Do not modify unless you know what you are doing. davfs2_buf_size="10240" #KiByte maybe more davfs2_use_locks="0" davfs2_use_expect100="1" davfs2_use_compression="1" davfs2_cache_size_def="64" # MiByte. This is default value if appropriate free memory size can not be decided. davfs2_delay_upload="0" # The ratio for the cache size to free disk space (RAM disk actually) in Clonezilla live env. # Value must between 0 and 1. Default:0.2. Better not to be larger than 0.5 # ///NOTE/// The cache mechanism of davfs2 is a problem (ref: https://sourceforge.net/forum/forum.php?thread_id=2248597&forum_id=82589). Although we use ratio_davfs2_cache_2_free_disk and free ramdisk space to set the cache size of davfs2, according to "man davfs2.conf": # cache_size: The amount of disk space in MiByte that may be used. mount.davfs will always take enough space to cache open files, ignoring this value if necessary. # Therefore the cache_size get in ocs-tune-conf-for-webdav is actually applied to VOL_LIMIT_DEFAULT and VOL_LIMIT_IN_INTERACTIVE, too, so that single file won't be over size. ratio_davfs2_cache_2_free_disk="0.2" # When webdav is the image repository, we need longer suffix length for "split" command, i.e. the option "-a" of split. # When "3" is used, Clonezilla live in a machine with 1 GB RAM could have 0.8 GB ramdisk size, so: # 26*26*26*0.8/5=2812 GB davfs2_split_suf_len_def="3"

# This part is for DRBL/Clonezilla/GParted live # Settings # Debian Repository when creating debian live debian_mirror_url_def="http://http.debian.net/debian" debian_mirror_security_url_def="http://security.debian.org/debian-security" # Ubuntu repository when creating ubuntu live ubuntu_mirror_url_def="http://archive.ubuntu.com/ubuntu" ubuntu_mirror_security_url_def="http://archive.ubuntu.com/ubuntu" # DRBL repository DRBL_REPOSITORY_URL_def="http://free.nchc.org.tw/drbl-core" # URL to the repository key DRBL_GPG_KEY_URL="http://drbl.nchc.org.tw/GPG-KEY-DRBL"

# Clonezilla live iso template file name. By default we use debian-live-for-ocs.iso as the template file name in ocs-iso and ocs-live-dev. DEBIAN_ISO_DEF="debian-live-for-ocs.iso" # http://free.nchc.org.tw/drbl-core/iso/MD5SUMS md5_file="MD5SUMS" uni_font_file="unifont.bgf" syslinux_exe_file="syslinux.exe" makeboot_exe_file="MakeBoot.exe" wget_opt="-r -l1 --no-parent --passive-ftp -e robots=off -q -nd --retr-symlinks" CD_FILE_LIMIT="650" # unit: MB FILE_LIMIT="4500" # unit: MB # The kernel and initrd files are used just in case, normally ocs-iso or ocs-live-dev will search them. kernel_file="vmlinuz1" initrd_file="initrd1.img" # Client framebuffer mode VGA_MODE_DEF="788" BG_MODE_DEF="graphic" # Default console columns for adjust font and its size in . This only will affect KMS mode, not other framebuffer mode. console_prefer_font="TerminusBold" # We want to show 100 characters in the screen (width) console_prefer_cols="100" # //NOTE// Generally this variable BOOT_PARAM_DEFAULT will be overwritten by the function get_live_boot_param in ocs-functions. BOOT_PARAM_DEFAULT="boot=live union=" # Common boot parameters that Clonezilla live (iso/zip) need. # //NOTE// "nomodeset" is required for framebuffer mode (vga=788... or video=uvesafb:....). If no "nomodeset", it will enter kernel mode setting (KMS) mode. Then framebuffer mode will only take effect in the early booting. It won't work when we use Clonezilla. Therefore here we keep "nomodeset" supp_boot_param_ocs_live_iso="noswap edd=on nomodeset nodmraid" # For Clonezilla live USB, we add "noeject" so by default we do not ask user to remove the USB flash drive when rebooting/halting. supp_boot_param_ocs_live_dev="$supp_boot_param_ocs_live_iso noeject" # Possible live media path (when live CD/USB-disk boots, the reall live media is mounted as...) # casper 1.77+debian-7 uses /live_media, 1.110 uses /cdrom # live-initramfs uses /live/image. # For Debian Live 3.x, rootfs is in /lib/live/mount/medium/live/filesystem. live_media_path_chklist="/lib/live/mount/medium /lib/live/image /live/image /live_media /cdrom" # Possible kernel/initrd paths in live CD/USB-disk are /casper (created by casper), /live (created by live-initramfs) or /isolinux (created by live pacakge with casper), or "/" (when using toram="filesystem.squashfs", filesystem.squashfs will be copied to / in the ram disk). live_sys_files_dir_list="live / isolinux casper" # For live-package, it's "/usr/share/make-live/hooks", for live-helper... live_pkg_hook_dir="/usr/share/make-live/hooks" # Some locales (especially CJK) need bterm to show locale_need_bterm="zh_TW zh_CN zh_HK zh_SG ja_JP ko_KR" # unifont.bgf path is required by bterm in clonezilla live. uni_font="$DRBL_SCRIPT_PATH/lib/unifont.bgf" # fb_term is either bterm or jfbterm. If not assigned, clonezilla live will try to use jfbterm first, then bterm. However, due to a bug of jfbterm in Ubuntu intrepid, bterm will be used in intrepid anyway. fb_term="" # Live build and debootstrap minimal version to create debian/gparted/drbl live, i.e. >= this lh_ver_required="3.0.5-1" debootstrap_ver_required="1.0.52"

# Use RawCHS from EDD ( interface to BIOS EDD information) for partclone.ntfsfixboot use_RawCHS_from_EDD_for_ntfsreloc="yes"

# Use RawCHS from sfdisk for partclone.ntfsfixboot use_RawCHS_from_sfdisk_for_ntfsreloc="yes"

# The run_grub2_from_restored_os_mode is for us to decide to run grub2 from the restored OS. Possible values are "yes", "no" or "". If "yes", Clonezilla will chroot and run grub-install. If "no", use the grub in the running system to run grub-install --root-directory=.... If "", then we will test in ocs-functions to use "yes" mode first, if fails, then "no" mode. # //NOTE// The OS arch in the running environment must be the same as that in the restored OS, otherwise, e.g. running OS is i386, and restored OS is -64, if this option is "yes", you will get error messages when run grub2 install: # "cannot run command" "Exec error" run_grub2_from_restored_os_mode=""

# Log files for the output of clonezilla and related files. OCS_LOGFILE="/var/log/clonezilla.log" ; export OCS_LOGFILE OCS_NETCFG_LOG="/var/log/ocs-netcfg.log" ; export OCS_NETCFG_LOG OCS_MOUNT_LOG="/var/log/ocs-mount.log" ; export OCS_MOUNT_LOG

################################################### ### Settings about Clonezilla-live based client ### ################################################### # The flag to use NFSRoot-based or Clonezilla-live-based system in the client # Available name: nfsroot, clonezilla-live diskless_client_os="nfsroot"

# If diskless_client_os is clonezilla-live, the URL to download the clonezilla live. e.g. # http://downloads.sourceforge.net/clonezilla/clonezilla-live-1.2.5-6-i486.iso # http://sourceforge.net/projects/clonezilla/files/clonezilla_live_testing/clonezilla-live-1.2.5-6-i486.iso # Or # http://free.nchc.org.tw/clonezilla-live/testing/clonezilla-live-1.2.5-6-i486.iso # If you want to use a local copy, you can make it like: # iso_url_for_pxe_ocs_live_default="file://tmp/clonezilla-live-20130902-saucy-amd64.iso" iso_url_for_pxe_ocs_live_default=""

# Flags when running drbl-ocs, shall we remove some boot parameters from pxelinux config file for Clonezilla live. (only takes effect when diskless_client_os="clonezilla-live" # Available flag for remove_some_boot_param_for_pxe_ocs_live: yes, no remove_some_boot_param_for_pxe_ocs_live="yes"

# If remove_some_boot_param_for_pxe_ocs_live is yes, what shall we remove: # By default we remove quiet, splash, vga and video, we want it to be more verbose when booting clients boot_param_2_be_removed_in_pxe_ocs_live="quiet splash vga video"

# Boot parameters to preseed: ocs_live_keymap, ocs_lang, ocs_daemonon, ocs_prerun, # Available keymaps: "NONE" (won't change the default layout), "/usr/share/keymaps/i386/azerty/fr-latin9.kmap.gz" (French keyboard)... ocs_live_keymap_for_pxe_ocs_live="NONE"

# Available languages: en_US.UTF-8 es_ES.UTF-8 fr_FR.UTF-8 it_IT.UTF-8 ja_JP.UTF-8 zh_CN.UTF-8 zh_TW.UTF-8 ocs_lang_for_pxe_ocs_live="en_US.UTF-8"

# The daemon to be started, e.g. ssh (the file name in /etc/init.d/) ocs_daemonon_for_pxe_ocs_live="ssh"

# The account and password for the Clonezilla live clients of Clonezilla SE. # //NOTE// These variables are not used to assign the default username and password of Clonezilla live when creating it by create-debian-live or create-ubuntu- live. They are only used for ssh login by drbl-doit. Therefore if someday Debian live changes its default username and password, we have to change here, too. ocs_live_username="user" ocs_live_passwd="live"

# Prompt messages preference. Could be "tui" or "cmd". If not assigned, cmd is the default. # //NOTE// Not all the messages are supported to be shown in dialog/whiptail ocs_prompt_mode=""

# The command to run before ocs_live_run command is executed. E.g. "mount -t nfs 192.168.120.254:/home/partimag/ /home/partimag". If not assigned, by default we will use: # mount -t nfs $IP:/home/partimag/ /home/partimag # where $IP is the 1st IP address on DRBL server. ocs_prerun_for_pxe_ocs_live="" ###################################################