Computer literacy, assistance and repair

Backup: creating a partition image - CloneZilla. CloneZilla disk cloning Installing clonezilla on your hard drive

As the saying goes good System Administrator- this is a lazy system administrator. For any system administrator it is not a problem to install and configure the system on one computer; the problem begins when there are more than 10 such computers. And on each one you need to do the same thing. But as you know laziness is the engine of progress and comes to our aid Clonezilla.

Clonezilla - free software open source, designed for cloning disks and individual hard drive partitions, as well as creating backups and disaster recovery of the system.

So the task is to multiply an already configured operating system with all the necessary software onto N number of machines.

The procedure is carried out in two stages:

I. Preparing the image and saving it on the server.

1. Prepare the system for cloning, i.e. We will install the operating system, all the necessary software, perform standard settings to the maximum, so that after cloning, we can quickly customize the system and put the computer into operation (For this purpose, you can use VirtualBox). I will do this using Debian as an example (although we are actively creating copies of Windows and Linux).

2. Download the image latest version Clonezilla and write it to a disk or flash drive. We restart the computer and boot from our media and select the item Clonezilla live (Default settings, VGA 800×600)

3. Select the system language:

5. Launch the Clonezilla system:

7. Now we need to indicate where we will store our copy. Since my servers are on Linux, I select the item ssh-server Use SSH server. On the server you need to prepare a directory for storing images of system copies.

8. Since we will be transferring data over the network, the system will ask you to make network settings for Clonezilla. Since I have a DHCP server running on my network, I don’t need to set the settings manually:

9. Specify the name or IP of the server on which we will store the copy:


10. Specify the connection port, ours is standard - 22:

11. Specify the username under which we will connect to the server via the ssh protocol (in my case it is school):

12. Specify the exact path to the directory on the server where we will store copies:

13. All that remains is to enter the user password (in our case it is school) to connect to the server via the ssh protocol:

14. If we did everything correctly, a connection to the server will occur and we will need to press Enter:

16. Select the Beginner settings level - the initial level of settings:

17. At the next stage, select the first item - savedisk Save local disk as an image:

18. Specify the name of the saved image:

19. We indicate which disk we will save:

20. Select the level of image verification, usually everything goes through without errors, therefore, to save time, select the first item:

22. And we observe the process of removing the image from our system:

23. After completing the process of removing the image and saving it on the server, reboot the system or turn off the computer:

II. Copying a saved image from the server to a new machine.

When restoring a finished image to a new machine, points 1 to 16 absolutely coincide with point “ I. Preparing the image and saving it on the server«.

1. When reaching the point 16 select an item restoredisk Restore image to local disk:

2. Select the image of the desired system:

3. Select the disk on which the recording will take place. It is advisable to prepare it on a computer and format it.



Some machine, e.g. Asus Eee PC or Acer Aspire One, comes without CD/DVD drive. In this case, an USB flash drive or USB hard drive is the best way to boot Clonezilla live. You can follow the following to make a bootable Clonezilla live USB flash drive or hard drive using either or .

Requirement:

  1. Microsoft Windows 2000/XP/Vista/7, or GNU/Linux.
  2. Internet access for downloading a distribution to install, or a pre-downloaded ISO file.
  3. An USB drive with a FAT or NTFS partition. If you are making this bootable USB flash drive on GNU/Linux, more file systems, including ext,btrfs,xfs,ufs,ffs can be used for the USB flash drive.

USB setup with MS Windows

Choose one of the following methods to setup Clonezilla Live on your USB flash drive using MS Windows:

MS Windows Method A: Tuxboot

  1. Download Tuxboot on your MS Windows computer.
  2. From MS Windows, run the Tuxboot program and follow the instructions in the GUI to install Clonezilla Live on your USB flash drive.

MS Windows Method B: Manual

WARNING! DO NOT RUN makeboot.bat from your local hard drive!
Doing so could cause your MS windows not to boot!!!

  1. Download the Clonezilla Live zip file.
  2. If you already have a partition of at least 200 MB in size on your USB flash drive formatted with a FAT or NTFS file system then skip to the next step (3).
    Otherwise create at least a 200 MB partition on your USB flash drive and format it with a FAT16/FAT32 or NTFS file system.
  3. Extract all the contents of the zip file to the FAT16/FAT32 or NTFS partition on your USB flash drive. Keep the directory architecture, for example, file "GPL" should be in the USB flash drive"s top directory (e.g. G:\GPL).
  4. Browse to your USB flash drive and as an administrator , (On the USB flash key, create a shortcut to the makeboot.bat file. Then right-clic on the shortcut, Properties, Advanced and check "Run as administrator".), click the makeboot.bat in the dir utils\win32\ (for 32-bit Windows) or makeboot64.bat in the dir utils\win64\ (for 64-bit Windows). WARNING! Makeboot.bat must be run from your USB flash drive.
    If you are an experienced user, open a command prompt as Administrator, navigate to the root of the USB flash key and enter \utils\win32\makeboot or \utils\win64\makeboot, depending on the flavor of Windows you are running.
  5. Follow the on-screen instructions.
    (PS: The above description is modified from: http://www.pendrivelinux.com/2007/01/02/all-in-one-usb-dsl. Thanks to PDLA from http://pendrivelinux.com)

MS Windows Method C: Unetbootin (Not Recommended)

  1. If you already have Unetbootin installed on your computer then skip to the next step (2).
    on your MS Windows computer.
  2. Download the Clonezilla Live iso file.
  3. From MS Windows, run the Unetbootin program and follow the instructions in the GUI to install Clonezilla Live on your USB flash drive.
    NOTE:

Windows Method D: LinuxLive USB Creator

  1. If you already have LinuxLive USB Creator installed on your computer then skip to the next step (2).
    Otherwise download and install LinuxLive USB Creator on your MS Windows computer.
  2. Download the Clonezilla Live iso file.
  3. From Windows, install then run the LinuxLive USB Creator program and follow the instructions in the GUI to install Clonezilla Live on your USB flash drive.

MS Windows Method E: Rufus USB Creator

  1. If you already have Rufus installed on your computer then skip to the next step (2).
    Otherwise download and install Rufus on your MS Windows computer.
  2. Download the Clonezilla Live iso file.
  3. From MS Windows, run the Rufus program and follow the instructions in the GUI to install Clonezilla Live on your USB flash drive.

USB setup with GNU/Linux

Choose one of the following methods to setup Clonezilla Live on your USB flash drive using GNU/Linux:

GNU/Linux Method A: Tuxboot

  1. Download Tuxboot on your GNU/Linux computer.
  2. From GNU/Linux, follow the instructions and the GUI to run Tuxboot to install Clonezilla Live on your USB flash drive.

GNU/Linux Method B: Manual

WARNING! Confirm you have the correct path name before executing commands!
Failure to do so could cause loss of data or your GNU/Linux not to boot!!!
/dev/sdd is a device path name
/dev/sdd1 is a partition path name

  1. Download the Clonezilla Live zip file.
  2. If you already have a FAT or NTFS partition on your USB flash drive then skip to the next step (3).
    Otherwise prepare at least a 200 MB partition formatted with either a FAT16/FAT32 or NTFS file system.
    If the USB flash drive or USB hard drive does not have any partition, you can use a partitioning tool (e.g. gparted, parted, fdisk, cfdisk or sfdisk) to create a partition with a size of 200 MB or more.
    Here we assume your USB flash drive or USB hard drive is /dev/sdd ( You have to confirm your device name, since it"s _NOT_ always /dev/sdd) on your GNU/Linux, so the partition table is like: # fdisk -l /dev/sdd Disk /dev/sdd: 12.8 GB, 12884901888 bytes 15 heads, 63 sectors/track, 26630 cylinders Units = cylinders of 945 * 512 = 483840 bytes Disk identifier: 0x000c2aa7 Device Boot Start End Blocks Id System /dev/sdd1 * 1 26630 12582643+ b W95 FAT32 Then format the partition as FAT with a command such as "mkfs.vfat -F 32 /dev/sdd1"
    WARNING! Executing the mkfs.vfat command on the wrong partition or device could cause your GNU/Linux not to boot. Be sure to confirm the command before you run it.# mkfs.vfat -F 32 /dev/sdd1 mkfs.vfat 2.11 (12 Mar 2005)
  3. Insert your USB flash drive or USB hard drive into the USB port on your Linux machine and wait a few seconds. Next, run the command "dmesg" to query the device name of the USB flash drive or USB hard drive. Let"s say, for example, that you find it is /dev/sdd1. In this example, we assume /dev/sdd1 has FAT filesystem, and it is automatically mounted in dir /media/usb/. If it"s not automatically mounted, manually mount it with commands such as "mkdir -p /media/usb; mount /dev/sdd1 /media/usb/".
  4. Unzip all the files and copy them into your USB flash drive or USB hard drive. You can do this with a command such as: "unzip clonezilla-live-2.4.2-32-i686-pae.zip -d /media/usb/"). Keep the directory architecture, for example, file "GPL" should be in the USB flash drive or USB hard drive"s top directory (e.g. /media/usb/GPL).
  5. To make your USB flash drive bootable, first change the working dir, e.g. "cd /media/usb/utils/linux", then run "bash makeboot.sh /dev/sdd1" ( replace /dev/sdd1 with your USB flash drive device name), and follow the prompts.
    WARNING! Executing makeboot.sh with the wrong device name could cause your GNU/Linux not to boot. Be sure to confirm the command before you run it.

    NOTE: There is a known problem if you run makeboot.sh on Debian Etch, since the program utils/linux/syslinux does not work properly. Make sure you run it on newer GNU/Linux, such as Debian Lenny, Ubuntu 8.04, or Fedora 9.

T.I.P.: If your USB flash drive or USB hard drive is not able to boot, check the following:

  • Ensure that your USB flash drive contains at least one FAT or NTFS partition.
  • Ensure that the partition is marked as "bootable" in the partition table.
  • Ensure that the partition starts on a cylinder boundary.
    For the first partition this is usually sector 63.

GNU/Linux Method C: Unetbootin (Not Recommended)

  1. If you already have Unetbootin installed on your computer then skip to step 2.
    Otherwise install on your GNU/Linux computer.
  2. Download the Clonezilla Live iso file.
  3. From GNU/Linux, run the Unetbootin program and follow the instructions in the GUI to install Clonezilla Live on your USB flash drive.
    NOTE: The boot menu created by Unetbootin is not exactly the same as the boot menu created in method A. Therefore it is recommended to use method A.

Many professional backup programs, in addition to the function of backing up individual files, also provide the ability to create exact copies partitions or even entire disks. In the latter case, redundancy is also often called cloning. It is used mainly in a corporate environment for deploying customized operating system on several computers, but with the same success it can be used to transfer the OS and user files to a new computer, which is what we are actually going to demonstrate.

To create a disk clone we will use a free professional program Clonezilla. It is intended for backing up, cloning and restoring partitions and disks from images, while the created backup or disk clone can be stored on a second hard drive, removable media and a remote server (SSN, Samba, NFS, WebDav, S3 and Swift servers are supported) . Clonezilla is distributed as a bootable ISO image based on Linux; all backup (cloning) operations are performed exclusively from LiveCD.

So, to create a copy of the disk, we need the program itself and a second hard drive connected to the PC, which has an equal or larger capacity than the one being copied. There is also a new computer with an unpartitioned disk onto which we will deploy the cloned disk. Let's go to the developer's website clonezilla.org/downloads.php and download the ISO image with the program, not forgetting to select the processor architecture.

If you have AMD, in the “Select CPU architecture” item we leave amd64, if Intel, select accordingly i386.

Before you start cloning, it is advisable to prepare the system using the built-in console utility Sysprep. Go to the address in Explorer C:/Windows/System32 and run the executable sysprep.exe. The system preparation program window will open.

For cleaning action, select “Go to the system welcome window (OOBE)”, check the “Prepare for use” checkbox, select “Shut down” option for shutdown and click “OK”. After the utility has completed its work, the computer will turn off.

Note: Using the Sysprep system data reset utility is optional. It is used mainly when deploying Windows on corporate computers; in the case of a home transfer of the system to a new PC, it can be neglected, this will save you from the need to re-set user parameters.

After that, boot from the Clonezilla disk, select “Other modes of Clonezilla live” from the menu, select the appropriate screen resolution and wait for the wizard window to load.

To select settings, use the arrow keys, and to apply them, use the Enter key. Next, select the interface language.

We leave the layout as default.

In the next window, click “Launch Clonezilla”.

Then you will need to select the cloning mode. The choice of mode is not particularly important; we chose “directly from disk to disk or from partition to partition.”

Leave the settings level at default.

Select the cloning type “clone local disk to local disk”.

Then we indicate the target disk to which recording will be made backup copy. In Clonezilla it is labeled sdb.

Before starting the main operation, the program will prompt you to check the integrity file system. Whether we check or skip, it’s up to you to decide.

In the next window, indicate the action upon completion of cloning (reboot or shutdown the PC).

Press Enter and confirm all requests by entering Y (yes).

The cloning procedure will begin.

Approximately the same scenario is used to deploy a clone to a new computer. After connecting the backup disk to your PC, boot from Clonezilla and repeat all steps until you select the source and destination disks. Here we do everything the other way around. The source will be the disk with the copy, the destination will be new disk on another computer. We confirm the actions by entering Y as described above. Once cloning is complete, turn on the computer.

The system will boot, but before that the devices will be prepared, and since the system data was previously reset by the Sysprep utility, you will also need to perform a number of basic user settings: select the language, accept license agreement, create a new local account.

If the hard disk on which the image was restored is larger than the disk from which the copy was made, we recommend going to the disk manager and determining the resulting unallocated space, for example, creating a new volume in its place or attaching it to an existing partition. Naturally, we physically disconnect the second disk with the clone from the computer.

That's all. We hope that the instructions provided will be useful to you.

Very often, especially among inexperienced Linux users, as a result of installing new kernels, drivers and other experiments, the system becomes inoperative, and it can be extremely difficult to revive it without the proper skills. Don’t be discouraged, in this case, system recovery from backup copy. The problem is that everyone has heard about backup, but not everyone understands how it works.

In this article, I will look at a simple way to create a system backup and then restore it using the tool Clonezilla Live.

First, download the image iso from the official one.

For example, stable image .

We create a bootable USB flash drive using any usual method. You can use or more advanced . If you installed the system from a flash drive, this process should be familiar to you; we will not dwell on it.

By creating a bootable USB flash drive Clonezilla Live, boot from it, setting the priority of our flash drive in Bios. As a result, the following screen should open in front of us:


Click Enter, select Russian language:


Choose "Don't touch the layout":

Choose "Launch Clonezilla":


Then select device-image, for working with disks and partitions:


Then select local-dev, because we will save to a local device, and not to a remote server:


Next comes the crucial stage - you need to choose HDD or other medium, on which (and exactly on which) we will keep a backup copy, in my case it will be a flash drive(different!) because I used a virtual machine to take screenshots. In your case, it could be anything - either a flash drive (for the first time, preferably), or separate section hard drive , usually used as "file dumpsters", or a separate physical hard drive if available, or even an NTFS partition containing your Windows if it is installed as a second system. If you want to use a flash drive, insert it in response to this prompt (in yellow), if not, just press enter:


So, based on the considerations above, we select a device for storing backups (or, as it is loudly called in Clonezilla, Image repository). In my case, as was said, this is a flash drive:


Note: The words "repository" and "images" should not mislead you. Repository, V in this case, it's just a "storage" and image- this is just a folder where a copy of your system will be compressed by the archiver.

Choose directory on the device, in which we will save the image, I prefer the root one, so as not to get confused:

Then there will be a short media check, when finished just press Enter:


Next, the selection of settings wizard mode will open, select Beginner(for newbies):


Next, select
or savedisk, to save the entire disk,
or saveparts if we want save partitions
I chose saveparts, since in reality we are most often interested in copying the Linux partition/partitions. Note: Copying the entire disk is usually not necessary unless you want to "storage" a partition on the same disk is selected, it will not be possible at all:


Enter name of the copy being created eg based on date:


Then select our ext4 partition (or partitions), which we will make a copy of (marks in the list preceded by a space, I got the only item on my virtual machine):


Then we indicate whether we will check disk before creating a backup:


And will we check the image after creation:


This is almost all over. Questions will be asked, we will answer ALL of them. y and click Enter:


And now the backup will go:


When checking the image, if it was selected, a similar window pops up again:

All you have to do is wait for the work to complete and restart the computer following the instructions Clonezilla.

Backup files in the file manager look something like this:

Restoring from a backup using Clonezilla

Recovery happens the same way general principle- first specify “repository”, Where lies the image, then select the image itself, and finally we indicate target partition on the disk on which we will “deploy” this image.

So, let's download Clonezilla, do everything as in the previous paragraph and get to the disk selection screen where the backup is located:

Very often, especially among inexperienced Linux users, as a result of installing new kernels, drivers and other experiments, the system becomes inoperative, and it can be extremely difficult to revive it without the proper skills. Don’t be discouraged, in this case, system recovery from backup copy. The problem is that everyone has heard about backup, but not everyone understands how it works.

In this article, I will look at a simple way to create a system backup and then restore it using the tool Clonezilla Live.

First, download the image iso from the official one.

For example, stable image .

We create a bootable USB flash drive using any usual method. You can use Unetbootin or the more advanced MultiSystem LiveUSB. If you installed the system from a flash drive, this process should be familiar to you; we will not dwell on it.

By creating a bootable USB flash drive Clonezilla Live, boot from it, setting the priority of our flash drive in Bios. As a result, the following screen should open in front of us:


Click Enter, select Russian language:


Choose "Don't touch the layout":

Choose "Launch Clonezilla":


Then select device-image, for working with disks and partitions:


Then select local-dev, because we will save to a local device, and not to a remote server:


Next comes the crucial stage - you need to select a hard drive or other storage device, on which (and exactly on which) we will keep a backup copy, in my case it will be a flash drive(different!) because I used a virtual machine to take screenshots. In your case, it could be anything - either a flash drive (for the first time, preferably freshly formatted), or separate hard drive partition, usually used as "file dumpsters", or a separate physical hard drive if available, or even an NTFS partition containing your Windows if it is installed as a second system. If you want to use a flash drive, insert it in response to this prompt (in yellow), if not, just press enter:


So, based on the considerations above, we select a device for storing backups (or, as it is loudly called in Clonezilla, Image repository). In my case, as was said, this is a flash drive:


Note: The words "repository" and "images" should not mislead you. Repository, in this case, it’s just a “storage”, and image- this is just a folder where a copy of your system will be compressed by the archiver.

Choose directory on the device, in which we will save the image, I prefer the root one, so as not to get confused:

Then there will be a short media check, when finished just press Enter:


Next, the selection of settings wizard mode will open, select Beginner(for newbies):


Next, select
or savedisk, to save the entire disk,
or saveparts if we want save partitions
I chose saveparts, since in reality we are most often interested in copying the Linux partition/partitions. Note: Copying the entire disk is usually not necessary unless you want to "storage" a partition on the same disk is selected, it will not be possible at all:


Enter name of the copy being created eg based on date:


Then select our ext4 partition (or partitions), which we will make a copy of (marks in the list preceded by a space, I got the only item on my virtual machine):


Then we indicate whether we will check disk before creating a backup:


And will we check the image after creation:


This is almost all over. Questions will be asked, we will answer ALL of them. y and click Enter:


And now the backup will go:


When checking the image, if it was selected, a similar window pops up again:

All you have to do is wait for the work to complete and restart the computer following the instructions Clonezilla.

Backup files in the file manager look something like this:

Restoring from a backup using Clonezilla

Restoration follows the same general principle - first we specify the “repository”, Where lies the image, then select the image itself, and finally we indicate target partition on the disk on which we will “deploy” this image.

So, let's download Clonezilla, do everything as in the previous paragraph and get to the disk selection screen where the backup is located:

Related publications