Cloning Hard drives using G4L and Knoppix


Get Firefox!

Home Free Software Faq Blog Microblog GNU/Linux Faq Free Media Faq's NRI Faq Immigration Faq Notes Donations About me..

This document outlines how to use G4L(ghost for linux) with knoppix.

Disclaimer :- Please use this document carefully and with your own responsibility.I cannot be handled responsible for any data loss corruption or damage of any sort.By referring to this doc you own complete responsibility of your actions.In case of doubt of liability/responsibility pls do not use this website.

Problem Description
  1.  You want clone a hard drive especially in cases like you bought a bigger hard drive and you want to migrate your old data as well as settings etc from one machine to another machine.
  2.  You are looking for Free/Open Source alternatives to proprietary solutions like Norton Ghost.
  3. You are looking for a solution which is platform/OS/filesystem  independent
  4. You are looking for a bit-by-bit cloner of hard drive..
Existing alternatives and shortcomings
As always  people have thought about the above problem description and  found various kinds of solutions with varying level of success in different environment/scenarios.
G4L and Knoppix
Using G4L along with Knoppix solves one of its important shortcomings of auto-hardware detection.Knoppix is one of the best live-CD's with a very very good automatic hardware detection.
Another advantage of using it with Knoppix is that a lot of folks already have Knoppix CD/DVD which they use as their swiss knife and this script fits very well in the arsenal without having to install anything.

How-to use G4L with Knoppix
Here is a list of software which you will need
  1. Knoppix live CD or DVD : Download the ISO from http://knoppix.net/get.php
  2. Download source code(it is just shell script) of g4l from http://sourceforge.net/projects/g4l/
Step-By-Step Instructions(Steps look long as they are detailed but the whole process will not take a long time)
  1. Boot with knoppix CD on the machine which has the hard drive to be cloned/backed up/restored
  2. On the command prompt of knoppix do "su"
  3. Goto to the /tmp folder by typing "cd /tmp" as root
  4. Make a directory named g4l by typing in "mkdir g4l"
  5. Download g4l sources from sourceforge.net using wget into the g4l directory created in step 4> like "wget http://easynews.dl.sourceforge.net/sourceforge/g4l/files3.tar.gz"
  6. In step 4> I have used the v0.21 as the source , you can use whichever is the latest version.
  7. Untar the files by issuing the following command "tar -zxvf  files3.tar.gz" into the /tmp/g4l folder
  8. Now add the path of jetcat-mod to the path variable by typing  "export PATH=$PATH:/tmp/g4l/"
  9. Now go back to the folder which has the g4l scripts by typing "cd /tmp/g4l/"
  10. Now you are ready to run the g4l scripts , so just type in ./g4l.
  11. Now you are all set and if everything goes well you can start cloning hard drives and use the functionality of G4L in knoppix.
  12. Since g4l is a bit by bit copier of hard drives , in order to achieve better compression it is highly recommended that you follow the steps on http://fbim.fh-regensburg.de/~feyrer/g4u/#shrinkimg otherwise the image creation will be very slow and the files will be very very big.

Other Notes
  1. You can copy the g4l scripts(just the scripts from the g4l/bootcd/rootfs/ ) and the jetcat executable to a usb stick and then just plop in the usb stick along with knoppix CD and then you dont have to download the files again
  2. Since g4l needs ftp server you can always use the  ftp server which comes with knoppix.The docs are locaed here http://knoppix.net/wiki/FTP_FAQ
  3. Once you have a local ftp server setup on knoppix you can also use a secondary hard drive to clone to the second hard drive which has a different geometry.Currently I do not know of a way in g4l to write the cloned image to a file.
  4. If future versions of knoppix carry the G4L scripts and the jetcat executable , it will become very very easy.
  5. The above instructions might also work for other Live-CD's as long as ncftp is already there on the lice-cd.

Other Alternatives



Submit thread to Digg | Submit to del.icio.us |
Home Free Software Faq Blog Microblog GNU/Linux Faq Free Media Faq's NRI Faq Immigration Faq Notes Donations About me..

This site is optimized for open-source/standards compliant browsers like Mozilla.org or Konqueror only.This site may not work with non-standards/proprietary browsers like Internet Explorer.
Disclaimer All the opinions expressed on this site are my personal opinions and not of my employer.
Please use this site responsibly and at your own risk.I do not guarantee or take responsiblity for any data and its accuracy.