Printable Version of Topic

Click here to view this topic in its original format

Linuxhelp _ Programming in Linux _ Tips For A Ghost Clone

Posted by: VBD Aug 12 2004, 11:08 PM

My Goal:
I'm trying to make a ghost clone, in the form of a linx bootcd which boots into a shell script (which I write in either Tcl or Python). This prompts for a device name, for one hard drive. It then creates a second partition in the unpartitioned space in the hard drive. It DD's the origonal, into a disk image on the second hard drive, which it then compresses with either bzip or Bz2. I have a few question
1. How do I get a script to launch once Linux has booted? (A stupid question, but something I might as well ask while i'm at it)
2. I can format an existing partition, but how do I have automatically create a second partition to format (assume it will always be at the end of the drive...)
3. Most importantly, how do I gzip the archive as it is created? Basically, if you dd the disk to an image and then gzip, you need the second partition to be a good chunk larger than the first (to hold the full sized disk image and the compressed image). Considering the fact, that the compressed image will be smaller than the first partition so you don't need half the disk (its compressed, plus the user probably wasn't using 100% of their disk space...), how do I compress on the fly, without needing such a large partition?
--Thanks In Advance

Powered by Invision Power Board (
© Invision Power Services (