LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices


Reply
  Search this Thread
Old 03-29-2015, 04:17 PM   #1
Xeratul
Senior Member
 
Registered: Jun 2006
Location: UNIX
Distribution: FreeBSD
Posts: 2,657

Rep: Reputation: 255Reputation: 255Reputation: 255
backup a 8gb pendrive for a small size image?


Hello,

I have created a damnsmallinux pendrive, which is bootable.
dsl uses syslinux to boot and holds on 50 mb only.

I would like to backup my pendrive using linux.

Code:
dd if=/dev/sdb of=image-dsl-bootable.img
works but it is very long and is of about 8gb.

Which alternative would you propose?

(I haven't syslinux installed and wont install it)

Looking forward to hearing your ideas.

Thank you!
 
Old 03-29-2015, 08:14 PM   #2
suicidaleggroll
LQ Guru
 
Registered: Nov 2010
Location: Colorado
Distribution: OpenSUSE, CentOS
Posts: 5,573

Rep: Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142Reputation: 2142
If you gzip the image it should drop to the size of the used space, provided everything else is just zero (if not, mount the drive and use dd if=/dev/zero of=/path/to/mount/point/zerofile.bin, and then when it finishes delete zerofile.bin, unmount, and redo your dd backup).
 
Old 03-29-2015, 09:06 PM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,128

Rep: Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121Reputation: 4121
Better to not copy the unwanted data in the first place as the OP is complaining about time. Simply add a "count" keyword to the dd - make sure you get all the relevant data.
 
Old 03-30-2015, 04:38 PM   #4
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,982

Rep: Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626Reputation: 3626
If you simply want a backup of the drive a file by file method may be better. Many file by file ways exist from tar to clonezilla to gparted to parted.

syslinux is easy to replicate on windows or linux by the way. No need to worry about it, just sometimes the version level. Very small footprint.

You can compress the image with a compression level of 9 if you wish in the same dd command. It will take longer.

If your drive saves data to a folder or part of the usb and the rest is static then just save the user data.
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
SSD and 8GB RAM, What size SWAP? wulp Linux - General 9 08-25-2011 10:38 AM
2-8GB USB> DAMN! That small Linux makes me confused... Lozu Linux - Newbie 3 05-11-2010 12:29 PM
Increasing disk size after dd'ing a small image dezert_fox Linux - Hardware 2 05-03-2007 12:07 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - General

All times are GMT -5. The time now is 06:38 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration