Linux - SoftwareThis forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
I've recently fell in love with using Puppy as a Live CD for data recovery, partitioning (it replaced Partition Magic) and just general playing around.
At work, I'm in a lab/testing environment, and we frequently re-image our machines to start with a clean slate. We've always used Ghost. The process involves running the OS on the 1st partition, with different images (different versions of Windows) stored in a FAT32 partition, which is accessible by Ghost via a boot floppy.
Yesterday, I successfully used "Pudd" to create an image of a Windows XP partition and save it the FAT32 partition of one of my test machines. While I'm satisfied that it worked, I was less than satisfied with its compression performance.
Ghost created 2 files of the XP image, totally around 2.1GB in size. The single .gz file created by Pudd was around 4GB.
Is there a utility (or a better way of using DD) that'll improve the compression performance?
I'm trying to avoid the process of approving spending for a new copy of Ghost or Acronis.
I use dd and gzip the output. Usually, I just let the gzip default on its compression setting, but you can tell gzip to emphasize compression over speed.
From man gzip:
Quote:
-# --fast --best
Regulate the speed of compression using the specified digit #,
where -1 or --fast indicates the fastest compression method
(less compression) and -9 or --best indicates the slowest com-
pression method (best compression). The default compression
level is -6 (that is, biased towards high compression at expense
of speed).
So you might try dd piped to gzip -9 and see what happens.
I use dd and gzip the output. Usually, I just let the gzip default on its compression setting, but you can tell gzip to emphasize compression over speed.
From man gzip:
So you might try dd piped to gzip -9 and see what happens.
Actually... I think "Pudd" is short for "Puppy DD". At least, it makes sense. After checking, it appears Pudd is just a pseudo-GUI for DD.
It *did* gzip it down to a .gz file, but it appears to have only shaved around 200MB off the size of the total data on the partition. Down from like 4.2GB to around 4.0GB.
First let me say that Ghost trully is an amazing program, especially for Windows disk clonining.
You can us dd and gzip but I find that it cannot match the compression levels of Ghost.
Also, I recommend to zero out any unused blocks before you use dd/gzip, since dd will write every block on your hard disk, even the ones that are not being used. When you delete a file it remains on the disk and dd will copy that too. To zero it out you need to mount the partition onto a directory and run:
cd /directory
dd if=/dev/zero of=0bytefile
Delete the file afterward then you'll have unused blocks with zero's in them instead of with deleted data. That will defenately save a lot of space and compress the image even further.
bzip2 is a better compression utility than gzip. That may help.
Also, if you use a program like Ghost it takes only the files and compresses them and doesn't even acknowledge the unused space. If you use dd it take ALL of the space on the drive. Even space that is unused by a file.
One time I created a program that makes a huge file that is the Number 0 over and over and over again that filled up the drive then I deleted it. I did that because it made a pattern in the unused space that would compress down to almost nothing. It saved a ton of space.
might want to try partimage. I have no idea how it performs compared to Ghost or gzipping the results of dd, but it's fairly slick and easy. Comes on SystemRescueCd.
My / partition is slightly larger than 10300000000 bytes with 5% reserved for root and about 440000000 bytes free (gonna be a problem before long). When I dd it to a file on another partition, then gzip that file with all defaults, it shrinks to 3820313749 bytes.
I don't think that is bad at all. I'd guess this pudd thing is set to minimal compression.
It only copies files, not un-used space. My 10GB Fedora partition has around 5.5 to 6GB used space, the compressed image is 1.4GB in size. Bootitng is under shareware license, you use it for free, if you want to install it for the boot manager features, then you will be "asked" (after 30 day trial) to pay $35.00 US. But if all you want is images, that part and many other features are free. One note: Bootitng creates it's partitions to align correctly within C.H.S. values, because of this, when making an image of an existing partition that is not properly aligned, the size of the partition may need to be slightly different to restore the image which is made to align properly. There are four ways to deal with this.
1: Use bootitng to shrink (resize) your Windows partition by a few megabytes, this will ensure the partition is properly aligned, bootitng will shrink it to the size required, not specified, to come close to the size you specify. Then your image will be made to fit in a partition same size as what was created by bootitng.
2: Make an image without a resize, then go through some of the steps to install the image and once you select the image file, at the bottom of the window will be the size of partition required, in most cases it will be the same as the original, only manually created partitions tend to not be properly aligned.
3: Use "Image for Windows" or "Image for Linux" by the same vendor to image existing partitions, but these products only offer 30 day trial, bootitng is free if you don't install it as a boot manager, and the extra tools that come with it are free to use also. such as: create partitions, resize partitions, slide partitions, compressed imaging partitions or volumes, undelete partitions/volumes, FAT/FAT32 formatting, wipe partitions with zeros.
4: Before restoring an image, create the partition with bootitng.
Maximum image size so far has been 4GB, and will create as many files needed if the image is required to surpass that size. My Windows XP Media Center comes on a DVD because of all the extra software, it's image is 2GB in size. Images can be burned to multiple CD's/one DVD, USB Drives, data partition etc.
I didn't backup a large partition, but I did backup a large home directory using tar. Because I was backing it up to an external fat32 drive, I piped it through split to break it up into smaller sizes. The I used cat to join it and piped that to tar. I was even able to list the contents that way. I also use par2 to create parity files in case one of the files got corrupted. This way you can restore over the network without worrying about the 2GB size limit.
I did a test using dd to backup my /boot partition and piped it through gzip and bzip2. The size was less than 10% because the partition was not very full. If you are going to back up a Windows partition, I wonder if defragging first might help reduce the compression. At least if you have the option to clear unused space, it should clear deleted files. The cleared areas should compress better.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.