Arch Linux BasedManjaro

How To Install Clonezilla on Manjaro

Install Clonezilla on Manjaro

Backing up your system is a critical aspect of good computing practice, particularly for Linux users who often customize their environments extensively. Clonezilla stands out as a powerful open-source solution for creating and managing disk images and clones on Linux distributions like Manjaro. This comprehensive guide will walk you through installing and using Clonezilla on your Manjaro system, providing all the information you need to safeguard your data effectively.

What is Clonezilla?

Clonezilla is a free, open-source disk imaging and cloning program designed to provide efficient system backup, recovery, and deployment solutions. Unlike simple file-based backup tools, Clonezilla works at the partition and disk level, creating exact replicas of your system that can be restored quickly in case of hardware failure or system corruption.

For Manjaro users, Clonezilla offers particular advantages. The rolling release nature of Manjaro means your system is constantly evolving with updates. Having regular system images allows you to easily recover to a known-good state if an update causes problems. Additionally, Clonezilla supports various filesystems commonly used on Manjaro, including ext4, xfs, and btrfs.

Clonezilla comes in three main varieties:

  • Clonezilla Live: Perfect for single-machine backup and restoration
  • Clonezilla Lite Server: For deploying images to multiple machines simultaneously
  • Clonezilla SE (Server Edition): For large-scale deployment requiring a DRBL server

For most Manjaro users, Clonezilla Live will be the most appropriate choice for creating system backups and disk clones.

Prerequisites for Installing Clonezilla

Before proceeding with the installation of Clonezilla on your Manjaro system, ensure you have the following:

  • A Manjaro Linux system with administrative (sudo) privileges
  • An internet connection for downloading packages
  • Sufficient disk space for the Clonezilla package (approximately 100MB)
  • External storage media for saving backups (USB drive, external hard drive, or network storage)
  • Up-to-date system packages

It’s also recommended to update your system before installing any new software. Current packages ensure compatibility and reduce the likelihood of installation problems.

Installation Methods

You have two primary options for installing and using Clonezilla on Manjaro: direct installation via the package manager or creating a bootable Clonezilla Live USB. Each method has distinct advantages depending on your specific needs.

Method 1: Package Manager Installation

The simplest way to install Clonezilla on Manjaro is through the pacman package manager. This method integrates Clonezilla directly into your system, making it readily available for use.

  1. First, open your terminal by pressing Ctrl+Alt+T or finding it in your application menu.
  2. Update your system packages to ensure you have the latest dependencies:
sudo pacman -Syu
  1. Once the system update completes, install Clonezilla with:
sudo pacman -S clonezilla
  1. Verify the installation was successful by checking the version:
sudo clonezilla -V

This should display the version information for your newly installed Clonezilla package.

The advantage of this installation method is that Clonezilla becomes integrated into your system and is easily accessible. However, keep in mind that for some operations, you might need to boot from external media to clone the entire system disk.

Method 2: Clonezilla Live USB

The second method involves creating a bootable Clonezilla Live USB, which allows you to boot directly into the Clonezilla environment. This approach is particularly useful for cloning entire system disks or when you need to work on a non-booting system.

  1. Download the Clonezilla Live ISO:
    • Visit the official Clonezilla website (clonezilla.org)
    • Choose between the “stable” (Debian-based) or “alternative stable” (Ubuntu-based) version
    • The alternative stable version includes proprietary drivers and generally offers better hardware support
    • Select ISO as the file type to avoid potential “missing partition table” errors
  2. Create a bootable USB drive:Using Manjaro Terminal (dd command):
    • Insert your USB drive
    • Identify the device name with:
    lsblk
    • Create the bootable USB (replace /dev/sdX with your actual device path):
    sudo dd if=/path/to/clonezilla-iso-file of=/dev/sdX status=progress bs=4M
    • Ensure data is fully written:
    sync

    Using a GUI Tool:

    • Manjaro includes USB writer tools like USB Image Writer
    • Launch the application, select the Clonezilla ISO, choose your USB drive, and write the image
  3. Boot from the USB:
    • Restart your computer
    • Access your boot menu (typically by pressing F12, F2, or Delete during startup)
    • Select the USB drive as the boot device

The Live USB method is more versatile as it allows you to work on your system disk without constraints, making it ideal for full system backups and migrations.

Using Clonezilla on Manjaro

Once you have Clonezilla installed, either directly on your system or as a Live USB, you can begin using it for various backup and cloning operations.

Basic Operations

Launching Clonezilla

From Package Installation:

  1. Open a terminal
  2. Run Clonezilla with:
sudo clonezilla

From Live USB:

  1. Boot from the Clonezilla Live USB
  2. At the boot menu, select the default option or “Clonezilla live”
  3. Choose your preferred language, keyboard layout, and display settings
  4. Select “Start Clonezilla” from the main menu

The Clonezilla interface is text-based and navigated using arrow keys, Tab, and Enter. While it may seem intimidating at first, the menu-driven approach makes it straightforward to use once you understand the workflow.

Install Clonezilla on Manjaro

Understanding the Clonezilla Interface

Clonezilla’s interface is organized into sequential menus that guide you through the process:

  1. Main Menu: Choose between device-image mode (backing up to image files) or device-device mode (direct cloning)
  2. Mode Selection: Choose between beginner and expert modes
  3. Operation Selection: Select the specific operation (saveparts, savedisk, restoreparts, etc.)
  4. Source Selection: Choose the source disk or partition
  5. Destination Selection: Select where to save the image or destination disk
  6. Configuration Options: Set compression, verification, and other options
  7. Confirmation: Review and confirm before proceeding

Navigate carefully through these menus to ensure you’re performing the intended operation.

Creating a Full System Backup

One of the most common uses for Clonezilla is creating a complete system backup:

  1. Start Clonezilla (via terminal or Live USB)
  2. Select “device-image” to create an image file backup
  3. Choose your preferred mode (beginner mode is recommended for first-time users)
  4. Select “savedisk” to backup an entire disk
  5. Enter a name for your backup (use a descriptive name including date)
  6. Select the source disk to backup (typically /dev/sda for the primary drive)
  7. Choose the destination where the backup will be stored:
    • For external drives, select the appropriate device
    • For network storage, choose the appropriate protocol (Samba/CIFS, NFS, SSH)
  8. Configure backup options:
    • Compression level (higher compression saves space but takes longer)
    • Split large files (useful for FAT32 destinations with file size limitations)
    • Backup verification (recommended for critical backups)
  9. Review settings and confirm to begin the backup process

Depending on the size of your disk and the compression level selected, the backup process may take anywhere from minutes to hours. The resulting image can be restored later if needed.

Cloning to a Larger Disk

When upgrading to a larger disk, Clonezilla provides options to make use of the additional space:

  1. Boot from the Clonezilla Live USB
  2. Select “device-device” for direct disk-to-disk cloning
  3. Choose “Expert mode” to access advanced options
  4. Select “disk_to_local_disk” to clone directly between disks
  5. Select the source disk containing your Manjaro installation
  6. Select the larger destination disk
  7. When prompted for advanced parameters, select “-k1” (create partition table proportionally) and “-r” (resize filesystem automatically)
  8. Confirm your settings and begin the cloning process

These options ensure that after cloning, your partitions will be resized to utilize the full capacity of the larger disk. After the cloning process is complete, you may need to update your bootloader:

  1. Boot into your Manjaro system on the new disk
  2. Open a terminal and run:
sudo update-grub

This ensures that the boot configuration correctly recognizes the new disk arrangement.

Advanced Clonezilla Features

Clonezilla offers several advanced features that can streamline your backup workflow and provide additional flexibility.

Automated Backups

You can schedule regular Clonezilla backups using cron jobs on your Manjaro system:

  1. Create a backup script that calls Clonezilla with appropriate parameters:
#!/bin/bash
sudo ocs-sr -q2 -c -j2 -z1p -i 4096 -sc -p true savedisk manjaro_backup_$(date +%Y%m%d) /dev/sda
  1. Make the script executable:
chmod +x backup_script.sh
  1. Add it to your crontab to run weekly:
crontab -e

Add a line like:

0 2 * * 0 /path/to/backup_script.sh

This example would run your backup every Sunday at 2 AM.

Network Cloning Options

Clonezilla supports various network protocols for remote backups:

  • Samba/CIFS: For Windows network shares
  • NFS: For Linux/Unix network storage
  • SSH/SFTP: For secure remote backup storage

To use network storage, select the appropriate option when choosing your destination in Clonezilla. You’ll need to provide:

  • Server address/hostname
  • Share name or path
  • Username and password (if required)
  • Mount options (if necessary)

Network backups allow you to store images remotely, providing protection against local hardware failures.

Command-line Usage

For advanced users, Clonezilla can be controlled entirely via command line, bypassing the interactive menus. This is particularly useful for scripting:

# Example: Create a compressed disk image with specific options
sudo ocs-sr -q2 -c -j2 -z1p -i 4096 -sc -p true savedisk manjaro_backup /dev/sda

The command-line interface provides all the flexibility of the interactive menus but can be incorporated into scripts for automation.

Troubleshooting Common Issues

Even with careful preparation, you may encounter issues when using Clonezilla. Here are solutions to some common problems:

Package Installation Failures

If you encounter errors installing Clonezilla through pacman:

  1. Ensure your package databases are up to date:
sudo pacman -Syy
  1. Check for and resolve package conflicts:
sudo pacman -Syu
  1. If dependency issues persist, try installing with:
sudo pacman -S --needed clonezilla

Boot Media Problems

If your Clonezilla Live USB doesn’t boot properly:

  1. Verify the ISO was written correctly:
sudo dd if=/dev/sdX bs=4M count=100 | md5sum

Compare this with the expected MD5 checksum of the ISO

  1. Try creating the USB with a different tool (Etcher, Ventoy, or Rufus)
  2. Check your BIOS/UEFI settings for:
    • Secure Boot (try disabling it)
    • Boot order configuration
    • Legacy/UEFI boot mode settings

Cloning Errors

When encountering errors during the cloning process:

  1. For “Device or resource busy” errors:
    • Ensure you’re not trying to clone a mounted partition
    • If using a Live USB, make sure swap is disabled:
    sudo swapoff -a
  2. For “Not enough space” errors despite having a larger destination disk:
    • Use expert mode with the “-k1” and “-r” options
    • Consider using GParted to resize partitions manually after cloning
  3. For filesystem errors:
    • Run a filesystem check before cloning:
    sudo fsck -f /dev/sdXY

Partition Sizing Issues

If partitions aren’t properly sized after cloning to a larger disk:

  1. Boot into Manjaro and install GParted:
sudo pacman -S gparted
  1. Launch GParted and resize partitions manually to utilize the available space
  2. After resizing, update your filesystem:
sudo resize2fs /dev/sdXY  # For ext4 partitions

Tips and Best Practices

Implementing these best practices will help ensure your Clonezilla experience is smooth and your backups reliable:

  • Regular Backups: Schedule monthly system images, or before major system changes
  • Verify Backups: Always enable the verification option when creating critical backups
  • Store Backups Safely: Keep backups on separate physical devices, ideally in different locations
  • Label Thoroughly: Use descriptive names including the date and system version
  • Test Restoration: Periodically test your backup by restoring to a spare drive
  • Document Procedures: Keep notes on the specific options you use for backups

For multi-boot systems, take special care:

  • Back up each system separately when possible
  • Be extremely careful when restoring to avoid overwriting other operating systems
  • Consider using partition-specific backup (saveparts) rather than full disk backup

Case Study: Migrating Manjaro to New Hardware

Clonezilla excels at facilitating hardware migrations. Here’s how to move your Manjaro installation to new hardware:

  1. Create a full backup of your current system using Clonezilla Live USB
  2. Boot the Clonezilla Live USB on the new hardware
  3. Restore the image to the new system’s disk
  4. After restoration, boot into Manjaro recovery mode:
    • Update hardware drivers: sudo mhwd -a pci nonfree 0300
    • Regenerate initramfs: sudo mkinitcpio -P
    • Update bootloader: sudo update-grub
  5. Reboot and verify system functionality

For systems with significantly different hardware, you may need to make additional adjustments to drivers and configuration files after migration.

Comparison with Other Backup Methods

Understanding how Clonezilla compares to alternatives helps you choose the right tool for different scenarios:

Clonezilla vs. Timeshift

  • Clonezilla: Creates full disk images, works outside the operating system, ideal for complete system recovery
  • Timeshift: Creates incremental snapshots, works within the operating system, better for recovering from software issues

Clonezilla vs. Manual Backups

  • Clonezilla: Automated, faster, ensures system consistency, preserves all metadata
  • Manual backups: More selective, no special tools needed, easier to retrieve individual files

Clonezilla vs. Commercial Solutions

  • Clonezilla: Free, open-source, highly configurable, community support
  • Commercial solutions: Polished interfaces, often include cloud storage, dedicated customer support

Choose Clonezilla when you need complete system recovery capability, disk migration, or want to create point-in-time snapshots of your entire system.

Congratulations! You have successfully installed Clonezilla. Thanks for using this tutorial to install the latest version of the Clonezilla partition and disk on Manjaro Linux. For additional help or useful information, we recommend you check the official Clonezilla website.

VPS Manage Service Offer
If you don’t have time to do all of this stuff, or if this is not your area of expertise, we offer a service to do “VPS Manage Service Offer”, starting from $10 (Paypal payment). Please contact us to get the best deal!

r00t

r00t is an experienced Linux enthusiast and technical writer with a passion for open-source software. With years of hands-on experience in various Linux distributions, r00t has developed a deep understanding of the Linux ecosystem and its powerful tools. He holds certifications in SCE and has contributed to several open-source projects. r00t is dedicated to sharing her knowledge and expertise through well-researched and informative articles, helping others navigate the world of Linux with confidence.
Back to top button