Puppy Linux Discussion Forum Forum Index Puppy Linux Discussion Forum
Puppy HOME page : puppylinux.com
"THE" alternative forum : puppylinux.info
 
 FAQFAQ   SearchSearch   MemberlistMemberlist   UsergroupsUsergroups   RegisterRegister 
 ProfileProfile   Log in to check your private messagesLog in to check your private messages   Log inLog in 

The time now is Fri 30 Jan 2015, 10:05
All times are UTC - 4
 Forum index » House Training » Users ( For the regulars )
advice on optimal compression of dd image
Moderators: Flash, Ian, JohnMurga
Post new topic   Reply to topic View previous topic :: View next topic
Page 1 of 1 [5 Posts]  
Author Message
step

Joined: 04 May 2012
Posts: 255

PostPosted: Yesterday, at 04:25    Post subject:  advice on optimal compression of dd image  

I used precise puppy's partition backup utility pudd to save a dd image of an 8 GB USB key (two partitions in it, a small boot partition and an OS partition). The resulting .gz file size is over 6 GB. But the source OS partition includes a total file size less than 50 MB. So the backup .gz image is about 6 GB larger than what it could be if optimally taken and compressed.
So my question is (command line answers preferred):
1. Starting with the original USB key with two partitions, what commands and options would yield a minimum size output image file?
2. Starting with the 6 GB .gz image backup file, how can I shrink it to just the few MB that hold useful data?
TIA

_________________
FatDog64 631|Blue Pup 4|DebianDog+OpenMediaVault stick
Back to top
View user's profile Send private message 
Flash
Official Dog Handler


Joined: 04 May 2005
Posts: 11224
Location: Arizona USA

PostPosted: Yesterday, at 16:34    Post subject:  

I haven't used Pudd to back up partitions but I did once use another utility that used dd, to make an "exact copy" of a multisession Puppy DVD-RW. Imagine my surprise when the "exact copy" which should have been less than 200 MB, filled the whole DVD. The reason was, before I used Burniso2cd to burn Puppy on the DVD-RW (without first blanking the whole DVD-RW,) I had previously used the DVD-RW for something that filled it up. So, dd simply copied everything it found on the DVD, whether it was in the Table of Contents or not. Perhaps something similar has happened to you.
Back to top
View user's profile Send private message 
Ted Dog


Joined: 13 Sep 2005
Posts: 2737
Location: Heart of Texas

PostPosted: Yesterday, at 16:49    Post subject:  

I commonly zero fill before backup to clear out the unused cruff. Would not want to do that too often to a flashdrive. but if you give it a big buffer it should reduce the demise speed of the flashdrive.

dd if=/dev/zero of=/mnt/sda1/ZEROFILL.DAT bs=32M

after it crashes with "out of space" error just delete the resulting file and compress normally. gzip is my prefered compression. good balance of speed/size.
Back to top
View user's profile Send private message 
Ted Dog


Joined: 13 Sep 2005
Posts: 2737
Location: Heart of Texas

PostPosted: Yesterday, at 16:58    Post subject:  

second if its linux based only use the common tools like tar to backup. No need to image 99.999 percent of linux stuff.
Back to top
View user's profile Send private message 
step

Joined: 04 May 2012
Posts: 255

PostPosted: Yesterday, at 18:01    Post subject:  

What I wanted to achieve is something like BarryK's Quirky 6.1 installation images. Those are small, about 100-200 MB, but meant to fill 4GB when dd'ed to a real USB key. I believe Barry starts from an OS build, that is actual files and folders, and creates the boot partition directly inside the image file + appends the OS partition to the image file and fills it with files and folders.
In my case I already had a bootable USB key, and I wanted to back it up to be able to re-create the key at some point in the future.

_________________
FatDog64 631|Blue Pup 4|DebianDog+OpenMediaVault stick
Back to top
View user's profile Send private message 
Display posts from previous:   Sort by:   
Page 1 of 1 [5 Posts]  
Post new topic   Reply to topic View previous topic :: View next topic
 Forum index » House Training » Users ( For the regulars )
Jump to:  

You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum
You cannot attach files in this forum
You can download files in this forum


Powered by phpBB © 2001, 2005 phpBB Group
[ Time: 0.0483s ][ Queries: 11 (0.0048s) ][ GZIP on ]