Getting Started with Ghost4Linux
Ghost is a popular software in the Windows world for creating full backups of your PCs contents and helps in restoring individual files or the entire hard drive. One of the popular ways of archiving or creating images of Linux filesystems is to use liveCD distributions and tarring the entire contents. I personally find this very time consuming and unreliable, multiple time I have heard from other people how tar archives have gone corrupt, and restoring archived files was a painful experience. Ghost4Linux (G4L) is the perfect solution for such situations. G4L is a LiveCD Linux distribution which integrates all the components to emulate the functionality the original Ghost provides while providing a user friendly well rounded interface. This article will introduce G4L, and is mainly targeted to those users who want a simple, straight forward method of creating backup of and restoring their drives.
G4L is available from http://freshmeat.net/redir/G4L/. It is distributed as an ISO Image which can be directly written to a CD. To demonstrate the capability of G4L, we will see how major functionality of the software is used.
After downloading the ISO, and booting from it you will be greeted with the following window as shown in figure 1.

Figure 1
G4L startup screen allows for the selection of many kernels however many of them in my opinion are superfluous, as the differences between the kernels are very small. Let's just select the latest kernel available to boot our G4L LiveCD.
Once G4L loads it displays a disclaimer notice and some usage guidelines. After the console appears enter this:
g4l
And the following window will appear
This is where the core operations of G4L come in, as explained in the accompanying help, G4L supports primarily two methods of backing up hard drives the RAW Mode, which copies a hard disk bit by bit, the advantage of this mode is that every filesystem is supported, as G4L does not explicitly read the file system just makes a copy of it. However if you create a copy of the 80GB partition, you should restore the image to similar sized partition, otherwise it could lead to corruption of the file allocation table. However if you want to move to another hard disk than the second option is more recommended. The File Mode option creates a copy of all the files in the partitions and makes an image of them. This however has the drawback that if you are using an exotic file system not supported by the mainstream kernel, it probably will not work for you.
G4L ships with some handy utilities aswell, like hdparm tool to set hard disk parameters, for example enabling or disabling DMA. Zero-Tool to zero-out free space, for 'secure' deletion of your data, dd_rescue a tool helpful in cloning drives, and Parted, a famous partition manager.
We will now go through both modes, RAW Mode and File Mode.
RAW Mode
In RAW Mode, there are primarily three other options, "Network Use", which I believe is the most useful one as most people relocate their images to some remote location. "Local use", backing up and restoring to a local partition, and "Click n' clone", which allows you to select a drive which you want to clone, and another one on which the clone is to be installed, both drives will be identical in every manner, however caution should be taken that both drives should be identical.
Since I believe that network use is one of the most widespread use of storing images, we will examine it in a little more detail.
In Raw Mode's Network Use, we see the window shown above. Most of the options are self explanatory. In Pick Device you get to pick your network interface, available interfaces are automatically listed by G4L. G4L allows you the option of setting up DHCP or manually configuring your own IP. In manual configuration you simply enter a valid IP in your local subnet. The address of the FTP server where the image is supposed to be stored is specified in the "Config FTP" option. Once the image is being created a folder named 'img' contains the image, which can be configured by the "Path to Image Directory" option. Make sure that your FTP server allows write access to the user you specify in "Config useridpass". G4L accepts username/password specification in two modes, either you can specify –u username –p password, or more simply username:password.
The "Config filename" option is obvious. G4L allows for multiple compression techniques: Gzip, Bzip2 and Lzop. I believe that Bzip2 has the best compression so in my opinion it should be the default technique. Compression however is not suitable for RAW Mode, since data is read and written in binary mode. When making an image of all your files. Compression would be a lot more relevant in that scenario.
Finally having specified all options we can finally go to "Backup", which allows us to select entire drives or individual partitions, and starts the backup process.
Restoring a backup is as simple. All the options remain, except in "Config filename", where you specify the name of the file to be restored, and select the partition where to restore.
File Mode Backup
In a "File Mode" backup as already mentioned you are allowed to backup/restore files in the partitions. The working of this portion of G4L is not similar its based on a client/server architecture. And unlike the RAW Mode it does not rely on any FTP server. In "File mode", the computer where you want your files to be backed up to, you run the G4L's File-mode in server mode, and at the other end, at the computer of which you want to back up, you run the File-mode's client mode. We will now briefly go through how to setup up G4L in both modes.
In the initial G4L screen select File Mode instead, and you will be greeted with the following window:
The functions first two options, as displayed in the figure above, are identical to that of the raw mode's network option. The only difference as already mentioned, is that a FTP server is not required in this case rather, G4L uses partimage for file backups. Partimage has some limitations, however it supports all major unix based file systems like ext2/3, reiserfs, xfs, as well as Fat16/32, and has experimental support for NTFS.
After having selected the network interface and configured the IP, we can straight go to launching the server, the server starts listening for incoming connections. While a partimage server is running one can take out the CD, and put it in the other computer where the files are supposed to be copied from. At the client end again we have to configure the network device and run the client. The partimage client allows the user to select a file system and store it to a partimage server, the client also allows a user to restore a file system image from server by specifying the name of the image file.
Conclusion
G4L is a mature tool for making backups of hard drives and their contents. It is user friendly and its usage is straight forward. With such mature disk backup solutions at hand one may never need to turn towards proprietary solutions.