How to verify a possibly corrupt Partimage image file?

Other questions, messages

Moderator: feffer

Post Reply
Posts: 2
Joined: Wed Apr 22, 2009 4:29 pm

How to verify a possibly corrupt Partimage image file?

Post by brianp » Wed Apr 22, 2009 4:49 pm

I have abuncha Partimages on an ntfs drive in ubuntu 9.04. Gparted is complaining about corruption on the drive (cluster accounting failed).

I would rather not have to re-image the world. Is there any way to do an internal consistency check on Part-Images? Aren't there internal md5 signatures that can be verified?

Thank you,

Posts: 1
Joined: Wed Jun 30, 2010 10:49 am

online finance tutor

Post by carmerhungry » Wed Jun 30, 2010 10:51 am

Thanks to tell me information about tht how to verify a possibly corrupt Partimage image file?

Accounting Tutor|Marketing Assignment Help

Posts: 2
Joined: Wed Apr 22, 2009 4:29 pm

Don't use partimage, use dd insted

Post by brianp » Wed Jun 30, 2010 1:44 pm

Partimage disappointed me by corrupting itself and not restoring working partitions. Instead, use the bullet-proof dd.

After you setup a new OS, zero 95% of the free space:
Do a 'df' and find out how much free space is on the drive:
/bin/df /mnt/sdc1.u10.04.sys ->
/dev/sdc1 23070644 2999024 18899680 14% /mnt/sdc1.u10.04.sys

Available = 19.353 E9 bytes. Zero 95% or 18385 megabyte blocks:
/bin/dd if=/dev/zero of=zero.file bs=1000000 count=18385

Then, remove the zero.file. When you compress the image, the zeros zip down to nothing. DD and GZip it:
/bin/dd if=/dev/sdc1 conv=sync,noerror bs=64K | gzip -c --to-stdout > /tera/trex.sdc1.u10.04.sys.20100619a.dd.gz
ll /tera/trex.sdc1.u10.04.sys.20100619a.dd.gz
-rw-r--r-- 1 root root 1.7G 2010-06-19 12:06 /tera/trex.sdc1.u10.04.sys.20100619a.dd.gz

1.7 gigs for a compressed, new Ubu 10.4 system image.

Make sure to test the archive:
7z t /tera/trex.sdc1.u10.04.sys.20100619a.dd.gz" ->
... Everything is Ok

ALL new OS installs I have used, Ubu*, Suse*, Fedora*, xp, will fit on single DVD. After some use, you may need a dual sided dvd. Or, just put the dd.gz file on another physical hard drive from the system. You can mount them from an Ubuntu live cd.

BE SURE TO MAINTAIN A CHURCH AND STATE SEPARATION BETWEEN SYSTEM AND DATA! Keep your home dir, pictures, videos and other large data on any other partition. Use rsync or '7z u' to backup your data to another physical hard drive. You can put them in a crontab job.

Boot with an Ubuntu live disk and you are guaranteed to have both gunzip and dd so all you have to do to restore the image is:
dd if=/r5/bak/trex.sdc1.u10.04.sys.20100619.dd of=/dev/sdc1 bs=64k conv=sync,noerror

Make a golden disk for each new os and when the shinola hits the fan, it's a 10 minute chore to blast the golden image back on.


Post Reply