Path: csiph.com!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: ray carter Newsgroups: comp.sys.raspberry-pi Subject: Re: Failure to clone SD card with compression Date: 8 Jan 2016 01:31:25 GMT Lines: 18 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit X-Trace: individual.net ItJZElOi3YfTTOTzTrhWjQwyrfOZQPm4mHBxnzDlnyjLZZS0zy Cancel-Lock: sha1:uJqR+mgzE73D5DevmZhN9PJ64gE= User-Agent: Pan/0.139 (Sexual Chocolate; GIT bf56508 git://git.gnome.org/pan2) Xref: csiph.com comp.sys.raspberry-pi:10323 On Thu, 07 Jan 2016 20:09:40 +0000, Russell Gadd wrote: > I am having difficulty using gzip for compressing images of SD cards. If > I use command lines such as > # dd bs=1M count=3752 if=/dev/sdc conv=sync,noerror of=/backfile.img > # dd bs=1M count=3752 if=/backfile.img of=/dev/sdc conv=sync,noerror > for making the image and restoring it to another card, it works ok. > > However if I use compression like this: > # dd bs=1M count=3752 if=/dev/sdc conv=sync,noerror | gzip -c > >/backfile.img.gz > # gunzip -c /backfile.img.gz | dd bs=1M count=3752 of=/dev/sdc > conv=sync,noerror it fails to restore the image correctly. The MBR and > the partitions cloned are not the same as the original. > > What error(s) am I making? I'd suggest 'partimage' instead.