How to Create Ext4 Partition Images

How to Create Ext4 Partition Images thumbnail
In order to run Clonezilla, you will need a blank disc.

The Extended File System, abbreviated "ext," has been developed to create a reliable and functional file system for Linux. Experimental until 2009, ext4 is now coming standard with many distributions of Linux, including Ubuntu and Fedora. Despite ext4's popularity, the major partition backup program for Linux -- Partimage -- does not recognize the file system, complicating the process of creating a backup image of your ext4 partition. A simple method for creating a partition image is to use the program Clonezilla or by using the DD command in the command line.

Things You'll Need

  • Blank CD
Show More

Instructions

  1. Creating a Partition Image with Clonezilla

    • 1

      Download the ISO file for the Clonezilla Live CD. Burn the ISO file to a disc to create the boot disc.

    • 2

      Insert the Clonezilla Live CD into your computer's optical drive and reboot the computer. This will run the Clonezilla program and allow you to access the drives that you wish to clone without having them mounted for use.

    • 3

      Set up the series of options during the boot process. You will be asked to select a mode to run Clonezilla in, a language for the program to use and a keymap for your keyboard. If you use an US English keyboard, select the option "Don't Touch Keymap." Once these options are all selected, choose "Start Clonezilla" to enter the program.

    • 4

      Click the "device-image" option for creating an image of your ext4 partition.

    • 5

      Click "local_dev" to save your image to a device such as a secondary hard drive, a USB thumb drive or an external hard drive. If your USB drive is not already connected to the computer, do so now and wait briefly before selecting "local_dev."

    • 6

      Designate the location where you wish to save your partition image; Clonezilla offers hints to understanding the name of your devices on the screen if you are unsure which option to choose. Do not choose the partition that you are copying as the destination.

    • 7

      Click "Beginner" mode if you have no experience with making partition images; once you've selected Beginner mode, choose the "savedisk" option to save your partition image to a disk.

    • 8

      Name your partition image and select the partition that you wish to back up. The process of creating an image should be displayed as a text on a black background and may take some time to complete.

    Using the DD Command to Create a Partition Image

    • 9

      Boot your computer into command line, also called bash prompt; this will allow you to run the DD command on any partition without having to worry about damaging a mounted partition. The methods for booting into command line vary between distributions; check your distribution's documentation for more information.

    • 10

      Run as the root user, if you are not already; if the prompt shows your username (i.e. "username@Computer") then you are not the root user. You can change to root by entering "su" and pressing the "Enter" key, then entering your root password.

    • 11

      Enter the command; if the partition that you're copying is "sda2" and you're copying the image to your home directory, the command would read "dd if=/dev/sda2 of=~/sda2.img" You can make the image name (the portion before ".img" in the "of" portion of the command) whatever you please.

    • 12

      Compress your image using gzip with "gzip sda2.img #generates disk1.img.gz" or with bzip by using "bzip2 sda2.img #generates disk1.img.bz2." Whichever method you use is to your discretion, but both will take time, more so if your image file itself was large.

Tips & Warnings

  • While DD is a simple command for creating partition images, it doesn't come without cost; the command will copy the entire partition, including the empty space.

  • Do a back up any vital files or data before making modifications to your partitions or drives.

  • Be extremely careful when entering commands at the root level; small errors can cause large problems on your system.

  • If using DD to save the image file to your home directory, make sure that you have enough space for the uncompressed image file.

Related Searches

References

Resources

  • Photo Credit cd image by matteo NATALE from Fotolia.com

You May Also Like

Related Ads

Featured