06.10.2019

Install Drbl

59

Contents. Introduction You're probably familiar with the popular proprietary commercial package Norton Ghost速, and its counterpart, Partition Image. The problem with these software packages is that it takes a lot of time to massively clone systems to many computers. You've probably also heard of Symantec's solution to this problem, Symantec Ghost Corporate Edition速 with multicasting. Well, now there is an clone system (OCS) solution called Clonezilla with unicasting and multicasting! Clonezilla, based on DRBL, Partition Image, ntfsclone, and udpcast, allows you to do bare metal backup and recovery.

  1. Install Dblink Postgresql
  2. Install Drbd On Ubuntu
  3. I. Prepare The Linux Server

Diskless Remote Boot in Linux (DRBL). 'rpm -Uvh drbl-current.i386.rpm' or 'yum install drbl-current.i386.rpm'. Note: A perl module is necessary for drbl rpm.

Two types of Clonezilla are available, Clonezilla live and Clonezilla server edition. Clonezilla live is suitable for single machine backup and restore. While Clonezilla server edition is for massive deployment, it can clone many (40 plus!) computers simultaneously. Clonezilla saves and restores only used blocks in the harddisk. This increases the clone efficiency.

At the NCHC's Classroom C, Clonezilla server edition was used to clone 41 computers simultaneously. It took only about 10 minutes to clone a 5.6 GBytes system image to all 41 computers via multicasting!

Features of Clonezilla. Free (GPL) Software. Filesystem supported: ext2, ext3, reiserfs, xfs, jfs of GNU/Linux, and FAT, NTFS of MS Windows. Therefore you can clone GNU/Linux or MS Windows. For these file systems, only used blocks in partition are saved and restored.

For unsupported file system, sector-to-sector copy is done by dd in Clonezilla. LVM2 (LVM version 1 is not) under GNU/Linux is supported. Multicast is supported in Clonezilla server edition, which is suitable for massively clone. You can also remotely use it to save or restore a bunch of computers if PXE and Wake-on-LAN are supported in your clients. Based on Partimage, ntfsclone and dd to clone partition. However, clonezilla, containing some other programs, can save and restore not only partitions, but also a whole disk. By using another free software drbl-winroll, which is also developed by us, the hostname, group, and SID of cloned MS Windows machine can be automatically changed.

Editions. Clonezilla Live: Allows you to use CD/DVD or USB flash drive to boot and run clonezilla (Unicast only). Clonezilla server edition: A DRBL server must first be set up in order to use Clonezilla to do massively clone (Both unicast and multicast are supported). This Howto only covers Clonezilla server edition How to setup a Clonezilla server A DRBL server must first be set up in order to use Clonezilla to do massively clone. When setting up the DRBL server, it is recommended to collect the MAC addresses of the client computers and let the DRBL server offer the same IP address for the clients every time it boots.

This will keep you from cloning the system to incorrect or unknown clients. Besides, if you do not provide the static IP address to client, different operating systems (like GNU/Linux and MS Windows), they use different DHCP client ID. Therefore even it's the same client, when it boots GNU/Linux via DRBL, it will leases one IP address, then next time when it boots into local MS Windows, it will lease another different IP address. This is annoying sometimes. However, if you are 100% certain that no other computer will be involved in the DRBL environment, and you do not care about the different IP address leasing problem, you can use the range in dhcpd.conf. In this case, you can even use the ' to setup the DRBL environment.

Diskless Remote Boot in Linux (DRBL) Setup the Linux Server Install the GNU/Linux distribution and configure all network cards. In the following, we use 'eth0' to connect the Internet, while eth1, eth2, eth3 are for DRBL environment(set the network card's IP addresses to be private IPs (i.e. 192.168.x.x, the following example, we set eth1:192.168.101.254, eth2:192.168.102.254, eth3:192.168.103.254.); Please remember this principle, private IP (e.g. 192.168.x.x) is used for DRBL environment. Nano -w /etc/network/interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). Full DRBL Full Clonezilla DRBL SSI Clonezilla Box /etc, /var of clients NFS-based NFS-based tmpfs-based tmpfs-based modified files in /etc and /var of client after reboot kept kept gone gone extra space in server per client 50 MB 50 MB 0 0 max client no per ethernet card in server 253 253 253 253.

Notes for network switch and NICs when using multiple NICs: When you use multiple NICs to expand the bandwidth, we recommend you set the MAC addresses so that every node will get the same IP address all the time. In the following step 3a, when you run '/opt/drbl/sbin/drblpush -i', it prompts 'Do you want to fix the IP address of client connected to eth1 by giving MAC address? y/N', choose 'Y'). If you do NOT set MAC address (we will call it 'range' from now), and you have only one 48-port network switch (or many switches but connected to be one), and you use four NICs (or more than two.) in DRBL server to expand the network bandwidth, a problem will occur (i.e. Some clients will not lease IP from DHCP server) so it will not be able to boot. On the other hand, if your DRBL server uses four NICs to expand the network bandwidth (meaning that four NICs with four private subnets such as 192.168.100.x, 192.168,101,x, 192.168.102.x, 192.168.103.x), and you have exactly four switches that are separated and not connected to each other, then you can use range (i.e. You do not have to set the MAC address of clients).

Remember, if you use N NICs to expand network bandwidth in the DRBL server, if using the 'range' method, then you must have N switches and they can NOT be connected to each other. Before executing step, you can do some customized config:. If you have some specific directories in this DRBL server to share, such as /work1, then you can use text editor to open file /opt/drbl/conf/drbl.conf, edit the disklessrootdirrouseradd='/work1'(If you want /work1 can only be read by clients, not writable), or disklessrootdirrwuseradd='/work1'(If you want /work1 to be readable and writable by clients. Drbl.conf is VERY IMPORTANT, be careful when you edit it!!!) nano -w /opt/drbl/conf/drbl.conf edit disklessrootdirrouseradd='/work1' #read only.

or disklessrootdirrwuseradd='/work1' #read write. If all the clients have their local harddisk, and the partition is formated (For example, /dev/hda1, its filesystem is ext3), then if you want the client to mount /dev/hda1 as /localwork when booting.

Therefore you can edit /opt/drbl/conf/client-append-fstab, and its syntax is just like /etc/fstab. In this example, you can make /opt/drbl/conf/client-append-fstab like this: nano -w /opt/drbl/conf/client-append-fstab /dev/hda1 /localwork ext3 defaults 0 0. (PS: You do not have to create the directory /tftpboot/noderoot/localwork in DRBL server manually, later drblpush will do that for you). If you have extra services (such as apmd and bluetooth) to be on when client boots, you can edit /opt/drbl/conf/client-extra-service, let serviceextraadded='apmd bluetooth'.

Nano -w /opt/drbl/conf/client-extra-service serviceextraadded='apmd bluetooth'. If you want to overwrite some or all automatically created hostnames later by 'drblpush -i', you can edit '/opt/drbl/conf/client-ip-hostname' now. Check that file for the format. If some machines are not assigned, drblpush will use those automatically created hostname.

Nano -w /opt/drbl/conf/client-ip-hostname. run '/opt/drbl/sbin/drblpush -i'. The software will auto-detect the system to figure out the argument. If the argument is not set up in the system, the system will request you to do that.

/opt/drbl/sbin/drblpush -i. Note!!! If newer packages are installed in the server after this step, you have to run '/opt/drbl/sbin/drblpush -i' or '/opt/drbl/sbin/drblpush -c /etc/drbl/drblpush.conf' (This will loaded the previously saved settings) again so that newer packages will be deployed to clients.

/opt/drbl/sbin/drblpush -i /opt/drbl/sbin/drblpush -c /etc/drbl/drblpush.conf. Note!!! It is not recommended to turn on the system update automatically. Since If newer packages are installed in the server automatically, without running '/opt/drbl/sbin/drblpush -i', the programs for client might not be compatible with that newer in server. If you want to turn on system update automatically, remember to follow the above step to update the files in client automatically.

Setting up clients to use the DRBL environment. o There are four different scenarios where you can make clients boot from network:. the client has PXE network interface card,. the client has a floppy drive,. the client has a CDROM,.

the client has a local hard drive. We use etherboot 5.4.3 as an example for cases 2-4.

With DRBL version 1.3.9 or later, if you want to use Etherboot, Etherboot version 5.4.0 or newer is required. Case 1 The client has a PXE network interface card. Set the client's BIOS to boot from 'LAN' or 'network'. Take one of the Asus motherboards for example, in this manual file.

DrblDrbl

Page 4-24, you will see LAN, there is a subfuncton ' LAN BOOT ROM', normally it's disabled, you have to enable it. Usually you have to reboot it now, make the function re-read by BIOS.

After rebooting, enter BIOS setting again, this time, in Page 4-35, you have to make LAN boot as the 1st boot device. Let client boot and enjoy DRBL!!! Case 2 The client has a floppy drive. Get the image file first. Use the 'universal' image /opt/drbl-etherboot/etherboot-net.zdsk in the DRBL server. It supports most modern network cards. If this universal image fails, try using specific image for client's network card, the image file is located in /opt/drbl-etherboot/.

As an example, if you have a Realtek 8139 network card, use the image /opt/drbl-etherboot/rtl8139.zdsk. Insert the floppy to floppy drive in DRBL server. Run 'cat /opt/drbl-etherboot/etherboot-net.zdsk /dev/fd0' in the DRBL server. Cat /opt/drbl-etherboot/etherboot-net.zdsk /dev/fd0. If you want to create the image floppy in Microsoft Windows, download rawrite.exe or ' for Windows' to write the ROM image to floppy. Put this floppy to client's floppy drive, make sure the floppy is the first boot device in the client's BIOS.

If everything was done correctly, after a few minutes, the clients will be waiting for you to login, All the accounts are same as the ones in server. Case 3 Client has a CDROM (Reference):. 1.

The 'universal' image is located in /opt/drbl-etherboot/etherboot-net.iso. Burn the ISO to a CD: cdrecord -v speed=12 fs=16m dev=0,0,0 -data etherboot-net.iso (If necessary, modify 'dev=0,0,0', run 'cdrecord -scanbus' to get your CD burner.) cdrecord -scanbus. Ensure the PC is set to boot from CDROM, place the burned CD in the drive, and reboot. Case 4 client has a local hard drive. If the client has a local hard drive which is installed with the bootloader grub in GNU/Linux:.

Copy the file '/opt/drbl-etherboot/etherboot-net.zlilo' to client's directory '/boot/' in its harddisk. Append one block in the client's /boot/grub/menu.lst or /boot/grub/grub.conf (depends on your distribution) like this: title Etherboot-PXE kernel /boot/etherboot-net.zlilo.

Change the default boot to the corresponding one above, like 'default 1', in menu.lst or grub.conf in client. If the client is running Microsoft Windows XP/2K on its hard disk:. You can install WINGRUB. Put the file etherboot-net.zlilo in C:, and the files: C: boot.ini and C: GRUB MENU.LST look like: (This method is only suitable for installing wingrub in BOOT.INI (Tool - Install grub - Boot from BOOT.INI).

The tutorial describes installation steps for Server Edition on Ubuntu 16.04.1 LTS using a Bash script. Clonezilla is OpenSource Cloning System (OCS) and it is a partition and disk imaging/cloning program. It helps you to do system deployment, bare metal backup and recovery. Two types of Clonezilla are available, Clonezilla and Clonezilla SE (server edition).

Clonezilla live is suitable for single machine backup and restore. Clonezilla SE is for massive deployment because it can clone many computers simultaneously.

Clonezilla saves and restores only used blocks in the hard disk. It decreases time and saves the hard disk space and increases the clone efficiency. Clonezilla is a part of (Diskless Remote Boot in Linux) which provides a diskless environment for client machines. Therefore we need to install and configure DRBL server first. I created DRBL deployment script that helps you to install DRBL and configure server on Ubuntu with a single Ethernet card. You have to provide only the name of Ethernet interface and the script creates virtual interface for you based on your physical interface. It also downloads a DRBL project public key, download and install drbl package from repository.

The script starts interactive Bash and Perl scripts that come with drbl package. It starts them in this order:. drblsrv - prepares files for client and generates PXE menu. drblpush - configures DNS, clients' hostname, Ethernet card, collects MAC addresses of clients, configures and starts DHCP server, diskless services and Clonezilla mode, PXE password, grephical/text boot menu, NAT services for clients and firewall rules. dcs - DRBL utility to switch the mode for clients Here is a version of installed with DRBL.

Deploying DRBL Server 1. Starting Script The script deploydrbl.sh must be started with root privileges. Once you login to root account with sudo su command, assign execute privileges to the script. $ sudo su # chmod +x./deploydrbl.sh #./deploydrbl.sh Now enter the name of Ethernet interface which is connected to the Internet, e.g. The script creates a new virtual interface adding suffix 100 to the name of your Ethernet interface e.g.

Corel draw software

It also configures IP address 192.168.112.200/24 on your virtual interface. If you want to configure different suffix or IP address/mask on the virtual interface, just change a value of variables ipaddress, mask and suffix in the script. The script installs a package drbl from drbl testing. Note: The script deploydrbl.sh requires a working connection to the Internet in order to install DRBL server. The script sets only an IP address and a mask on the virtual interface.

Install

It is your job to configure a correct IP address/mask on the physical interface. You also need to configure default route and add DNS server. Here are my network settings /etc/network/. DRBL Server Installation The scripts deploydrbl.sh automatically starts a script drblsrv with a parameter -i. The script drbl is responsible for installation of DRBL server. Installation is interactive so you must provide answers for questions - either y or n.

If the letter is capital, it is a default choice and you can press Enter or type particular letter to select this choice. 2.1 Installation of Network Images Picture 1 - Installation of Boot Images via Network We do not need any boot images so type N. 2.2 Serial Console Output Picture 2 - Serial Console Output on Client Computer We do not want to use the serial console output on the client computers so type N. 2.3 Operating System Upgrade Picture 3 - Operating System Upgrade We do not want to upgrade our OS - Ubuntu 16.04.1 so type N. 2.4 Selection of Kernel Image Picture 4 - Selecting Kernel Image for Clients Choose option 1 - Ubuntu kernel from DRBL server. 3. Configure Clonezilla The scripts deploydrbl.sh automatically starts a script drblpush with a parameter -i (interactive mode). 3.1 DNS Domain Picture 5 - DNS Domain Press Enter key to configure default drbl.org domain.

3.2 NISP/YP Domain Picture 6 - NISP/YP Domain Again, press Enter key to configure default penguinzilla domain name. 3.3 Client Hostname Prefix Picture 7 - Client Hostname We want our client to keep default hostname prefix so press Enter. 3.4 Ethernet Port Picture 8 - Ethernet Port In this menu we select a network interface that is connected to the Internet (not used for DRBL connection). In our case it is enp0s3 port. Press Enter to choose a default option enp0s3. 3.5 Collecting MAC Addresses of Clients Picture 9 - Collecting MAC Addresses of Clients We do not want to assign the same IP addresses to the clients from DHCP server thus we do not need to collect MAC addresses of the clients.

Type N or just press Enter. 3.6 Same IP address for Clients Picture 10 - Same IP address for Clients Press Enter to reject the offer to configure the same IP addresses for clients. 3.7 DHCP Server Picture 11 - DHCP Server Now we configure a DHCP server running on the interface enp0s3:100 and providing IP addresses for clients. Enter an initial IP address from the range and the number of clients in your network. Then just confirm the DHCP range with Enter key or type Y. 3.8 Diskless Linux Services Picture 12 - Diskless Linux Service We do not need to provide diskless Linux service to clients so type option 2. 3.9 Clonezilla Modes Picture 13 - Clonezilla Modes Type 0 to configure full Clonezilla mode. 3.10 Directory for Storing Images Picture 14 - Directory for Saving Saved Images Press Enter to configure a default directory /home/partimg/ for storing saved images.

3.11 PXE Linux Password for Clients Picture 15 - PXE Linux Password for Clients Type y if you want to configure a password for clients. The chosen password can be changed or disabled anytime by drbl-pxelinux-passwd utility.

Install Drbd On Ubuntu

3.12 Graphical Background for PXE Menu Picture 16 - Graphical Background for PXE Menu Type y if you want to boot your clients with graphical PXE Linux menu. 3.13 NAT Services for Clients Picture 17 - NAT Services for Clients We do not need to provide Internet to clients so type n. 3.14 Firewall Rules Picture 18 - Changing Firewall Rules Press Enter or type y to let DRBL server to change firewall rules. Start Clonezilla Server The scripts deploydrbl.sh automatically starts a script dcs which starts Clonezilla.

4.1 Client Selection Picture 19 - Selecting Clients We can either select all clients or an individual client based on its IP or MAC address. Select the first option - All. 4.2 Start Clonezilla Mode Picture 20 - Starting Clonezilla Mode Select an option clonezilla-start to start clonezilla mode. 4.3 Beginner Mode Picture 21 - Beginner Mode Select an option B eginner which accepts the default options.

4.4 Select-in-Client Clonezilla Mode Picture 22 - Select-in-Client Clonezilla Mode Select an option select-in-client. This option allows you to select either to restore or save the image on client. 4.5 Clonezilla Advanced Extra Parameters Picture 23 - Clonezilla Advanced Extra Parameters Select an option -y1 default Clonezilla.

4.6 Shutdown Clients Picture 24 - Shutdown Clients When Cloning is Finished Select an option -p poweroff. Clients automatically power off once cloning is finished. When dcs script finishes, you can see the following command in your terminal window. Drbl-ocs -b -l enUS.UTF-8 -y1 -p poweroff selectinclient -b - run program in batch mode, i.e without any prompt -l - language en-US.UTF-8 -y1 - clonezilla server as restore server -p - shutdown client when cloning/restoring finishes selectinclient - client chooses either to clone or restore You can put the command inside the script /etc/init/ to start Clonezilla automatically after boot. To clone clients using multicast in order to speed up cloning process, use the following command. Drbl-ocs -b -g auto -e1 auto -e2 -x -r -j2 -sc0 -p poweroff -time-to-wait 30 -l enUS.UTF-8 startdisk multicastrestore corelinux sda All options are explained. Troubleshooting Here are the problems I noticed during writing the tutorial. 5.1 Client Does Not Get IP Address Check if DHCP service is running with the command: $ ps -ef grep dhcpd grep -v grep Picture 25 - Checking DHCP Service If you cannot see the output above, DHCP service is not running.

Check the service status with the command: $ systemctl status isc-dhcp-server Picture 26 - DHCP Service Disabled and Not Active We can see that DHCP service is disabled and not active. We can enable it with the command: $ systemctl enable isc-dhcp-server Picture 27 - DHCP Service Enabled But Not Active DHCP service is enabled but not active. Activate the service with the command: $ systemctl start isc-dhcp-server Picture 28 - DHCP Service Enabled and Active You can check DHCP messages in /var/log/syslog file. Picture 29 - Obtaining IP Address for Client Obtaining IP address 192.168.112.1 for client with a MAC address 09:00:27:93:43:bb via the interface enp0s3. I'm doing this at work, with a domain controller, dhcp-server and name-server.

I don't understand that it is possible to connect the clonezilla server with dhcp-server running to the same network as the excisting dhcp-servers. Won't they interfere and disturb each other? The way I found nameserver and gateway was to ifconfig before we startet your script, then I found ip-adresse and default gateway. I used the ip-adresse for default gateway both as name-server and default gateway in network/interfaces.

My network/interfaces is similar to yours, except for the adresses. Samba@samba-Mecer:$ ps -ef grep dhcpd grep -v grep samba@samba-Mecer:$ systemctl status isc-dhcp-server status: Unknown job: isc-dhcp-server samba@samba-Mecer:$ sudo systemctl status isc-dhcp-server status: Unknown job: isc-dhcp-server sudo password for samba: Sorry, try again. sudo password for samba: Sorry, try again. sudo password for samba: samba@samba-Mecer:$ sudo systemctl start isc-dhcp-server start: Unknown job: isc-dhcp-server samba@samba-Mecer:$ sudo systemctl enable isc-dhcp-server bash: enable: isc-dhcp-server: not a shell builtin samba@samba-Mecer:$. Is there any other DHCP server running in your network except the one that is running on Clonezilla server?

I. Prepare The Linux Server

If yes, the client could pickup the IP from that DHCP and it does do not continue with booting from the network. Have you started Clonezilla server? It should be started by my script as the last step but if you reboot your machine you have to start Clonzeilla server by yourself (unless you put dtrbl-ocs command inside /etc/init/clone.conf). It it is your case, run dcs command and configure Clonezilla server as it is shown in part 4 of the tutorial.

Answered my first question: cd directory, dummy. I am installing it right now. The next question, and has been a bugaboo before, is that it is, 'It is your job to configure a correct IP address/mask on the physical interface. You also need to configure default route and add DNS server.' I have, in the past, used nano to edit the network interfaces. Something like: address 122.15.14.5 netmask 255.255.252.0 gateway 122.15.14.1 add the virtual Ethernet port right after the primary network interface information like this: auto eth0:0 iface eth0:0 inet static address 192.168.99.5 netmask 255.255.255.0 saving and restarting network service.

Before I mess up, am I on the correct track?