Backing Up A Linux System With Ghost

I recently used a copy of Ghost that I had purchased for my work and successfully backed up-restored my Linux root partition (even though Ghost does not support the reiserfs filesystem). I was pleased with the outcome and took some notes, here they are: 

The version of Ghost I use is Ghost 2001, the current version is 2002. To do the following you must have a CDRW drive or a FAT partition to write the Ghost image file (.gho) to, you can also use Ghost to clone the contents of one drive to another.

Unfortunately Symantec does not make a Linux version so you must use Windows to create the Ghost boot disk needed to run Ghost. 

2) Insert the Ghost boot floppy and reboot.

3) Once Ghost is running, from the menu choose "local - Partition to Image", go to your Linux partions and backup each one individually to a CDRW or a FAT partition. Take your time reading the options, ghost can be confusing at first.

I usually name each copy with a name that corresponds to the partition I am copying. Ghost sees each partition as a number that corresponds to the initial Windows partition which is "1". This means your first Linux partition "hda5" (swap in my case) becomes "2" in Ghost's eyes. So my hda6 partition which is root was seen by ghost to be partition "3" and was 4098MB in size so I named it "3-root-4098.GHO".

Ghost gives you the option of "No Compression", "Fast Compression", and "High Compression".  My root partition was just under 1GB of used space and I chose "Fast Compression", the resulting image file was 1.8GB, when I used "High Compression" the resulting image file was 1.3GB.

Writing .GHO Image To Disk:

I have a dual boot Linux-Win98 drive and also a slave drive formatted with Fat32 so that I can store files, documents, .mp3's etc... that are available to both OS's.  The first time around  I chose to write the image file to my shared Fat32 drive, this took about 7-10 minutes to create the partition image beating my tape drive by about 50 minutes. 

Writing .GHO Image To A CDRW:

The second time around I chose to write the image to a CDR. With Ghost you can write an image directly to a CDRW drive and Ghost supports spanning the image to multiple CD's or files. Ghost reported that it would take about 6 CDR's,  which is misleading. Ghost saw that my partition was over 4GB and assumed that all of this was used space. As I said earlier, only under 1GB was actually used, the image file with High Compression was about 1.3GB in size and used only 2 CDR's. The total backup time was 51 minutes.


Once you have decided its time to reinstall your ghosted Linux partition(s), just start up the ghost program from the floppy, reinstall each partition individually by choosing "local - Partition from Image ". Each partition will be completely overwritten and you will be brought back to the pristine Linux system that you backed up, worked great for me.

Possible Problems:

I first tried using Ghost on Linux a couple of years ago (with earlier versions of both Ghost and Linux). Ghost did not correctly copy the boot sector when cloning an entire disk, it was necessary to have a Linux boot disk to boot into Linux and then run "lilo". If you plan to clone your entire drive, go into the Ghost menu, choose "Options" and there is an option to include the boot sector of the drive. If you use Ghost, you should definately have a Linux boot disk on hand.

Someone also reported that after ghosting, Linux would boot to "runlevel 3". The fix for this would be to type: "XF86Setup" and without changing anything choose "use existing config.file" and reboot. This has never happened to me.

It's also been reported that in the past, Ghost would sometimes not restore all rpm packages, apparently only affecting about 10 packages. A list of the packages can be found on the Symantec web site, however I believe this has also been fixed as I've never had this problem either.